Language

Choose a language

/build/rpc / assets / icu

geticupayload

geticupayload "asset_id_or_ticker" ( {"wrapped_key":"str","receive_address":"str","receive_scriptpubkey":"hex","suite_id":n} ) Retrieve and decrypt the ICU payload for a given asset. If the wallet holds asset UTXOs with ICU_KEYWRAP, automatically decrypts the payload. Optionally, provide wrapped_key and receive_address to decrypt from PSBT output (for commitment proofs). Arguments: 1. asset_id_or_ticker (string, required) Asset identifier (hex) or ticker 2. options (json object, optional) Optional decryption parameters { "wrapped_key": "str", (string, optional) Base64 or hex-encoded wrapped key from PSBT asset tag (bypasses wallet UTXO search) "receive_address": "str", (string, optional) Taproot address for unwrapping (must be in wallet) "receive_scriptpubkey": "hex", (string, optional) ScriptPubKey hex for the receive address (optional, derived from receive_address if omitted) "suite_id": n, (numeric, optional) Keywrap suite ID (default: auto-detect from wrapped_key) } Result: { (json object) "ciphertext" : "hex", (string) Hex-encoded encrypted ICU payload "plaintext" : "hex", (string, optional) Hex-encoded decrypted payload (if wallet has keywrap) "icu_ctxt_commit" : "hex", (string) Commitment hash of the ciphertext "decrypted" : true|false, (boolean) Whether automatic decryption succeeded "failure_reason" : "str" (string, optional) When decryption fails, provides the last observed failure reason } Examples: > bitcoin-cli geticupayload "a1b2c3d4..." > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "geticupayload", "params": ["a1b2c3d4..."]}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

geticupayload(asset_id_or_ticker: string, options?: object) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"geticupayload","params":["\"<asset_id_or_ticker>\"",{}]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
asset_id_or_tickerstringyesAsset identifier (hex) or ticker
optionsobjectOptional decryption parameters { "wrapped_key": "str", (string, optional) Base64 or hex-encoded wrapped key from PSBT asset tag (bypasses wallet UTXO search) "receive_address": "str", (string, optional) Taproot address for unwrapping (must be in wallet) "receive_scriptpubkey": "hex", (string, optional) ScriptPubKey hex for the receive address (optional, derived from receive_address if omitted) "suite_id": n, (numeric, optional) Keywrap suite ID (default: auto-detect from wrapped_key) }

Result

Type:  any

{ (json object) "ciphertext" : "hex", (string) Hex-encoded encrypted ICU payload "plaintext" : "hex", (string, optional) Hex-encoded decrypted payload (if wallet has keywrap) "icu_ctxt_commit" : "hex", (string) Commitment hash of the ciphertext "decrypted" : true|false, (boolean) Whether automatic decryption succeeded "failure_reason" : "str" (string, optional) When decryption fails, provides the last observed failure reason }

Source: services/core-node/bcore/src/wallet/rpc/assets.cpp:4829

C++ symbol: geticupayload