Offline Transaction Signing
Some security models require keeping signing keys, and thus the signing process, separated from transaction creation and network broadcast. Examples include:
- Signing transactions using an airgapped signing device
This document describes using Renec's CLI to separately sign and submit a transaction.
#
Commands Supporting Offline SigningAt present, the following commands support offline signing:
#
Signing Transactions OfflineTo sign a transaction offline, pass the following arguments on the command line
--sign-only
, prevents the client from submitting the signed transaction to the network. Instead, the pubkey/signature pairs are printed to stdout.--blockhash BASE58_HASH
, allows the caller to specify the value used to fill the transaction'srecent_blockhash
field. This serves a number of purposes, namely: Eliminates the need to connect to the network and query a recent blockhash via RPC Enables the signers to coordinate the blockhash in a multiple-signature scheme
#
Example: Offline Signing a PaymentCommand
Output
#
Submitting Offline Signed Transactions to the NetworkTo submit a transaction that has been signed offline to the network, pass the following arguments on the command line
--blockhash BASE58_HASH
, must be the same blockhash as was used to sign--signer BASE58_PUBKEY=BASE58_SIGNATURE
, one for each offline signer. This includes the pubkey/signature pairs directly in the transaction rather than signing it with any local keypair(s)
#
Example: Submitting an Offline Signed PaymentCommand
Output
#
Offline Signing Over Multiple SessionsOffline signing can also take place over multiple sessions. In this scenario, pass the absent signer's public key for each role. All pubkeys that were specified, but no signature was generated for will be listed as absent in the offline signing output
#
Example: Transfer with Two Offline Signing SessionsCommand (Offline Session #1)
Output (Offline Session #1)
Command (Offline Session #2)
Output (Offline Session #2)
Command (Online Submission)
Output (Online Submission)
#
Buying More Time to SignTypically a Renec transaction must be signed and accepted by the network within
a number of slots from the blockhash in its recent_blockhash
field (~1min at
the time of this writing). If your signing procedure takes longer than this, a
Durable Transaction Nonce can give you the extra time you
need.