CLI transfer
does not support offline-signed transactions.
#21210
Labels
transfer
does not support offline-signed transactions.
#21210
Problem
When trying to submit an offline-signed transaction with the CLI, the
transfer
command on the online machine tries to use a local id instead of the--from
or--signer
passed in.How to reproduce
This is the process described in the documentation (which could also use an update):
transfer
transaction from SENDERHowever to make it easier to reproduce, we can use
devnet
doing it all from an online machine, but not give the "online" steps access to any keys.id.json
file and switch to devnet<sender-pubkey>.json
to use in step 3, simulating the key which is present on the offline machine.solana airdrop 1 sender-pubkey
The output is as follows:
If a valid local id is present, the
transfer
in step 5 attempts to use that - I'm not sure what happens if this is a real funded account on mainnet, so don't recommend trying it. If the local id is an unfunded account it does try to use it and complains that there are no funds.Proposed Solution
There are a number of possibilities:
transfer
should use the signature that was passed in to identify the from-address, (or thefrom
argument if specified), and not require a local id.submit-transaction
command or similar could be used to send it to the network. This would be ideal as it would remove the need for a more complex process, replicating the transaction commands on the online machine.The text was updated successfully, but these errors were encountered: