Skip to main content

Signing a multisig transaction

To sign a transaction with a multisig wallet, you need to send the transaction file to each member and which in turn will generate their respective signature. For example, a multisig wallet is created with a threshold of 2/3. You need at least 2 signatures and then combine them into to a multi-signature. That signature will be used to broadcast in the next step.

Step 1: Sign individually

Sign with test1 and test2 and create individual signatures.

aurad tx sign \
unsignedTx.json \
--from test1 \
--multisig aura1tk736vetmgplrefcak0l62gak8h28m9ccqynxj \
--sign-mode amino-json \
--chain-id aura_6322-2 \
--node https://rpc.aura.network:443 \
--output-document=tx-signed-test1.json

aurad tx sign \
unsignedTx.json \
--multisig aura1tk736vetmgplrefcak0l62gak8h28m9ccqynxj \
--from test2 \
--sign-mode amino-json \
--chain-id aura_6322-2 \
--node https://rpc.aura.network:443 \
--output-document=tx-signed-test2.json

Step 2: Create multi-signature

Combine signatures to sign transaction.

aurad tx multisign \
unsignedTx.json \
multi \
tx-signed-test1.json tx-signed-test2.json \
--chain-id aura_6322-2 \
--node https://rpc.aura.network:443 > signedTx.json

The TX is now signed.

{
"body": {
"messages": [
{
"@type": "/cosmos.bank.v1beta1.MsgSend",
"from_address": "aura1tk736vetmgplrefcak0l62gak8h28m9ccqynxj",
"to_address": "aura1hctj3tpmucmuv02umf9252enjedkce7mml69k8",
"amount": [
{
"denom": "uaura",
"amount": "1000000"
}
]
}
],
"memo": "",
"timeout_height": "0",
"extension_options": [],
"non_critical_extension_options": []
},
"auth_info": {
"signer_infos": [
{
"public_key": {
"@type": "/cosmos.crypto.multisig.LegacyAminoPubKey",
"threshold": 2,
"public_keys": [
{
"@type": "/cosmos.crypto.secp256k1.PubKey",
"key": "Arow5Hb8CbBYKWjuWIM5KWoEvbwCUmNti+2Kdaqrjd/T"
},
{
"@type": "/cosmos.crypto.secp256k1.PubKey",
"key": "Asc2LPPqgjWTuKvGZMKrhLXUxFjyLRtxy4mBtxqw3RG2"
},
{
"@type": "/cosmos.crypto.secp256k1.PubKey",
"key": "AmFtbMlegjibAduEBfNyZcVjrIN3W8JzGu/eIGzBUDVI"
}
]
},
"mode_info": {
"multi": {
"bitarray": {
"extra_bits_stored": 3,
"elems": "YA=="
},
"mode_infos": [
{
"single": {
"mode": "SIGN_MODE_LEGACY_AMINO_JSON"
}
},
{
"single": {
"mode": "SIGN_MODE_LEGACY_AMINO_JSON"
}
}
]
}
},
"sequence": "0"
}
],
"fee": {
"amount": [
{
"denom": "uaura",
"amount": "100000"
}
],
"gas_limit": "200000",
"payer": "",
"granter": ""
}
},
"signatures": [
"CkDDowe0qGxH+5OE99Xc4dSuD+SeSXoN5sZTEwGG2pBUripo6ri5XrtcSeigkcqmCY+0anBFcmFAFnmVrYxt9v1KCkDAjWX1Xsik1F62RZJ0o62+7BdfRUIO0THOfKihP0gx11mBxdEd3DGi1ZwU4pgNznibawrmpiPaaTYvBQjbPC7l"
]