Skip to content

Commit 6260b9a

Browse files
authored
Merge pull request #450 from anoma/brent/update-offline-signing
Fix up offline signing docs
2 parents 4f098a3 + 608bb87 commit 6260b9a

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed

packages/docs/pages/users/transparent-accounts/multisignature.mdx

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -51,41 +51,38 @@ being submitted to the chain.
5151

5252
<Steps>
5353
### Dump the raw tx
54-
The `--dump-tx` argument will write the transaction to disk. A folder is required to be specified where the transaction will be dumped.
55-
54+
The `--dump-tx` argument will write the transaction to disk. A folder is required to be specified where the transaction will be dumped (use `.` for the current directory).
55+
Consider the example of a transparent transfer:
5656
```bash copy
57-
mkdir tx_dumps
5857
namadac transparent-transfer --source abc-multisig --target $TARGET \
5958
--token nam --amount 2 \
60-
--signing-keys alice \
61-
--dump-tx --output-folder-path tx_dumps
59+
--dump-tx --output-folder-path . \
60+
--node $NODE
6261

6362
# Example output:
64-
Transaction serialized to tx_dumps/FC2955C6B252EF6E93B1B54923B2178A7DC47E06D27448A43426487DF4BAD0E3.tx.
63+
Transaction serialized to ./9c92fe1f2cdc64956582e69b898101e6df78700968fcad5e88bfc1cdf0a5496d.tx.
6564
```
6665
<Callout type="info">
67-
By default, transactions have an expiration of *1 hour* from the time they're created. This can be changed using the `expiration-date` flag and providing a new
68-
expiration time (in UTC). You can also use the `no-expiration` flag to set no expiry; although this option is discouraged and should be used with caution.
69-
70-
Transactions submitted after expiry will not be accepted on-chain.
66+
By default, transactions have an expiration of *1 hour* from the time they're created. This can be changed using the `--expiration` flag and providing a new
67+
expiration time (in UTC). Transactions submitted after expiry will not be accepted on-chain.
7168
</Callout>
7269

73-
### Sign the transaction with two of the three Keys
74-
This command will sign the transaction with Alice's key. Afterwards, repeat the command using Bob's key.
70+
### Sign the transaction with the necessary number of keys (2 in this case)
71+
This command will sign the transaction with Alice's key and Bob's key:
7572

7673
```bash copy
7774
cd tx_dumps
78-
namadac sign-tx \
79-
--tx-path FC2955C6B252EF6E93B1B54923B2178A7DC47E06D27448A43426487DF4BAD0E3.tx \
80-
--signing-keys alice \
81-
--owner abc-multisig
75+
namadac utils sign-offline \
76+
--data-path 9c92fe1f2cdc64956582e69b898101e6df78700968fcad5e88bfc1cdf0a5496d.tx \
77+
--secret-keys alice,bob \
8278
```
79+
8380
You should have created two new files -- one with Alice's signature and one with Bob's.
8481
```bash copy
85-
# contents of tx_dumps directory
86-
FC2955C6B252EF6E93B1B54923B2178A7DC47E06D27448A43426487DF4BAD0E3.tx
87-
offline_signature_FC2955C6B252EF6E93B1B54923B2178A7DC47E06D27448A43426487DF4BAD0E3_tpknam1qpnpmq2mpxaag9e0xcczgc0w66pzaxvpnhysjsm8h5tgmajgvunwck67w5j.tx
88-
offline_signature_FC2955C6B252EF6E93B1B54923B2178A7DC47E06D27448A43426487DF4BAD0E3_tpknam1qqjnwcwpjy09ty4v0z6jwpkr04m3q2h0dgr6j62dfs4g6q6l4dk5yy5we05.tx
82+
# contents of current directory
83+
9c92fe1f2cdc64956582e69b898101e6df78700968fcad5e88bfc1cdf0a5496d.tx
84+
offline_signature_9c92fe1f2cdc64956582e69b898101e6df78700968fcad5e88bfc1cdf0a5496d_tpknam1qpnpmq2mpxaag9e0xcczgc0w66pzaxvpnhysjsm8h5tgmajgvunwck67w5j.sig
85+
offline_signature_9c92fe1f2cdc64956582e69b898101e6df78700968fcad5e88bfc1cdf0a5496d_tpknam1qqjnwcwpjy09ty4v0z6jwpkr04m3q2h0dgr6j62dfs4g6q6l4dk5yy5we05.sig
8986
```
9087
To make things easier in the next step, we'll save these filenames to the shell variables `TX`, `SIG1` and `SIG2`.
9188

@@ -97,8 +94,7 @@ an implicit account that will pay the transaction fees.
9794
namadac tx \
9895
--tx-path $TX \
9996
--signatures $SIG1 $SIG2 \
100-
--owner abc-multisig \
101-
--gas-payer alice
97+
--gas-payer alice --node $NODE
10298
```
10399
<Callout type="info">
104100
Note the lack of commas used in the `--signatures` argument.
@@ -116,7 +112,7 @@ namadac update-account \
116112
--address abc-multisig \
117113
--public-keys alice,bob,charlie \
118114
--threshold 1 \
119-
--signing-keys alice,bob
115+
--signing-keys alice,bob --node $NODE
120116
```
121117
<Callout type="info">
122118
Note: you must include both the threshold and the list of public keys to be associated with this account, even if there is no change to one of those values.
@@ -132,7 +128,7 @@ to a file and collect the required signatures.
132128
One can check that the threshold has been updated correctly by running:
133129
```shell
134130
namadac query-account \
135-
--owner abc-multisig
131+
--owner abc-multisig --node $NODE
136132
```
137133
This will list the threshold and all associated public keys of an account.
138134

0 commit comments

Comments
 (0)