Language

Choose a language

/build/rpc / vaults

vaultinfo

vaultinfo "address" Returns detailed information about a registered vault. Arguments: 1. address (string, required) The taproot address of the vault Result: { (json object) "registered" : true|false, (boolean) Whether the vault is registered "address" : "str", (string) The vault address "scriptPubKey" : "hex", (string) The vault scriptPubKey "output_key" : "hex", (string) The taproot output key (32-byte x-only pubkey) "internal_key" : "hex", (string) The taproot internal key "merkle_root" : "hex", (string) The tapscript merkle root "contract_id" : "hex", (string) The contract or offer ID "role" : "str", (string) The vault role (REPO_BORROWER, REPO_LENDER, etc.) "version" : n, (numeric) Vault metadata version "leaves" : [ (json array) Array of tapscript leaves { (json object) "script" : "hex", (string) The leaf script "leaf_version" : n, (numeric) The leaf version (usually 0xc0 for tapscript) "signing_key" : "hex", (string) The x-only pubkey that can sign this leaf "purpose" : "str", (string) Human-readable purpose (repay, default, timeout, etc.) "timelock" : n (numeric, optional) CLTV/CSV timelock value if applicable }, ... ] } Examples: > bitcoin-cli vaultinfo "bcrt1p..." > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "vaultinfo", "params": ["bcrt1p..."]}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

vaultinfo(address: string) → any

Code samples

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

Parameters

NameTypeReq.Description
addressstringyesThe taproot address of the vault

Result

Type:  any

{ (json object) "registered" : true|false, (boolean) Whether the vault is registered "address" : "str", (string) The vault address "scriptPubKey" : "hex", (string) The vault scriptPubKey "output_key" : "hex", (string) The taproot output key (32-byte x-only pubkey) "internal_key" : "hex", (string) The taproot internal key "merkle_root" : "hex", (string) The tapscript merkle root "contract_id" : "hex", (string) The contract or offer ID "role" : "str", (string) The vault role (REPO_BORROWER, REPO_LENDER, etc.) "version" : n, (numeric) Vault metadata version "leaves" : [ (json array) Array of tapscript leaves { (json object) "script" : "hex", (string) The leaf script "leaf_version" : n, (numeric) The leaf version (usually 0xc0 for tapscript) "signing_key" : "hex", (string) The x-only pubkey that can sign this leaf "purpose" : "str", (string) Human-readable purpose (repay, default, timeout, etc.) "timelock" : n (numeric, optional) CLTV/CSV timelock value if applicable }, ... ] }

Source: services/core-node/bcore/src/wallet/rpc/vaults.cpp:16

C++ symbol: vaultinfo