atomics_get_list_of_active_htlc
Shows the list of active proposals
Request
{
"jsonrpc": "2.0",
"id": 0,
"method": "atomics_get_list_of_active_htlc",
"params": {
"income_redeem_only": true
}
}
Request parameters
- income_redeem_only - Shows only incoming HTLCs, ie only those contracts which might be redeemed by this wallet.
Response
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"htlcs": [
{
"counterparty_address": "NiRCb5oL6RTEffiH9gj7w3SYUeQ5s53yUBFGoyGChaqpQdud2uNUaA936Q2ngcEouvmgA48WMZQyv41R2ASstyYHo2Kzeoh7GA",
"sha256_hash": "8ee7377d6ee3632ea5b43bed2a5ea41c035abb3fe6146aec63e6c5cbbc4257f1",
"tx_id": "018c8bcf749063ee4a8127b84586a03f9bbd1909d9e5cfdb92007ebc463462d4",
"amount": 100000000000000,
"is_redeem": true
},
{
"counterparty_address": "NiRDNaMeZjwCjnHuU5gUNyrP1pM3U5vckbakzzV6dEHyDYeCpW8XGLBFTshcaY8LkG9RQn7FsQx8w2JeJzJwPwuDm2NfixPAXf",
"sha256_hash": "c4a91f0d2b7e5836a10d9f4c72be0513d8ea6f2947b30c15de8a4f60b129c73e",
"tx_id": "7a1cd0f4b93e28650cbd1f7a35e04b2986dc1f0a74e3b5d92c8a61f0e5b73024",
"amount": 25000000000000,
"is_redeem": false
}
]
}
}
Response information
- htlcs - array of objects; every currently active HTLC known to this wallet. Empty when there is none. Fields of each item:
- counterparty_address - Address of the other party of this HTLC — the creator for incoming contracts, the recipient for outgoing ones.
- sha256_hash - Hash of the HTLC secret, sha256 by default.
- tx_id - ID of transaction carrying this HTLC (this ID is needed for the call of atomics_redeem_htlc).
- amount - unsigned int; amount being transferred by this HTLC, in atomic units.
- is_redeem - boolean (a real JSON
true/false, not a string);trueif this HTLC is incoming with respect to the current wallet, i.e. this wallet is the one that can redeem it. When the request was made withincome_redeem_onlyset totrue, every returned entry has this field set totrue.
This method returns no status field. Failures are reported as a JSON-RPC error object instead of a result.