Steps Followed
-
Created an device id using crypto.randomUUID()
-
Assigning wallet to that device
Exposed an API on backend and called the same from frontend using the device id generated, it creates a wallet and wallet accountID.
- Instantiate fireblocks ncw connection from frontend to backend
Created event handlers, message handlers and instantiated a connection from frontend to backend for a device.
It calls rpc api exposed on backend with success.
- Generate MPC keys
Set an algorithm MPC_CMP_ECDSA_SECP256K1 and call generateMpcKeys from the created instance.
It communicates to backend via connection created through exposed rpc API.
First - It requests backend via rpc API method - request_mpc_setup
this return with success response -
{
result: {
status: { MPC_CMP_ECDSA_SECP256K1: ‘62a58619-67c5-4f3d-9030-612f180904d3’ }
}
}
In the event handler too (for → key_descriptor_changed)
It gives key status as keyStatus : “SETUP”
Second - It requests backend via rpc API method - poll_mpc_msg
this too returns rpc response with success -
{
result: {
id: ‘5ff21c5aef0cbe81248c38b49e51c6977f5250416bddfb3f7fcc06e8bd1ecf75’,
txId: ‘SETUP_TYPES’,
rawMessage: ,
iat: 1713199762,
type: ‘MPC_START_DERIVED_SETUP’
}
}
But, Here in event handler it gives error -
In the event handler too (for → key_descriptor_changed)
It gives key status as keyStatus : “ERROR”
And overall in mpc key generation process it gives an error -
Error: CosignerStorage is already in process
We are not able to get past this and do mpc key generation with success.