diff --git a/doc/payment-api.md b/doc/payment-api.md index 7ea8ae238..16939f993 100644 --- a/doc/payment-api.md +++ b/doc/payment-api.md @@ -98,3 +98,14 @@ Command | Parameters | Description z_getoperationresult
| [operationids] | Return OperationStatus JSON objects for all completed operations the node is currently aware of, and then remove the operation from memory.

Operationids is an optional array to filter which operations you want to receive status objects for.

Output is a list of operation status objects, where the status is either "failed", "cancelled" or "success".
[
{“operationid”: “opid-11ee…”,
“status”: “cancelled”},
{“operationid”: “opid-9876”, “status”: ”failed”},
{“operationid”: “opid-0e0e”,
“status”:”success”,
“execution_time”:”25”,
“result”: {“txid”:”af3887654…”,...}
},
] z_getoperationstatus
| [operationids] | Return OperationStatus JSON objects for all operations the node is currently aware of.

Operationids is an optional array to filter which operations you want to receive status objects for.

Output is a list of operation status objects.
[
{“operationid”: “opid-12ee…”,
“status”: “queued”},
{“operationid”: “opd-098a…”, “status”: ”executing”},
{“operationid”: “opid-9876”, “status”: ”failed”}
]

When the operation succeeds, the status object will also include the result.

{“operationid”: “opid-0e0e”,
“status”:”success”,
“execution_time”:”25”,
“result”: {“txid”:”af3887654…”,...}
} z_listoperationids
| [state] | Return a list of operationids for all operations which the node is currently aware of.

State is an optional string parameter to filter the operations you want listed by their state. Acceptable parameter values are ‘queued’, ‘executing’, ‘success’, ‘failed’, ‘cancelled’.

[“opid-0e0e…”, “opid-1af4…”, … ] + +### Asynchronous RPC call Error Codes + +Command | Code | Messages + --- | --- | --- +z_sendmany
| -8 | RPC_INVALID_PARAMETER, (Invalid, missing or duplicate parameter)

- "Minconf cannot be negative"
- "From address parameter missing"
- "No recipients"
- "Memo must be in hexadecimal format"
- "Memo size of __ is too big, maximum allowed is __ "
- "From address does not belong to this node, zaddr spending key not found."
- "Invalid parameter, expected object"
- "Invalid parameter, unknown key: __"
- "expected valid size"
- "expected object"
- "expected hex txid"
- "vout must be positive"
- "duplicated address"
- "amounts array is empty"
- "unknown key"
- "unknown address format"
- "size of memo"
- "amount must be positive"
- "too many zaddr outputs"
- "expected memo data in hexadecimal format"
- "size of memo is larger than maximum allowed __ "
- "Minimum number of confirmations cannot be less than 0" +z_sendmany
| -5 | RPC_INVALID_ADDRESS_OR_KEY, (Invalid address or key)

-"Invalid from address, no spending key found for zaddr"
- "Invalid output address, not a valid taddr."
- "Invalid from address, should be a taddr or zaddr."
- "From address does not belong to this node, zaddr spending key not found." +z_sendmany
| -6 | RPC_WALLET_INSUFFICIENT_FUNDS, (Not enough funds in wallet or account)

- "Insufficient funds, no UTXOs found for taddr from address."
- "Could not find any non-coinbase UTXOs to spend. Coinbase UTXOs can only be sent to a single zaddr recipient."
- "Could not find any non-coinbase UTXOs to spend."
- "Insufficient funds, no unspent notes found for zaddr from address."
- "Insufficient transparent funds, have __, need __ plus fee __"
- "Insufficient protected funds, have __, need __ plus fee __" +z_sendmany
| -4 | RPC_WALLET_ERROR, (unspecified problem with wallet)

- "Could not find previous JoinSplit anchor"
- "Error decrypting output note of previous JoinSplit: __"
- "Could not find witness for note commitment"
- "Witness for note commitment is null"
- "Witness for spendable note does not have same anchor as change input"
- "Not enough funds to pay miners fee"
- "Missing hex data for raw transaction"
- "Missing hex data for signed transaction"
- "Send raw transaction did not return an error or a txid." +z_sendmany
| -16 | RPC_WALLET_ENCRYPTION_FAILED, (Failed to encrypt the wallet)

- "Failed to sign transaction" +z_sendmany
| -12 | RPC_WALLET_KEYPOOL_RAN_OUT, (Keypool ran out, call keypoolrefill first)

- "Could not generate a taddr to use as a change address"