r14 deposit
Create a private note and optionally submit it on-chain.
Usage
r14 deposit <value> [--app-tag <n>] [--local-only]
Arguments
| Argument | Required | Description |
|---|---|---|
<value> | Yes | Note value (u64) |
Flags
| Flag | Default | Description |
|---|---|---|
--app-tag <n> | 1 | Application identifier for the note. Must match across transfers. |
--local-only | off | Create the note in the wallet but skip on-chain submission. |
What It Does
- Loads the wallet from
~/.r14/wallet.json. - Creates a
Notewith the givenvalue,app_tag, wallet'sowner_hash, and a random nonce. - Computes
commitment = Poseidon(value, app_tag, owner, nonce). - Saves the
NoteEntryto the wallet'snotesarray. - (Unless
--local-only) Fetches existing leaves from the indexer, computes the new Merkle root, and invokesdeposit(cm, new_root)on the r14 transfer contract.
Output
With --json:
{
"value": 1000,
"app_tag": 1,
"commitment": "0x1a2b3c...",
"on_chain": true,
"result": "<soroban tx result>"
}
Config Validation
When submitting on-chain (without --local-only), requires stellar_secret, core_contract_id, and transfer_contract_id to be configured (not PLACEHOLDER).
Local-Only Notes
Notes created with --local-only exist only in the wallet file. They have index: null and cannot be used as transfer inputs until they are deposited on-chain. You can deposit them later by running r14 deposit <value> without --local-only (this creates a new note - the local-only note remains unspent but orphaned).