"I am currently in the process of setting up the ncw-backend-demo repository to test the APIs. On the frontend side, I have a Flutter setup. When the login event is triggered from the frontend, three consecutive routes are called:
Login API
Assigns a newly generated deviceId (POST /api/devices/:deviceId/assign)
API for sending NCW SDK-generated messages to the backend, which then forwards these to the Fireblocks API (GET /api/devices/:deviceId/rpc).
The first two APIs are functioning perfectly fine; however, the second API encounters an error with the message: ‘Invalid signature’ and the error code: -1.
On the backend, I am using the ncw-backend-demo repository. For the Flutter setup, I have configured it to interact with the backend APIs.
Your assistance in resolving this issue would be greatly appreciated."
Hi Akash,
Can you please make sure if the keys were generated correctly on the front end?
Before the key generation step, the SDK needs to be initialized
Please make sure the SDK is initialized correctly before key generation.
The RPC calls wont work if the SDK is not initialized
Also can you please try using our front-end demo and check if you have same issues in the workflow?
Also I am confused with some of the env variables for backend configuration could you help me with it like how will i get those variables may be this can be the cause of error
Hi Akash,
The FIREBLOCKS_API_SECRET is the secret key generated during creation of the CSR file used to create API user.
Please use the same CSR file to create NCW ADMIN and NCW SIGNER users.