Building Epic transfers
- Endpoint
http://127.0.0.1:3420/v3/owner- Credential
- Token from open_wallet, inside the encrypted envelope. Loopback only
- Methods here
- 7
- Documented against
- node 4.0.3, wallet 4.0.0
init_send_tx
Can move fundsSelect inputs and build the first round of a slate.
Builds the slate but does not yet reserve anything. Nothing is released or committed until you call tx_lock_outputs or abandon the slate.
- Surface
/v3/owneron port 3420- Parameters
- 2 named
- Declared in
- api/src/owner_rpc_s.rs:559
- estimate_only is how to quote a fee safely: it returns the slate that would be built and reserves nothing.
- selection_strategy_is_use_all true spends every output you hold, which consolidates dust and also links all of it together in one transaction. That is a privacy cost, not just a fee choice.
{
"jsonrpc": "2.0",
"id": 1,
"method": "init_send_tx",
"params": {
"token": "<token from open_wallet>",
"args": {
"src_acct_name": null,
"amount": "100000000",
"minimum_confirmations": 10,
"max_outputs": 500,
"num_change_outputs": 1,
"selection_strategy_is_use_all": false,
"target_slate_version": null,
"ttl_blocks": null,
"estimate_only": false
}
}
}N/Atx_lock_outputs
Can move fundsReserve the inputs the slate selected.
This is the call that makes your outputs unavailable. Nothing times out and restarting the wallet does not release them, because the lock is a local record. Only cancel_tx releases them.
- Surface
/v3/owneron port 3420- Parameters
- 4 named
- Declared in
- api/src/owner_rpc_s.rs:897
- Mandatory in any manual send. It is also the one method the previous published reference omitted entirely, which made that reference unusable for building a sender.
- participant_id has no default. Leaving it out fails at the JSON-RPC boundary rather than in the wallet.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tx_lock_outputs",
"params": {
"token": "<token from open_wallet>",
"slate": {},
"participant_id": 0,
"addr_to": null
}
}N/Afinalize_tx
Can move fundsComplete the aggregate signature once the counterparty has signed.
Produces a valid transaction. It does not broadcast: post_tx does that, and a finalised but unposted transaction still holds your outputs.
- Surface
/v3/owneron port 3420- Parameters
- 2 named
- Declared in
- api/src/owner_rpc_s.rs:1072
{
"jsonrpc": "2.0",
"id": 1,
"method": "finalize_tx",
"params": {
"token": "<token from open_wallet>",
"slate": {}
}
}N/Apost_tx
Can move fundsBroadcast a finalised transaction to the network.
Irreversible. Once accepted there is no unbroadcast and no fee replacement, and a transaction already in the mempool can no longer be cancelled.
- Surface
/v3/owneron port 3420- Parameters
- 3 named
- Declared in
- api/src/owner_rpc_s.rs:1143
{
"jsonrpc": "2.0",
"id": 1,
"method": "post_tx",
"params": {
"token": "<token from open_wallet>",
"tx": {},
"fluff": false
}
}N/Acancel_tx
Changes stateAbandon an incomplete transfer and release its reserved outputs.
The only thing that releases a lock. It needs a reachable node, exactly one matching transaction, and a state that is not yet confirmed, so a transaction in the mempool cannot be cancelled at all.
- Surface
/v3/owneron port 3420- Parameters
- 3 named
- Declared in
- api/src/owner_rpc_s.rs:1177
- Cancel the transfer you actually mean. Passing neither id, or an id that matches more than one record, is an error rather than a guess.
{
"jsonrpc": "2.0",
"id": 1,
"method": "cancel_tx",
"params": {
"token": "<token from open_wallet>",
"tx_id": null,
"tx_slate_id": null
}
}N/Aissue_invoice_tx
Can move fundsRequest an amount from someone else, reversing who starts the exchange.
Creates a slate that asks to be paid. It reserves nothing of yours, but the payer who funds it commits their outputs.
- Surface
/v3/owneron port 3420- Parameters
- 2 named
- Declared in
- api/src/owner_rpc_s.rs:644
- dest_acct_name is not passed on the CLI path, so an invoice created there credits the active account.
{
"jsonrpc": "2.0",
"id": 1,
"method": "issue_invoice_tx",
"params": {
"token": "<token from open_wallet>",
"args": {
"dest_acct_name": null,
"amount": "100000000",
"target_slate_version": null
}
}
}N/Aprocess_invoice_tx
Can move fundsFund somebody else's invoice.
This is the paying side of an invoice, so it selects your inputs. Treat it with the same care as init_send_tx followed by tx_lock_outputs.
- Surface
/v3/owneron port 3420- Parameters
- 3 named
- Declared in
- api/src/owner_rpc_s.rs:805
{
"jsonrpc": "2.0",
"id": 1,
"method": "process_invoice_tx",
"params": {
"token": "<token from open_wallet>",
"slate": {},
"args": {
"src_acct_name": null,
"amount": "0",
"minimum_confirmations": 10,
"max_outputs": 500,
"num_change_outputs": 1,
"selection_strategy_is_use_all": false
}
}
}N/A