You can use Zenrock MPC on your Quicknode endpoint by activating the module on the Quicknode Marketplace.
Generates a new MPC key.
None
curl -X POST --data '{"jsonrpc":"2.0","method":"zr_generateKey","params":[],"id":"1234"}'
The information of the key that was created
{
"addresses": {
"eth": "0x63244B12...846D794A"
},
"id": 17,
"public_key": "024bd522...f1176e0"
}
Get the keys for this account.
None
curl -X POST --data '{"jsonrpc":"2.0","method":"zr_getKeys","params":[],"id":"1234"}'
A list of keys that are created for this account.
{
"keys": [{
"addresses": {
"eth": "0x6A25df...63C5BA"
},
"id": 10,
"public_key": "039b108c...62c6a016"
},
{
"addresses": {
"eth": "0x23B81b6b...106bF92b"
},
"id": 11,
"public_key": "02c91718...58d3b4ab"
}
...
]
}
Signs a eth transaction
{
"payload":"02f383aa36a7028459682f00851086908c3982520894d5a0f8ec2dd398bbf73d163a28c2c56bfd28b31585e8d4a5100080c0808080",
"key_id": 1
}
To test the example a key will first have to be generated and the key_id in the params has to be updated.
curl -X POST --data '{"jsonrpc":"2.0","method":"zr_signTx","params":[{ "payload":"02f383aa36a7028459682f00851086908c3982520894d5a0f8ec2dd398bbf73d163a28c2c56bfd28b31585e8d4a5100080c0808080", "key_id": 1 }], "id":"1234" }'
The response contains the r,s,v values of the signature as well as the full signature.
{
"r": "f4368fd9...5baf02ee",
"s": "6f025936...8059e489",
"v": "00"
}
Signs a 32 byte hash
{
"hash":"0123456789012345678901234567890123456789012345678901234567890123",
"key_id": 1
}
To test the example a key will first have to be generated and the key_id in the params has to be updated.
curl -X POST --data '{"jsonrpc":"2.0","method":"zr_signHash","params":[{"hash":"0123456789012345678901234567890123456789012345678901234567890123","key_id": 1}],"id":"1234"}'
The response contains the r,s,v values of the signature as well as the full signature.
{
"r": "e1134888...bbbf462c",
"s": "52f76f9c...1c8f10f8",
"v": "01"
}