Quicknode RPC Integration

You can use Zenrock MPC on your Quicknode endpoint by activating the module on the Quicknode Marketplace.

zr_generateKey

Generates a new MPC key.

Params

None

Request

curl -X POST --data '{"jsonrpc":"2.0","method":"zr_generateKey","params":[],"id":"1234"}'

Response

The information of the key that was created

{
    "addresses": {
        "eth": "0x63244B12...846D794A"
    },
    "id": 17,
    "public_key": "024bd522...f1176e0"
}

zr_getKeys

Get the keys for this account.

Params

None

Request

curl -X POST --data '{"jsonrpc":"2.0","method":"zr_getKeys","params":[],"id":"1234"}'

Response

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"
        }
        ...
    ]
}

zr_signTx

Signs a eth transaction

Params

{ 
    "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.

Request

curl -X POST --data '{"jsonrpc":"2.0","method":"zr_signTx","params":[{ "payload":"02f383aa36a7028459682f00851086908c3982520894d5a0f8ec2dd398bbf73d163a28c2c56bfd28b31585e8d4a5100080c0808080", "key_id": 1 }], "id":"1234" }'

Response

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"
}

zr_signHash

Signs a 32 byte hash

Params

{ 
    "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.

Request

curl -X POST --data '{"jsonrpc":"2.0","method":"zr_signHash","params":[{"hash":"0123456789012345678901234567890123456789012345678901234567890123","key_id": 1}],"id":"1234"}'

Response

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"
}