Use this page for programmatic cold vault operations. For the conceptual model, see Cold vaults.
Cold vault workflows involve two systems:
- The online Ripple Custody (Vault) API, which requires JWT authentication.
- The cold bridge API, which runs on the air-gapped workstation and provides local endpoints for upload, status, download, and payload inspection.
| Operation | System | Endpoint |
|---|---|---|
| Export pending operations | Online API | Export prepared operations |
| Import signed operations | Online API | Import signed operations |
| Get vault details | Online API | Get vault details |
| Upload operations | Cold bridge | POST {ColdBridgeURL}/v1/feed/upload |
| Check signing status | Cold bridge | GET {ColdBridgeURL}/v1/feed/status |
| Download signed operations | Cold bridge | GET {ColdBridgeURL}/v1/feed/download |
| Decode payload | Cold bridge | POST {ColdBridgeURL}/v1/feed/decode |
When you register a new cold vault, it can be created in a Pending state because the cold vault cannot automatically connect to the online deployment. Complete the handshake by downloading the vault payload from the cold bridge and importing it into Ripple Custody (Vault).
On the air-gapped workstation, download the vault payload from the cold bridge:
curl -X GET "{ColdBridgeURL}/v1/feed/download?clean=false" \ --output cold-vault-handshake.datUse
clean=falseuntil the payload is successfully imported. After confirming successful import, you can useclean=trueto clear the cold bridge cache.Transfer
cold-vault-handshake.datto the online environment using your approved transfer process.Import the payload into Ripple Custody (Vault) with Import signed operations:
curl -X POST "${CUSTODY_API_URL}/v1/vaults/operations/signed" \ -H "Authorization: Bearer ${JWT_TOKEN}" \ -F "files=@cold-vault-handshake.dat"Verify that the vault status is
Completed:curl -X GET "${CUSTODY_API_URL}/v1/vaults/${VAULT_ID}" \ -H "Authorization: Bearer ${JWT_TOKEN}"
After the vault status is Completed, you can use the vault for account creation, transactions, and manifests.
Any accounts, transactions, or manifests created for a cold vault remain Pending until the cold vault signs the prepared operations. You can batch multiple pending operations into the same export.
Call Export prepared operations:
curl -X GET "${CUSTODY_API_URL}/v1/vaults/${VAULT_ID}/operations/prepared" \
-H "Authorization: Bearer ${JWT_TOKEN}" \
--output cold-vault-operations.datTransfer cold-vault-operations.dat to the air-gapped workstation using your approved transfer process.
The cold bridge doesn't require this step, but it's the only point where you can see what the cold vault signs. Decode and review every payload before you upload it.
To decode the exported file, call the cold bridge decode endpoint:
curl -X POST "{ColdBridgeURL}/v1/feed/decode" \
-F "files=@cold-vault-operations.dat"The endpoint returns a JSON array with one element for each uploaded file. Each element is an array of the operations in that file, in this order: accounts, transactions, manifests, and rewraps. When you decode a signed file returned by the cold vault, the first entry is the vault registration.
Each entry is the vault's protobuf message for that operation, converted to JSON field by field. The endpoint doesn't format values according to what they represent, and has no option to return decimal or hexadecimal values. To read the output:
- Field names are in snake_case, such as
seq_num, not the camelCase names used in the protobuf definitions. - A field that holds one of several options (a protobuf
oneof) is nested twice: under the field name, then under the name of the option that is set. For example, a transaction destination appears underdata, with one key that holds either an external address string or an internal account object. - Enumerations, such as the ledger or signing algorithm, are numbers, not names.
- An unset field is
null.
Read each value according to its protobuf type:
| Protobuf type | JSON form | How to read it |
|---|---|---|
Value | {"value": [1, 134, 160]} | An unsigned big-endian integer stored as bytes. null and {"value": []} both mean zero. What the integer represents depends on the ledger and the field. See Amounts. |
Bytes, and binary fields such as hashes, public keys, and signatures | Array of byte values, wrapped as {"value": [...]} for Bytes | Raw bytes. Convert to hexadecimal to compare with other tools. |
U32, U64, and other integer fields | Number, wrapped as {"value": 5} for U32 and U64 | Use as is. |
| Floating-point fields | Decimal number | Use as is. |
| Text fields | String | Use as is. |
Most amounts and fees are Value integers in the smallest unit of the asset. This applies to the transaction amount and fee fields, native XRP amounts (in drops), and Solana, Substrate, Cardano, and Tezos amounts.
The following amounts use a different encoding:
- XRPL issued tokens: the amount is a
Value, but it's a fixed-point decimal with 81 decimal places, not an integer in the smallest unit. Divide it by 1081. For example, 1 USD is encoded as 1081. - XRPL Multi-Purpose Tokens (MPTs): the amount is a
U64, so it's a number, not a byte array. - Canton: the transfer amount is a decimal string in whole units, for example
"42.0". - Bitcoin fee settings: the fee rate is a decimal number in satoshis per virtual byte. The change amount and dust limit are numbers in satoshis.
- Other ledger-specific settings, such as gas prices and budgets, fee limits, nonces, and chain IDs, are numbers.
For example, to convert values in Python:
from decimal import Decimal
def to_int(v):
return int.from_bytes(bytes(v["value"]), "big") if v else 0
to_int({"value": [1, 134, 160]}) # amount in smallest unit: 100000
Decimal(to_int(token_amount)).scaleb(-81) # XRPL issued token amount
bytes([222, 173, 190, 239]).hex() # binary data: 'deadbeef'The output contains 64-bit integers at full precision. Python's json module reads them exactly, but JavaScript and older versions of jq round integers larger than 253. Take this into account if you process the file with other tools.
For transactions, verify the destination address, amount, network, and fees before allowing the cold vault to sign.
Cold vault signing is a high-control operation. Decode and review the payload before signing, especially for transactions. Once a signed transaction is broadcast to the blockchain network, it cannot be recalled by Ripple Custody (Vault).
Upload the exported file to the cold bridge:
curl -X POST "{ColdBridgeURL}/v1/feed/upload" \
-F "files=@cold-vault-operations.dat"After upload, the vault processes the data from the cold bridge and signs the pending operations.
Call the cold bridge status endpoint:
curl -X GET "{ColdBridgeURL}/v1/feed/status"The response includes counters for unsigned and signed operations:
{
"accountToSign": 0,
"accountSigned": 0,
"transactionToSign": 0,
"transactionSigned": 0,
"manifestToSign": 0,
"manifestSigned": 0
}When the ToSign counters are zero, all pending operations in the uploaded payload have been signed.
Download the signed payload from the cold bridge:
curl -X GET "{ColdBridgeURL}/v1/feed/download?clean=false" \
--output signed-cold-vault-operations.datTransfer signed-cold-vault-operations.dat back to the online environment.
Import the signed payload into Ripple Custody (Vault) with Import signed operations:
curl -X POST "${CUSTODY_API_URL}/v1/vaults/operations/signed" \
-H "Authorization: Bearer ${JWT_TOKEN}" \
-F "files=@signed-cold-vault-operations.dat"After import, Ripple Custody (Vault) continues processing the account, transaction, or manifest.