Hi, i am developing a NCW web app like (GitHub - fireblocks/ncw-web-demo: An example usage of @fireblocks/ncw-js-sdk for managing non-custodial wallets). after the device being assigned and creation of walletId. Next step, SDK Initialization returns 401.
request: <ref *1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: ,
outputSize: 0,
writable: true,
destroyed: true,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: ‘292’,
_hasBody: true,
_trailer: ‘’,
finished: true,
_headerSent: true,
_closed: true,
socket: [TLSSocket],
_header: 'POST /v1/ncw/wallets/91a4c49b-f21a-420b-9ece-031c8b867beb/devices/3e688652-
‘Content-Length: 292\r\n’ +
‘Accept-Encoding: gzip, compress, deflate, br\r\n’ +
‘Host: sandbox-api.fireblocks.io\r\n’ +
‘Connection: keep-alive\r\n’ +
‘\r\n’,
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [HttpsAgent],
socketPath: undefined,
method: ‘POST’,
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: ‘/v1/ncw/wallets/91a4c49b-f21a-420b-9ece-031c8b867beb/devices/3e688652-682c-486c-aa61-9e8f8b478979/invoke’,
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: true,
host: ‘sandbox-api.fireblocksio’,
protocol: ‘https:’,
_redirectable: [Writable],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
data: { message: ‘invalid signature’, code: -1 }
}
}
::1 - - [01/Apr/2024:19:14:52 +0000] “POST /api/devices/3e688652-682c-486c-aa61-9e8f8b478979/rpc HTTP/1.1” 401 47 “http//localhost:3000/” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36”
im using,
FIREBLOCKS_API_SECRET = NCW_ADMIN_PRIVATE_KEY
FIREBLOCKS_API_KEY_NCW_SIGNER=NCW_SIGNER_API
FIREBLOCKS_API_KEY_NCW_ADMIN=NCW_ADMIN_API
FIREBLOCKS_WEBHOOK_PUBLIC_KEY=“-----BEGIN PUBLIC KEY-----”
FIREBLOCKS_API_BASE_URL=https//sandbox-api.fireblocksio
also, can you please specify how to set up a webhook public key for the development (localhost cannot be added in console) or any other ways to do it.
Thanks in advance.