读取Epic钱包状态
- Endpoint
http://127.0.0.1:3420/v3/owner- Credential
- Token from open_wallet, inside the encrypted envelope. Loopback only
- Methods here
- 8
- Documented against
- node 4.0.3, wallet 4.0.0
retrieve_summary_info
Read onlyThe balance breakdown, and whether it was validated against the node.
- Surface
/v3/owneron port 3420- Parameters
- 3 named
- Declared in
- api/src/owner_rpc_s.rs:452
- Returns a two-element array, not an object: [validated_against_node, WalletInfo]. It is the only method on this surface shaped that way.
- Every amount is a string count of freemen. Parse before doing arithmetic and divide by 100,000,000 for EPIC.
10 lines
{
"jsonrpc": "2.0",
"id": 1,
"method": "retrieve_summary_info",
"params": {
"token": "<token from open_wallet>",
"refresh_from_node": true,
"minimum_confirmations": 10
}
}Response13 lines
[
true,
{
"amount_awaiting_confirmation": "0",
"amount_awaiting_finalization": "0",
"amount_currently_spendable": "0",
"amount_immature": "0",
"amount_locked": "0",
"last_confirmed_height": "1439",
"minimum_confirmations": "3",
"total": "0"
}
]retrieve_outputs
Read onlyThe outputs this wallet knows about, paged.
- Surface
/v3/owneron port 3420- Parameters
- 7 named
- Declared in
- api/src/owner_rpc_s.rs:253
- Returns an object with a pager, not a bare array.
- The paging fields are optional. With no limit, a large wallet returns every record in one response.
14 lines
{
"jsonrpc": "2.0",
"id": 1,
"method": "retrieve_outputs",
"params": {
"token": "<token from open_wallet>",
"include_spent": false,
"refresh_from_node": true,
"tx_id": null,
"limit": 10,
"offset": 0,
"sort_order": "desc"
}
}Response11 lines
{
"outputs": [],
"pager": {
"limit": 10,
"offset": 0,
"records_read": 0,
"sort_order": "desc",
"total_records": 0
},
"refresh_from_node": true
}retrieve_txs
Read onlyThe transaction log, paged.
- Surface
/v3/owneron port 3420- Parameters
- 7 named
- Declared in
- api/src/owner_rpc_s.rs:385
- The counterparty address is populated only for epicbox transfers. File and HTTP leave it empty, so the log alone cannot tell you who paid you.
- fee is an Option and is not set on received transactions.
14 lines
{
"jsonrpc": "2.0",
"id": 1,
"method": "retrieve_txs",
"params": {
"token": "<token from open_wallet>",
"refresh_from_node": true,
"tx_id": null,
"tx_slate_id": null,
"limit": 10,
"offset": 0,
"sort_order": "desc"
}
}Response11 lines
{
"pager": {
"limit": 10,
"offset": 0,
"records_read": 0,
"sort_order": "desc",
"total_records": 0
},
"refresh_from_node": true,
"txs": []
}node_height
Read onlyThe height the wallet believes the chain is at, and whether the node answered.
- Surface
/v3/owneron port 3420- Parameters
- 1 named
- Declared in
- api/src/owner_rpc_s.rs:1441
- updated_from_node false means the wallet could not reach the node and is reporting its last known height.
- height is a string, like every other u64 on this surface.
8 lines
{
"jsonrpc": "2.0",
"id": 1,
"method": "node_height",
"params": {
"token": "<token from open_wallet>"
}
}Response5 lines
{
"header_hash": "9abbd80483f9b082a9362ebac0aba5619bdba7cf647cb15f5ed33102faf3cd1b",
"height": "1439",
"updated_from_node": true
}get_public_address
Read onlyThe epicbox address for a derivation index.
- Surface
/v3/owneron port 3420- Parameters
- 2 named
- Declared in
- api/src/owner_rpc_s.rs:1995
- derivation_index is required, not optional. Pass 0 explicitly.
- Every derivation uses index 0, so a wallet has one epicbox address.
9 lines
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_public_address",
"params": {
"token": "<token from open_wallet>",
"derivation_index": 0
}
}Response5 lines
{
"domain": "epicbox.epiccash.com",
"port": 443,
"public_key": "esXWittbitgGAF91Hzgh25kH4sfeQWDXm2dNuq3Wc9ARS27ZE14X"
}get_public_proof_address
Read onlyThe payment proof address for a derivation index.
- Surface
/v3/owneron port 3420- Parameters
- 2 named
- Declared in
- api/src/owner_rpc_s.rs:2033
- Returns a bare hex string rather than an object.
9 lines
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_public_proof_address",
"params": {
"token": "<token from open_wallet>",
"derivation_index": 0
}
}Response1 lines
"15c54be15016d08852f8254e0489b3365057efb32cfdc44bf34cdd9423504d4f"get_stored_tx
Read onlyThe stored transaction object for a log entry, if one was kept.
- Surface
/v3/owneron port 3420- Parameters
- 3 named
- Declared in
- api/src/owner_rpc_s.rs:1282
- This is what makes reposting a transaction possible, and it lives in saved_txs on disk.
10 lines
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_stored_tx",
"params": {
"token": "<token from open_wallet>",
"id": null,
"slate_id": null
}
}Response
N/Aget_updater_messages
Read onlyRecent messages from the background updater thread.
- Surface
/v3/owneron port 3420- Parameters
- 1 named
- Declared in
- api/src/owner_rpc_s.rs:1957
- Each message is an externally tagged enum, so the variant name is the key. Useful for showing scan progress in a UI.
8 lines
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_updater_messages",
"params": {
"count": 3
}
}Response14 lines
[
{
"Scanning": [
"Starting UTXO scan",
0
]
},
{
"UpdatingTransactions": "Updating transactions"
},
{
"UpdatingOutputs": "Updating outputs from node"
}
]