Bind
Ask AI
Bind registers key as the new public key of account, under the free label keyType (for instance "ML-DSA-65"). key holds 1 to MaxKeySize bytes; a scheme with a longer public key can bind a digest of it, under a label that says so.
The request must be signed with one-time key number leaf of both trees of the account: proofSHA256 and proofKeccak256 are the proofs of qrc.BindMessage for these arguments, with the account written as the chain writes it (lower case), whatever spelling the account argument uses. The leaf is spent.
A signed request stays valid until its leaf is spent or the account rotates, and whoever holds it may send it at any time: requests take effect in the order they land, not the order they were signed. To replace a key while an earlier Bind for another key may still be pending, rotate first, bind in the new generation, then check Key. After a failure, send the same signed request again rather than sign for another key.
Anyone may send the transaction. Whoever sends it pays the storage deposit of the bytes it adds and receives the refund of the bytes it frees. In a transaction, the three byte arguments are written in base64, which the chain decodes before the call.
Command
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/nym-rootlatch001/qrcregistry/v1" -func "Bind" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nym-rootlatch001/qrcregistry/v1" -func "Bind" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx