Skip to main content

Wallet RPC

This document provides a comprehensive reference to Chia's Wallet RPC API (minus the DID and NFT RPCs, which are documented on their own dedicated pages).

Note about Windows command escaping

This document will use Linux/MacOS RPC syntax. When running rpc commands on Windows, you'll need to escape all quotes with backslashes.

For example, here is a typical RPC command on Linux and MacOS:

chia rpc wallet create_new_wallet '{"wallet_type": "nft_wallet"}'

To run the same command on Windows, you need to escape the quotes with backslashes. In other words, add a \ before each double quote, such that:

"fee" becomes \"fee\" "1000" becomes \"1000\" etc

Key management

add_key

Functionality: Create a new key (wallet/fingerprint) from a given mnemonic seed phrase

Usage: chia rpc wallet [OPTIONS] add_key [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
mnemonicTEXT ARRAYTrueA 24-word mnemonic seed phrase, expressed as an array
Example
chia rpc wallet add_key '{"mnemonic": ["hint", "dice", "session", "fun", "budget", "strong", "album", "lava", "tackle", "sudden", "garage", "people", "bundle", "federal", "chest", "process", "vicious", "behave", "nephew", "zero", "vital", "ocean", "artist", "lawsuit"]}'

Response:

{
"fingerprint": 874731676,
"success": true
}

check_delete_key

Functionality: Display whether a fingerprint has a balance, and whether it is used for farming or pool rewards. This is helpful when determining whether it is safe to delete a key without first backing it up

Usage: chia rpc wallet [OPTIONS] check_delete_key [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
fingerprintNUMBERTrueThe wallet's fingerprint, obtainable by running chia wallet show
max_ph_to_searchNUMBERFalseThe maximum number of puzzle hashes to search [Default: 100]
Example
chia rpc wallet check_delete_key '{"fingerprint": 874731676, "max_ph_to_search": 200}'

Response:

{
"fingerprint": 874731676,
"success": true,
"used_for_farmer_rewards": false,
"used_for_pool_rewards": false,
"wallet_balance": false
}

delete_all_keys

Functionality: Delete all keys from the wallet

Usage: chia rpc wallet [OPTIONS] delete_all_keys [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

warning

This will delete ALL keys without any further prompts. Prior to running this command, be sure to either verify that each key can be safely deleted by running check_delete_key, or back up each seed phrase for later recovery

Example
chia rpc wallet delete_all_keys

Response:

{
"success": true
}

delete_key

Functionality: Delete a key, based on its wallet fingerprint

Usage: chia rpc wallet [OPTIONS] delete_key [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
fingerprintNUMBERTrueThe wallet's fingerprint, obtainable by running chia wallet show
Example
chia rpc wallet delete_key '{"fingerprint": 874731676}'

Response:

{
"success": true
}

generate_mnemonic

Functionality: Generates a random 24-word mnemonic seed phrase

Usage: chia rpc wallet [OPTIONS] generate_mnemonic [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example
chia rpc wallet generate_mnemonic

Response:

{
"mnemonic": [
"hint",
"dice",
"session",
"fun",
"budget",
"strong",
"album",
"lava",
"tackle",
"sudden",
"garage",
"people",
"bundle",
"federal",
"chest",
"process",
"vicious",
"behave",
"nephew",
"zero",
"vital",
"ocean",
"artist",
"lawsuit"
],
"success": true
}

get_logged_in_fingerprint

Functionality: Obtain the fingerprint of the wallet that is currently logged in

Usage: chia rpc wallet [OPTIONS] get_logged_in_fingerprint [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example
chia rpc wallet get_logged_in_fingerprint

Response:

{
"fingerprint": 2818719465,
"success": true
}

get_private_key

Functionality: Show public and private info about a key

Usage: chia rpc wallet [OPTIONS] get_private_key [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
fingerprintNUMBERTrueThe wallet's fingerprint, obtainable by running chia wallet show
warning

This RPC will show the private key and seed phrase for the given fingerprint. Use with caution.

Example
chia rpc wallet get_private_key '{"fingerprint": 2473794447}'

Response:

{
"private_key": {
"farmer_pk": "8c65856685323f149a651e6cbe068ece36f87a84efa16246b0eef65ac586a30fb678878bd4364d52c432fbb77838cbf6",
"fingerprint": 2473794447,
"pk": "b73cf2471b10a7ba839616aff0ab1cb319d9d3a77ee26ff88ec1c8e645468eb0b7653518b85e5dd0df7cf50d8612b978",
"pool_pk": "845ff087376ffecf83950485d63ffed1cc73f36daf018deb4fbd2f05e7198b07521486274d82ecc4f5a2eaae63dfd0a7",
"seed": "arrest legend bounce attend rebel blade palace bean dry shell nice bubble coil cook token nerve visa december hero garment grid attend nerve certain",
"sk": "0665913196501420c0fe2de6b5ce7b25f749d52dcbf997b069bb2ea8438c6c3c"
},
"success": true
}

get_public_keys

Functionality: Show all public key fingerprints stored in the OS keyring. Note that the keyring must be unlocked in order to run this RPC

Usage: chia rpc wallet [OPTIONS] get_public_keys [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example
chia rpc wallet get_public_keys

Response:

{
"public_key_fingerprints": [2104826454, 3792481086, 2818719465, 2121994410],
"success": true
}

log_in

Functionality: Log into the wallet with the specified key

Usage: chia rpc wallet [OPTIONS] log_in [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
fingerprintNUMBERTrueThe wallet's fingerprint, obtainable by running chia wallet show
Example
chia rpc wallet log_in '{"fingerprint": 2818719465}'

Response:

{
"fingerprint": 2818719465,
"success": true
}

Wallet node

get_auto_claim

Functionality: Show the auto claim settings for all types of claims, including clawback

Usage: chia rpc wallet [OPTIONS] get_auto_claim [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Note that the auto claim settings are configurable in ~/.chia/mainnet/config/config.yaml in the auto_claim: section.

Example
chia rpc wallet get_auto_claim

Response:

{
"batch_size": 50,
"enabled": false,
"min_amount": 0,
"success": true,
"tx_fee": 0
}

get_height_info

Functionality: Show the block height to which the current wallet is synced

Usage: chia rpc wallet [OPTIONS] get_height_info [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example
chia rpc wallet get_height_info

Response:

{
"height": 2863319,
"success": true
}

get_network_info

Functionality: Show the current network (eg mainnet) and network prefix (eg XCH)

Usage: chia rpc wallet [OPTIONS] get_network_info [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example
chia rpc wallet get_network_info

Response:

{
"network_name": "mainnet",
"network_prefix": "xch",
"success": true
}

get_sync_status

Functionality: Show whether the current wallet is syncing or synced

Usage: chia rpc wallet [OPTIONS] get_sync_status [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example
chia rpc wallet get_sync_status

Response:

{
"genesis_initialized": true,
"success": true,
"synced": true,
"syncing": false
}

get_timestamp_for_height

Functionality: Show the timestamp for a given block height

Usage: chia rpc wallet [OPTIONS] get_timestamp_for_height [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
heightNUMBERTrueThe block height for which to retrieve the timestamp
Example

This example is from a testnet, so the timestamp won't match the equivalent call on mainnet:

chia rpc wallet get_timestamp_for_height '{"height": 2000000}'

Response:

{
"success": true,
"timestamp": 1672215722
}

push_transactions

Functionality: Push multiple transactions to the blockchain

Usage: chia rpc wallet [OPTIONS] push_transactions [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
transactionsTEXT ARRAYTrueA list of transactions to push
feeNUMBERFalseAdd a transaction fee (in mojos) for the entire request [Default: 0]
note

"success": true does not guarantee that the transaction will get confirmed. A transaction may be dropped from the mempool and not included if the fee is too low.


push_tx

Functionality: Push a spend bundle (transaction) to the blockchain

Usage: chia rpc wallet [OPTIONS] push_tx [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
spend_bundleTEXTTrueThe spend bundle (transaction) to push

set_auto_claim

Functionality: Set the auto claim settings for all types of claims, including clawback

Usage: chia rpc wallet [OPTIONS] set_auto_claim [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
enabledBOOLEANTRUESet to true to enable auto claim, or false to disable it
tx_feeNUMBERTRUEThe default transaction fee to be used for claims, in mojos
min_amountNUMBERTRUEThe minimum value, in mojos, of a claim to be included in the auto claim
batch_sizeNUMBERTRUEThe maximum number of claims to process in one spend bundle

If one or more flags is missing, this RPC will succeed and set the missing flag back to the default value.

Example

Start by obtaining a baseline:

chia rpc wallet get_auto_claim

Response:

{
"batch_size": 50,
"enabled": false,
"min_amount": 0,
"success": true,
"tx_fee": 0
}

Next, change all of these settings:

chia rpc wallet set_auto_claim '{"enabled": true, "tx_fee": 1, "min_amount": 1, "batch_size": 1}'

Response:

{
"batch_size": 1,
"enabled": true,
"min_amount": 1,
"success": true,
"tx_fee": 1
}

set_wallet_resync_on_startup

Functionality: Resync the current logged in wallet. The transaction and offer records will be kept

Usage: chia rpc wallet [OPTIONS] set_wallet_resync_on_startup [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
enableBOOLEANFalseSet to true to enable resync [Default: true]
Example
 chia rpc wallet set_wallet_resync_on_startup

Response:

{
"success": true
}

Wallet management

create_new_wallet

Functionality: Create a new wallet for CATs, DIDs, DAOs, NFTs, or pooling

Usage: chia rpc wallet [OPTIONS] create_new_wallet [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters (all wallet types):

FlagTypeRequiredDescription
wallet_typeSTRINGTrueThe type of wallet to create. Must be one of cat_wallet, did_wallet, dao_wallet, nft_wallet, or pool_wallet
feeNUMBERFalseAn optional blockchain fee, in mojos

cat_wallet Parameters:

FlagTypeRequiredDescription
modeSTRINGTrueMust be either new or existing
nameSTRINGFalseThe name of the wallet to create or modify [Default: CAT followed by the beginning of the CAT ID]
amountNUMBERTrue**Required if mode is new. Specify the value, in mojos, of this wallet
asset_idSTRINGTrue**Required if mode is existing. Specify the asset_id of the wallet to update
Example 1 (CAT wallet with name)

Create a new CAT wallet called test and send it 100 mojos:

chia rpc wallet create_new_wallet '{"wallet_type": "cat_wallet", "mode": "new", "name": "test", "amount": 100, "fee": 1}'

Response:

{
"asset_id": "1f9fd0d4a1221241df986f042e014c056571062c82a5ba9b88c866c92808e1a9",
"success": true,
"type": 6,
"wallet_id": 2
}

Show the new wallet:

chia wallet show

Response:

Wallet height: 2863496
Sync status: Synced
Balances, fingerprint: 874731676

Chia Wallet:
-Total Balance: 0.0009999999 xch (999999900 mojo)
-Pending Total Balance: 0.0009999999 xch (999999900 mojo)
-Spendable: 0.0009999999 xch (999999900 mojo)
-Type: STANDARD_WALLET
-Wallet ID: 1

test:
-Total Balance: 0.1 (100 mojo)
-Pending Total Balance: 0.1 (100 mojo)
-Spendable: 0.1 (100 mojo)
-Type: CAT
-Asset ID: 1f9fd0d4a1221241df986f042e014c056571062c82a5ba9b88c866c92808e1a9
-Wallet ID: 2
Example 2 (CAT wallet without name)

Create a new CAT wallet without specifying a name:

chia rpc wallet create_new_wallet '{"wallet_type": "cat_wallet", "mode": "new", "amount": 100, "fee": 1}'

Response:

{
"asset_id": "348dfae821c76f0a0f45fe84d757d5050d07fda83c68a9425c24de666479786f",
"success": true,
"type": 6,
"wallet_id": 3
}

Show the new wallet:

chia wallet show

Response:

Chia Wallet:
-Total Balance: 0.0009999998 xch (999999800 mojo)
-Pending Total Balance: 0.0009999998 xch (999999800 mojo)
-Spendable: 0.0009999998 xch (999999800 mojo)
-Type: STANDARD_WALLET
-Wallet ID: 1

test:
-Total Balance: 0.1 (100 mojo)
-Pending Total Balance: 0.1 (100 mojo)
-Spendable: 0.1 (100 mojo)
-Type: CAT
-Asset ID: 1f9fd0d4a1221241df986f042e014c056571062c82a5ba9b88c866c92808e1a9
-Wallet ID: 2

CAT 348dfae821c76f0a...:
-Total Balance: 0.1 (100 mojo)
-Pending Total Balance: 0.1 (100 mojo)
-Spendable: 0.1 (100 mojo)
-Type: CAT
-Asset ID: 348dfae821c76f0a0f45fe84d757d5050d07fda83c68a9425c24de666479786f
-Wallet ID: 3

did_wallet Parameters:

FlagTypeRequiredDescription
did_typeSTRINGTrueMust be either new or recovery. If recovery, then each of the following parameters will be ignored
backup_didsSTRING ARRAYTrue**Required if did_type is new. An array of backup DID IDs to be used for recovery. Must match actual DIDs
num_of_backup_ids_neededNUMBERTrue**Required if did_type is new. The number of backup DIDs required for recovery. Minimum value is 1, maximum value is the number of DIDs in backup_dids
metadataDICTFalseThe metadata of the DID
wallet_nameSTRINGFalseThe name of the DID wallet [Default: None]
amountNUMBERTrue**Required if did_type is new. Specify the initial value of this wallet, in mojos. Minimum value is 1

Note: Because backup_dids is required, you must already have access to a DID in order to run this RPC for a did_wallet. If you do not already have a DID, then run the CLI command to create a DID wallet instead.

Example 3 (DID wallet)

Create a new DID wallet with one backup DID:

chia rpc wallet create_new_wallet '{"wallet_type": "did_wallet", "did_type": "new", "amount": 1, "backup_dids": ["did:chia:13p5fdxgm8e2pngdwp8m088t0etp7rgzx9ye2ju8v5ackcyg7t9nqx2um83"], "num_of_backup_ids_needed": 1, "fee": 10000000}'

Response:

{
"my_did": "did:chia:1pzrm9dyhvu8hmqyzqmy0v3wyp7cn98jlxk49jv7mgkhvk229erhqmh6c2m",
"success": true,
"type": 8,
"wallet_id": 2
}

Show the newly created DID wallet:

chia wallet show

Response:

Wallet height: 1144662
Sync status: Synced
Balances, fingerprint: 455254876

Chia Wallet:
-Total Balance: 0.999999999999 txch (999999999999 mojo)
-Pending Total Balance: 0.999999999999 txch (999999999999 mojo)
-Spendable: 0.999999999999 txch (999999999999 mojo)
-Type: STANDARD_WALLET
-Wallet ID: 1

Profile 1:
-Total Balance: 1.0
-Pending Total Balance: 1.0
-Spendable: 1.0
-Type: DECENTRALIZED_ID
-DID ID: did:chia:1pzrm9dyhvu8hmqyzqmy0v3wyp7cn98jlxk49jv7mgkhvk229erhqmh6c2m
-Wallet ID: 2

dao_wallet Parameters:

FlagTypeRequiredDescription
modeSTRINGTrueMust be either new or existing
nameSTRINGFalseA name to give to the DAO new/existing wallet [Default: None]
dao_rulesJSON DICTTrue**Required if mode is new; this is a json dictionary of the new DAO's rules
amount_of_catsNUMBERFalse**Only used if mode is new; this is the number of DAO CATs (in mojos) to create when initializing the DAO [Default: 0]
filter-amountNUMBERFalseThe minimum number of votes a proposal needs before the wallet will recognise it [default: 1]
feeNUMBERFalse**Only used if mode is new; this is a blockchain fee to add to the transaction to create the DAO treasury [Default: 0]
fee_for_catNUMBERFalse**Only used if mode is new; this is a blockchain fee to add to the transaction to create the DAO CATs [Default: 0]
treasury_idSTRINGTrue**Required if mode is existing; this is the treasury ID of the DAO to join

Notes:

  • When mode is new, this RPC has a similar functionality to the create DAO CLI command.
  • When mode is existing, this RPC has a similar functionality to the add DAO CLI command.
Example 4 (New DAO wallet)

Create a new wallet with some basic DAO rules; also mint CATs and include transaction fees:

chia rpc wallet create_new_wallet '{"wallet_type": "dao_wallet", "mode": "new", "name": "My Dao Wallet", "dao_rules": {"attendance_required": 3000, "oracle_spend_delay": 2, "pass_percentage": 5000, "proposal_minimum_amount": 1000001, "proposal_timelock": 3, "self_destruct_length": 1, "soft_close_length": 2}, "amount_of_cats": 1000, "filter-amount": 1, "fee": 500000000, "fee_for_cat": 100000000}'

As a result, a new treasury will be created, along with a CAT wallet containing 1000 CATs, and a DAO CAT wallet:

{
"cat_wallet_id": 4,
"dao_cat_wallet_id": 5,
"success": true,
"treasury_id": "0x89fdd510ce617c0b78d7f997d6fe52737a8c57100cca73c9dc4957eaf7fe55dc",
"type": 14,
"wallet_id": 3
}
Example 5 (Join existing DAO)

To join a DAO, set mode to existing:

chia rpc wallet create_new_wallet '{"wallet_type": "dao_wallet", "mode": "existing", "name": "My Dao Wallet", "filter-amount": 1, "treasury_id": "0x89fdd510ce617c0b78d7f997d6fe52737a8c57100cca73c9dc4957eaf7fe55dc"}'

Your wallet will join the treasury and automatically create the required DAO, CAT, and DAO_CAT wallets without any balance:

{
"cat_wallet_id": 3,
"dao_cat_wallet_id": 4,
"success": true,
"treasury_id": "0x89fdd510ce617c0b78d7f997d6fe52737a8c57100cca73c9dc4957eaf7fe55dc",
"type": 14,
"wallet_id": 2
}

nft_wallet Parameters:

FlagTypeRequiredDescription
did_idSTRINGFalseAssociate a DID with the new NFT wallet
nameSTRINGFalseThe name of the wallet to create or modify [Default: NFT Wallet]
Example 6 (NFT wallet without DID)

Create a new NFT wallet that is not associated with a DID:

chia rpc wallet create_new_wallet '{"wallet_type": "nft_wallet", "fee": 1}'

Response:

{
"success": true,
"type": 10,
"wallet_id": 4
}
Example 7 (NFT wallet with DID)

Create an NFT wallet that is associated with a DID. First, create the DID:

chia wallet did create -n My_DID

Response:

Successfully created a DID wallet with name My_DID and id 5 on key 874731676
Successfully created a DID did:chia:1ypvxg7t327m4hsmgzrlhnuk4448nqc20crnnmzzd52lk7dvdza9s8qp8q6 in the newly created DID wallet

Next, create the NFT wallet, passing in the new DID ID:

chia rpc wallet create_new_wallet '{"wallet_type": "nft_wallet", "did_id": "did:chia:1ypvxg7t327m4hsmgzrlhnuk4448nqc20crnnmzzd52lk7dvdza9s8qp8q6", "name": "My NFT WAllet", "fee": 1}'

Response:

{
"success": true,
"type": 10,
"wallet_id": 6
}

pool_wallet Parameters:

FlagTypeRequiredDescription
modeSTRINGTrueMust be either new of recovery. However, recovery has not been implemented, so currently (version 1.6) it will automatically fail
initial_target_stateSTRINGTrueThis info should be sent from the daemon. PoolState is a type that is serialized to the blockchain to track the state of the user's pool singleton target_puzzle_hash is either the pool address, or the self-pooling address that pool rewards will be paid to. target_puzzle_hash is NOT the p2_singleton puzzle that block rewards are sent to. The p2_singleton address is the initial address, and the target_puzzle_hash is the final destination. relative_lock_height is zero when in SELF_POOLING state
p2_singleton_delayed_phSTRINGTrue**Required if mode is new. This is the puzzle hash to which payouts will go
p2_singleton_delay_timeINTEGERFalseThe time (in seconds) to delay payments [Default: None ]

get_wallets

Functionality: Show all wallets associated with the current fingerprint, including (by default) coin information

Usage: chia rpc wallet [OPTIONS] get_wallets [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
include_dataBOOLEANFalseSet to true to include all coin info for this wallet [Default: true]
typeINTEGERFalseThe type of wallet to retrieve. See below for valid types

Valid wallet types (the type parameter) include the following integers:

Nametype
STANDARD_WALLET0
ATOMIC_SWAP2
AUTHORIZED_PAYEE3
MULTI_SIG4
CUSTODY5
CAT6
RECOVERABLE7
DECENTRALIZED_ID8
POOLING_WALLET9
NFT10
DATA_LAYER11
DATA_LAYER_OFFER12
VC13

More types may be added in the future. See wallet_types.py for an up-to-date list of valid types.

Example 1

Get all info for all wallets:

chia rpc wallet get_wallets '{"include_data": false}'

Response:

{
"fingerprint": 874731676,
"success": true,
"wallets": [
{
"data": "",
"id": 1,
"name": "Chia Wallet",
"type": 0
}
]
}
Example 2

Get NFT wallet info (NFT type = 10):

chia rpc wallet get_wallets '{"type": 10}'

Response:

{
"fingerprint": 2104826454,
"success": true,
"wallets": [
{
"data": "{"did_id": "0xb08c01ace955ce180ce2e0b332b4c8d98d46469078e5191351f025d9cf9117f3"}",
"id": 3,
"name": "NFT Wallet",
"type": 10
},
{
"data": "{"did_id": null}",
"id": 4,
"name": "NFT Wallet",
"type": 10
}
]
}

Wallet

combine_coins

Functionality: Combine coins (typically used for combining dust). The maximum number of coins that can be combined within a single transaction is 500.

Usage: chia rpc wallet [OPTIONS] combine_coins [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idTEXTTrueThe wallet ID for the origin of the transaction
number_of_coinsINTEGERTrueThe number of coins to combine [Default: combine all coins, up to coin_num_limit]
largest_firstBOOLEANFalseSet to True to prioritize combining the largest coins first [Default: False]
target_coin_idsTEXT ARRAYFalseOnly combine these coins [Default: Disabled]
target_coin_amountINTEGERFalseSelect coins until this amount (in XCH or CAT) is reached. Combine all selected coins into one coin [Default: None]
coin_num_limitINTEGERFalseCombine up to this many coins [Default: 500]
feeINTEGERFalseAn optional blockchain fee, in mojos
warning

This RPC was introduced in version 2.4.4. In that version, the number_of_coins is mandatory. If you do not include this parameter, you will receive an error such as

Request failed: RPC response failure: {"error": "This should be impossible to hit and is just for < 3.10 compatibility", "success": false

This requirement will be removed in a future version of Chia.

info

If number_of_coins is used (as is the requirement in 2.4.4), it must be:

  • At least 2
  • At most coin_num_limit

If target_coin_ids is used, its length must not be larger than number_of_coins.

warning

It is not recommended to increase the value of coin_num_limit to a value higher than the default limit of 500 coins. Beyond this amount, it may be difficult to fit this transaction into a block, in which case the transaction could be stuck in the mempool for a long time.

Example 1

For this example, combine as many coins as are required until a target of 2 trillion mojos is reached. Include a blockchain fee of 25 million mojos:

chia rpc wallet combine_coins '{"wallet_id": 1, "target_coin_amount": 2000000000000, "number_of_coins": 2, "fee": 25000000}'

Response:

{
"success": true,
"transactions": [
{
"additions": [
{
"amount": 2000000000000,
"parent_coin_info": "0xce6aebc114e29636f89c8802dbfb90292fb6d1b219a48b96b9acff60bd074cb0",
"puzzle_hash": "0x07fb005e60a3f7a9b60db37378351ee638da4408a8af199e48f03401970b530a"
},
{
"amount": 1499975000000,
"parent_coin_info": "0xce6aebc114e29636f89c8802dbfb90292fb6d1b219a48b96b9acff60bd074cb0",
"puzzle_hash": "0x995a7a233a03264ab4dd39a35988c2dacbfee855a02fd7afa87bb7b5165a8d01"
}
],
"amount": 2000000000000,
"confirmed": false,
"confirmed_at_height": 0,
"created_at_time": 1729051793,
"fee_amount": 25000000,
"memos": {},
"name": "0xf70323c86ac3a4d0e6608aa14ce4a5e55876119670338d1b5c5012029ca0b129",
"removals": [
{
"amount": 1750000000000,
"parent_coin_info": "0x37a90eb5185a9c4439a91ddc98bbadce00000000000000000000000000073a96",
"puzzle_hash": "0x6c479d3f54b92f19461e75f2148c09424aedbaa14ad57e9b9a723f73e0220f7e"
},
{
"amount": 1750000000000,
"parent_coin_info": "0x37a90eb5185a9c4439a91ddc98bbadce00000000000000000000000000064729",
"puzzle_hash": "0x6c479d3f54b92f19461e75f2148c09424aedbaa14ad57e9b9a723f73e0220f7e"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": {
"aggregated_signature": "0x8ff23c4e47376574f3bd95d77b32b92d2f130cbc470220a700aba16a38ff43e1d3204714c267a1a662956170ed55a4f102a78be9b23ef82fe36bd6060f16c927710bf1c00753cbd5f50a833bfe388ed4f5b7b1f425b9dababdd4dc6143cccc2d",
"coin_spends": [
{
"coin": {
"amount": 1750000000000,
"parent_coin_info": "0x37a90eb5185a9c4439a91ddc98bbadce00000000000000000000000000073a96",
"puzzle_hash": "0x6c479d3f54b92f19461e75f2148c09424aedbaa14ad57e9b9a723f73e0220f7e"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b323951e45840af4678ca35f5c165448aa16f28f1ef2a36248ce95b07e0ca3e0fd34b994e8ededb388ffc42d562c15e7ff018080",
"solution": "0xff80ffff01ffff3cffa0d89fca1f312b007dbf754554df992ec65b4bde3f3fd32a5911427d8f27e5348380ffff33ffa007fb005e60a3f7a9b60db37378351ee638da4408a8af199e48f03401970b530aff8601d1a94a200080ffff33ffa0995a7a233a03264ab4dd39a35988c2dacbfee855a02fd7afa87bb7b5165a8d01ff86015d3d7a1fc080ffff34ff84017d78408080ff8080"
},
{
"coin": {
"amount": 1750000000000,
"parent_coin_info": "0x37a90eb5185a9c4439a91ddc98bbadce00000000000000000000000000064729",
"puzzle_hash": "0x6c479d3f54b92f19461e75f2148c09424aedbaa14ad57e9b9a723f73e0220f7e"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b323951e45840af4678ca35f5c165448aa16f28f1ef2a36248ce95b07e0ca3e0fd34b994e8ededb388ffc42d562c15e7ff018080",
"solution": "0xff80ffff01ffff3dffa0d69deaf403b27a05db5de7d7d806851a4c2c366970d0525eeaa0cceb68db54c98080ff8080"
}
]
},
"to_address": "txch1qlasqhnq50m6ndsdkdehsdg7ucud53qg4zh3n8jg7q6qr9ct2v9q502alx",
"to_puzzle_hash": "0x07fb005e60a3f7a9b60db37378351ee638da4408a8af199e48f03401970b530a",
"trade_id": null,
"type": 1,
"valid_times": {
"max_blocks_after_created": null,
"max_height": null,
"max_secs_after_created": null,
"max_time": null,
"min_blocks_since_created": null,
"min_height": null,
"min_secs_since_created": null,
"min_time": null
},
"wallet_id": 1
}
],
"unsigned_transactions": [
{
"signing_instructions": {
"key_hints": {
"path_hints": [
{
"path": [12381, 8444, 2, 2],
"root_fingerprint": "0xbd7ea085"
},
{
"path": [12381, 8444, 2, 2],
"root_fingerprint": "0xbd7ea085"
}
],
"sum_hints": [
{
"final_pubkey": "0xb323951e45840af4678ca35f5c165448aa16f28f1ef2a36248ce95b07e0ca3e0fd34b994e8ededb388ffc42d562c15e7",
"fingerprints": ["0xd6ec6f98"],
"synthetic_offset": "0x62466ba455dba328aa65267cd279ac1166dfc3235ec42401b0d3a31e2e2560ef"
},
{
"final_pubkey": "0xb323951e45840af4678ca35f5c165448aa16f28f1ef2a36248ce95b07e0ca3e0fd34b994e8ededb388ffc42d562c15e7",
"fingerprints": ["0xd6ec6f98"],
"synthetic_offset": "0x62466ba455dba328aa65267cd279ac1166dfc3235ec42401b0d3a31e2e2560ef"
}
]
},
"targets": [
{
"fingerprint": "0xef8ee89b",
"hook": "0x6f9091ee790a5f0bdd0f0e195eb725b8f9f7c90b2babdf12f9f38e7c1ef8ec3f",
"message": "0x19d169826bbb058b178cc88eb66903744c0dcbbf95a0da5ba08ebe900e0bf5b9ce6aebc114e29636f89c8802dbfb90292fb6d1b219a48b96b9acff60bd074cb037a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615"
},
{
"fingerprint": "0xef8ee89b",
"hook": "0xd1ffd65d4bcbc7806e5e8c4c8f1ca371f59755941e869d8efdaf1f9b7aafe204",
"message": "0xc29e05735d405a2c09b3702205ac6c7c0c0c1549c4bd33b450b95b577399714cfa4f4c7c2b8cfa8fd0d8319a59f95a9fd19e459049f96571672854459298a52337a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615"
}
]
},
"transaction_info": {
"spends": [
{
"coin": {
"amount": 1750000000000,
"parent_coin_id": "0x37a90eb5185a9c4439a91ddc98bbadce00000000000000000000000000073a96",
"puzzle_hash": "0x6c479d3f54b92f19461e75f2148c09424aedbaa14ad57e9b9a723f73e0220f7e"
},
"puzzle": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b323951e45840af4678ca35f5c165448aa16f28f1ef2a36248ce95b07e0ca3e0fd34b994e8ededb388ffc42d562c15e7ff018080",
"solution": "0xff80ffff01ffff3cffa0d89fca1f312b007dbf754554df992ec65b4bde3f3fd32a5911427d8f27e5348380ffff33ffa007fb005e60a3f7a9b60db37378351ee638da4408a8af199e48f03401970b530aff8601d1a94a200080ffff33ffa0995a7a233a03264ab4dd39a35988c2dacbfee855a02fd7afa87bb7b5165a8d01ff86015d3d7a1fc080ffff34ff84017d78408080ff8080"
},
{
"coin": {
"amount": 1750000000000,
"parent_coin_id": "0x37a90eb5185a9c4439a91ddc98bbadce00000000000000000000000000064729",
"puzzle_hash": "0x6c479d3f54b92f19461e75f2148c09424aedbaa14ad57e9b9a723f73e0220f7e"
},
"puzzle": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b323951e45840af4678ca35f5c165448aa16f28f1ef2a36248ce95b07e0ca3e0fd34b994e8ededb388ffc42d562c15e7ff018080",
"solution": "0xff80ffff01ffff3dffa0d69deaf403b27a05db5de7d7d806851a4c2c366970d0525eeaa0cceb68db54c98080ff8080"
}
]
}
}
]
}
Example 2

First, list some coins to combine. The following command will list all coins in the wallet. (It is also possible to obtain a more nuanced listing by running the list command):

chia rpc wallet get_coin_records

Response (truncated):

{
{
"amount": 749996911173,
"coinbase": false,
"confirmed_height": 1472824,
"id": "0x067919e0dacb16541141acab9128b321b06325f14683f953acb30719c04db5b3",
"metadata": null,
"parent_coin_info": "0x9430666326f06c68a05e1714550181ba81edf88c142a955f65a9f33b8d0adaf4",
"puzzle_hash": "0x338860ddc5bdb23266884c827261913d7b01b349d511f1d084b983041b37f7b7",
"spent_height": 0,
"type": 0,
"wallet_identifier": {
"id": 1,
"type": 0
}
},
{
"amount": 749900000000,
"coinbase": false,
"confirmed_height": 1476378,
"id": "0x535899f5466073d26cab78b48313887a74a368112dd75f23f44837cb9fdde672",
"metadata": null,
"parent_coin_info": "0x7bf7cda4bbde8a105f19705f6bb8adcf67b4b9e70b13dbd616858de8a874531c",
"puzzle_hash": "0xed82e472025b0463f75ccf9958d8149249c7530d33d54d9f6cee72208b0da095",
"spent_height": 0,
"type": 0,
"wallet_identifier": {
"id": 1,
"type": 0
}
}
],
"success": true,
"total_count": null
}

Next, combine these coins, including an optional blockchain fee:

chia rpc wallet combine_coins '{"wallet_id": 1, "target_coin_ids": ["0x067919e0dacb16541141acab9128b321b06325f14683f953acb30719c04db5b3", "0x535899f5466073d26cab78b48313887a74a368112dd75f23f44837cb9fdde672"], "number_of_coins": 2, "fee": 25000000}'

Response:

{
"success": true,
"transactions": [
{
"additions": [
{
"amount": 1499871911173,
"parent_coin_info": "0x535899f5466073d26cab78b48313887a74a368112dd75f23f44837cb9fdde672",
"puzzle_hash": "0x995a7a233a03264ab4dd39a35988c2dacbfee855a02fd7afa87bb7b5165a8d01"
}
],
"amount": 1499871911173,
"confirmed": false,
"confirmed_at_height": 0,
"created_at_time": 1729056595,
"fee_amount": 25000000,
"memos": {},
"name": "0xb9fd063d9f5f036614fc63ddea0e80692133ec002511adb275de3ef519676016",
"removals": [
{
"amount": 749900000000,
"parent_coin_info": "0x7bf7cda4bbde8a105f19705f6bb8adcf67b4b9e70b13dbd616858de8a874531c",
"puzzle_hash": "0xed82e472025b0463f75ccf9958d8149249c7530d33d54d9f6cee72208b0da095"
},
{
"amount": 749996911173,
"parent_coin_info": "0x9430666326f06c68a05e1714550181ba81edf88c142a955f65a9f33b8d0adaf4",
"puzzle_hash": "0x338860ddc5bdb23266884c827261913d7b01b349d511f1d084b983041b37f7b7"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": {
"aggregated_signature": "0x9201f05d60390fa174d06ed47de17f88ce5545e6d7f3fe9b545f6575e1eccadabe241f86d60e723c7d8e4d9f86b3cce701407b364734b37ebec86ccdc320dfdd4c7a307f223104b11317d7468454a060217e8c58c4497b51cf3550ce8159498a",
"coin_spends": [
{
"coin": {
"amount": 749900000000,
"parent_coin_info": "0x7bf7cda4bbde8a105f19705f6bb8adcf67b4b9e70b13dbd616858de8a874531c",
"puzzle_hash": "0xed82e472025b0463f75ccf9958d8149249c7530d33d54d9f6cee72208b0da095"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0a9bb633b5e2bae69050559cc4d73b00fb70dc799212a2a85a58197db494961904db6920255458853c69e1541261d30eaff018080",
"solution": "0xff80ffff01ffff3cffa08bdb9e90270132820a0df9be7d8cac26ef7f7915945c9ead1db419101279c78d80ffff33ffa0995a7a233a03264ab4dd39a35988c2dacbfee855a02fd7afa87bb7b5165a8d01ff86015d37551d0580ffff34ff84017d78408080ff8080"
},
{
"coin": {
"amount": 749996911173,
"parent_coin_info": "0x9430666326f06c68a05e1714550181ba81edf88c142a955f65a9f33b8d0adaf4",
"puzzle_hash": "0x338860ddc5bdb23266884c827261913d7b01b349d511f1d084b983041b37f7b7"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0873ff760e5ce9f0d95e886534ba2a2ca270ccbd8592e321be783f9a61bcabc11cbbaaf1b9bd3363382bfb99587bd7d96ff018080",
"solution": "0xff80ffff01ffff3dffa01981ce537fda696b952fae321d45a2e208f78ef0b64f45ce2780b62eca36d9028080ff8080"
}
]
},
"to_address": "txch1n9d85ge6qvny4dxa8x34nzxzmt9la6z45qha0tag0wmm29j635qsqqjv8x",
"to_puzzle_hash": "0x995a7a233a03264ab4dd39a35988c2dacbfee855a02fd7afa87bb7b5165a8d01",
"trade_id": null,
"type": 1,
"valid_times": {
"max_blocks_after_created": null,
"max_height": null,
"max_secs_after_created": null,
"max_time": null,
"min_blocks_since_created": null,
"min_height": null,
"min_secs_since_created": null,
"min_time": null
},
"wallet_id": 1
}
],
"unsigned_transactions": [
{
"signing_instructions": {
"key_hints": {
"path_hints": [
{
"path": [12381, 8444, 2, 130],
"root_fingerprint": "0xbd7ea085"
},
{
"path": [12381, 8444, 2, 129],
"root_fingerprint": "0xbd7ea085"
}
],
"sum_hints": [
{
"final_pubkey": "0xa9bb633b5e2bae69050559cc4d73b00fb70dc799212a2a85a58197db494961904db6920255458853c69e1541261d30ea",
"fingerprints": ["0xbef0af90"],
"synthetic_offset": "0x60dc1ea2a3afd38a8b1867cc94048e1c14c76eb78980cb1a6b369e144ca6d9c4"
},
{
"final_pubkey": "0x873ff760e5ce9f0d95e886534ba2a2ca270ccbd8592e321be783f9a61bcabc11cbbaaf1b9bd3363382bfb99587bd7d96",
"fingerprints": ["0x47dc97ec"],
"synthetic_offset": "0x6405f8cd2c7c8556d8535392ee94ea27e5a2e25590083160bd073febdef940c4"
}
]
},
"targets": [
{
"fingerprint": "0x378e2d58",
"hook": "0x2f47b6231d4dae6682e77e49c3ae5e530cd4a91e379b3bf127a3f28c257727fd",
"message": "0xd239320b4737281e46ed7f6252ecc69d988e8d2e0e5f4bd93319fe5840c464d7535899f5466073d26cab78b48313887a74a368112dd75f23f44837cb9fdde67237a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615"
},
{
"fingerprint": "0x68970b70",
"hook": "0x96eb4015b002d0e99036c110f58506844080180e8acf59761b79dda30a64b0d3",
"message": "0x9745f4a78a3f47ab1198a7c1d5e02c7bea6547fe23d96fe1b6eeca50c82b152c067919e0dacb16541141acab9128b321b06325f14683f953acb30719c04db5b337a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615"
}
]
},
"transaction_info": {
"spends": [
{
"coin": {
"amount": 749900000000,
"parent_coin_id": "0x7bf7cda4bbde8a105f19705f6bb8adcf67b4b9e70b13dbd616858de8a874531c",
"puzzle_hash": "0xed82e472025b0463f75ccf9958d8149249c7530d33d54d9f6cee72208b0da095"
},
"puzzle": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0a9bb633b5e2bae69050559cc4d73b00fb70dc799212a2a85a58197db494961904db6920255458853c69e1541261d30eaff018080",
"solution": "0xff80ffff01ffff3cffa08bdb9e90270132820a0df9be7d8cac26ef7f7915945c9ead1db419101279c78d80ffff33ffa0995a7a233a03264ab4dd39a35988c2dacbfee855a02fd7afa87bb7b5165a8d01ff86015d37551d0580ffff34ff84017d78408080ff8080"
},
{
"coin": {
"amount": 749996911173,
"parent_coin_id": "0x9430666326f06c68a05e1714550181ba81edf88c142a955f65a9f33b8d0adaf4",
"puzzle_hash": "0x338860ddc5bdb23266884c827261913d7b01b349d511f1d084b983041b37f7b7"
},
"puzzle": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0873ff760e5ce9f0d95e886534ba2a2ca270ccbd8592e321be783f9a61bcabc11cbbaaf1b9bd3363382bfb99587bd7d96ff018080",
"solution": "0xff80ffff01ffff3dffa01981ce537fda696b952fae321d45a2e208f78ef0b64f45ce2780b62eca36d9028080ff8080"
}
]
}
}
]
}

create_signed_transaction

Functionality: Create a signed transaction from the given wallet

Usage: chia rpc wallet [OPTIONS] create_signed_transaction [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idTEXTTrueThe wallet ID for the origin of the transaction
additionsTEXT ARRAYTrueA list of puzzle hashes and amounts to be included
min_coin_amountNUMBERFalseThe minimum coin amount to send [Default: 0]
max_coin_amountNUMBERFalseThe maximum coin amount to send [Default: 0]
exclude_coin_amountsNUMBER ARRAYFalseA list of coin amounts to exclude
coinsTEXT ARRAYTrueA list of coins to include
exclude_coinsTEXT ARRAYTrueA list of coins to exclude
coin_announcementsTEXT ARRAYFalseA list of coin announcements, which includes coin_id, message, and morph_bytes
puzzle_announcementsTEXT ARRAYFalseA list of puzzle announcements, which includes puzzle_hash, message, and morph_bytes
feeNUMBERFalseAn optional blockchain fee, in mojos

delete_notifications

Functionality: Delete notifications, with the option to specify IDs from which to delete

Usage: chia rpc wallet [OPTIONS] delete_notifications [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileTEXTFalseInstead of REQUEST, provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

ParameterRequiredDescription
idsFalseSet to delete notifications only from the specified IDs. [Default: delete from all IDs]
Example
chia rpc wallet delete_notifications

Response:

{
"success": true
}

delete_unconfirmed_transactions

Functionality: Delete all transactions that have yet to be confirmed on the blockchain from the given wallet

Usage: chia rpc wallet [OPTIONS] delete_unconfirmed_transactions [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idNUMBERTrueThe ID of the wallet from which to delete transactions
Example
chia rpc wallet delete_unconfirmed_transactions '{"wallet_id": 2}'

Response:

{
"success": true
}

extend_derivation_index

Functionality: Increase the derivation index

Usage: chia rpc wallet [OPTIONS] extend_derivation_index [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
indexNUMBERTrueThe new derivation index. Must be larger than the previous index

Note: The derivation index is the minimum number of addresses the wallet will examine. It's not possible to decrease this number.

Example
chia rpc wallet extend_derivation_index '{"index": 436}'

Response:

{
"index": 436,
"success": true
}

get_coin_records

Functionality: Obtain all coin records for the current wallet

Usage: chia rpc wallet [OPTIONS] get_coin_records [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

None

Example
chia rpc wallet get_coin_records

Response:

{
"coin_records": [
{
"amount": 100,
"coinbase": false,
"confirmed_height": 3879053,
"id": "0x8c8518c23670a37287063951761e6f23348918b887762d9a8fc7f2217bd44c04",
"metadata": null,
"parent_coin_info": "0x6b17387014afbdc661bec74438cc49e44889861b5ddd13ae2113807e82f9df08",
"puzzle_hash": "0x59714c1cebe4a747bb90b607bce5cc589df6b612ee7f742c79f6d070a50e9083",
"spent_height": 0,
"type": 0,
"wallet_identifier": {
"id": 1,
"type": 0
}
}
],
"success": true,
"total_count": null
}

get_coin_records_by_names

Functionality: Obtain coin records from a list of coin names

Usage: chia rpc wallet [OPTIONS] get_coin_records_by_names [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
namesTEXT ARRAYTrueA list of coin names from which to retrieve records
start_heightNUMBERFalseThe block height at which to start the query
end_heightNUMBERFalseThe block height at which to end the query
include_spent_coinsBOOLEANFalseInclude spent coins in the result [Default: false]
Example
chia rpc wallet get_coin_records_by_names '{"names": ["0xeb17e80fcb72f15bfb28924f0bcd684df626646dca282bc88098cb0d59ffe1bb"]}'

Response:

{
"coin_records": [
{
"coin": {
"amount": 999996796,
"parent_coin_info": "0xfecaf9d1cffe1b71f00aee7816ea90562b18307d4461757e23f097703340beb7",
"puzzle_hash": "0x138373343443d3cdf6bd033244f32d904dd93e1ad2772f120955c0d8d761b722"
},
"coinbase": false,
"confirmed_block_index": 2867783,
"spent_block_index": 0,
"timestamp": 1669261898
}
],
"success": true
}

get_current_derivation_index

Functionality: Obtain the current derivation index for the current wallet

Usage: chia rpc wallet [OPTIONS] get_current_derivation_index [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example
chia rpc wallet get_current_derivation_index

Response:

{
"index": 435,
"success": true
}

get_farmed_amount

Functionality: Show the total amount that has been farmed

Usage: chia rpc wallet [OPTIONS] get_farmed_amount [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example
chia rpc wallet get_farmed_amount

Response:

{
"farmed_amount": 0,
"farmer_reward_amount": 0,
"fee_amount": 0,
"last_height_farmed": 0,
"pool_reward_amount": 0,
"success": true
}

get_next_address

Functionality: Get the next address in the HD tree, with the option to show the latest address

Usage: chia rpc wallet [OPTIONS] get_next_address [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idTEXTTrueThe ID of the wallet from which to obtain the next address
new_addressBOOLEANTrueIf true, then create a new address, else display the latest existing address
Example
chia rpc wallet get_next_address '{"wallet_id": 2, "new_address": false}'

Response:

{
"address": "xch1jxe8yfq8xem0e8ty5dq9hp86ududys96n6ugy2q4fextr0pplw9qwpfru9",
"success": true,
"wallet_id": 2
}

get_notifications

Functionality: Obtain current notifications

Usage: chia rpc wallet [OPTIONS] get_notifications [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileTEXTFalseInstead of REQUEST, provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

ParameterRequiredDescription
idsFalseSet to receive notifications only from the specified IDs. [Default: receive from all IDs]
startFalseThe number corresponding to the first notification to list. [Default: the first notification]
endFalseThe number corresponding to the last notification to list. [Default: the last notification]
Example

If no parameters are set, then all notifications will be listed from all IDs:

chia rpc wallet get_notifications

Response:

{
"notifications": [
{
"amount": 10000000,
"id": "f74fb363fbdeef3f6bcf7a0664a8ef76ea3e5f22bb4ffc9a1f9ef23b9329ae28",
"message": "fadedcab"
}
],
"success": true
}

get_spendable_coins

Functionality: Get all spendable coins, with various possible filters

Usage: chia rpc wallet [OPTIONS] get_spendable_coins [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idNUMBERTrueThe ID of the wallet from which to display coins
min_coin_amountNUMBERFalseThe smallest coin to be selected in this query [Default: No minimum]
max_coin_amountNUMBERFalseThe largest coin to be selected in this query [Default: No maximum]
excluded_coin_amountsNUMBER ARRAYFalseA list of coin amounts to exclude
excluded_coinsTEXT ARRAYFalseA list of coins to exclude
excluded_coin_idsTEXT ARRAYFalseA list of coin IDs to exclude
Example

List all unspent coins from wallet 1:

chia rpc wallet get_spendable_coins '{"wallet_id": 1}'

Response:

{
"confirmed_records": [
{
"coin": {
"amount": 999996796,
"parent_coin_info": "0xfecaf9d1cffe1b71f00aee7816ea90562b18307d4461757e23f097703340beb7",
"puzzle_hash": "0x138373343443d3cdf6bd033244f32d904dd93e1ad2772f120955c0d8d761b722"
},
"coinbase": false,
"confirmed_block_index": 2867783,
"spent_block_index": 0,
"timestamp": 1669261898
}
],
"success": true,
"unconfirmed_additions": [],
"unconfirmed_removals": []
}

get_transaction

Functionality: Get a transaction's details from its ID

Usage: chia rpc wallet [OPTIONS] get_transaction [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
transaction_idTEXTTrueThe ID of the transaction to obtain. This is listed as name in the output of the get_transactions RPC
Details

Notes about transactions The transaction history is not deterministic due to heuristics we use to counter privacy features of the blockchain. This means, a couple of details cannot be fetched fully:

  • The transaction IDs can and will change if you resync the wallet
  • Transactions of assets other than xch (cat, nft, ...) which include a fee will cause a second fee-transaction in the xch currency wallet (wallet 1)
  • Offers are split into multiple transactions on the corresponding wallets
  • Transactions of one Offer do not share the same id`s. To match them up, it is best to keep the offer files
  • The transaction time is a rough estimate. When an offer is accepted, the individual transactions of one offer can/will have slightly differing transaction times
  • For your offers which were accepted by a 3rd Party , the incoming coins are being marked as incoming transaction, not as incoming trade
  • When cancelling offers, the cancellation Transactions are being shown as transaction, not as trade For accurate records, you should keep a local record of transactions (TXs) and the Offer files made.
Example
chia rpc wallet get_transaction '{"transaction_id": "0x43f6811a4daf18622fc7f132f5166a1246056b4a983b7befccb7e4b2e2c57f3b"}'

Response:

{
"success": true,
"transaction": {
"additions": [
{
"amount": 100,
"parent_coin_info": "0xabbb6c6859db74e8e627f21263c078893383131bcf22faec68b2de914d03e59f",
"puzzle_hash": "0xb4a41bbce457745b006181ab99e34a0cbd8c83c196bc74fc98eb3aec882ed784"
}
],
"amount": 100,
"confirmed": true,
"confirmed_at_height": 2863494,
"created_at_time": 1669182237,
"fee_amount": 0,
"memos": {},
"name": "0x43f6811a4daf18622fc7f132f5166a1246056b4a983b7befccb7e4b2e2c57f3b",
"removals": [
{
"amount": 100,
"parent_coin_info": "0x9c0083d8da8733c899787e4dcf18a56bc944f49ed668808e20890f01cbc35f37",
"puzzle_hash": "0xb4a41bbce457745b006181ab99e34a0cbd8c83c196bc74fc98eb3aec882ed784"
}
],
"sent": 10,
"sent_to": [],
"spend_bundle": null,
"to_address": "xch1kmk3jx30sqv57j07x05mjf2xgt9fgthzslaweg4yta9edfwqsadqagh96h",
"to_puzzle_hash": "0xb6ed191a2f80194f49fe33e9b9254642ca942ee287faeca2a45f4b96a5c0875a",
"trade_id": null,
"type": 0,
"wallet_id": 2
},
"transaction_id": "0x43f6811a4daf18622fc7f132f5166a1246056b4a983b7befccb7e4b2e2c57f3b"
}

get_transactions

Functionality: Get all transactions for a given wallet

Usage: chia rpc wallet [OPTIONS] get_transactions [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idNUMBERTrueThe Wallet ID of the wallet from which to obtain transactions
startNUMBERFalseThe sequence number of the first transaction to show [Default: 0]
endNUMBERFalseThe sequence number of the last transaction to show [Default: 50]
sort_keyNUMBERFalseSpecify the key for sorting, sort_keys members [Default: confirmed_at_height]
reverseBOOLEANFalseSet to true to sort the results in reverse order [Default: false]
to_addressSTRINGFalseOnly include transactions with this to_address [Default: None]
Details

Notes about transactions By default, the function lists the oldest transactions first. This is recommended for building a transaction history due to pagination. If reverse is set to true, it lists the newest transactions first. This is most useful for fetching recent transactions.

The transaction history is not deterministic due to heuristics we use to counter privacy features of the blockchain. This means, a couple of details cannot be fetched fully:

  • The transaction IDs can and will change if you resync the wallet
  • Transactions of assets other than xch (cat, nft, ...) which include a fee will cause a second fee-transaction in the xch currency wallet (wallet 1)
  • Offers are split into multiple transactions on the corresponding wallets
  • Transactions of one Offer do not share the same id`s. To match them up, it is best to keep the offer files
  • The transaction time is a rough estimate. When an offer is accepted, the individual transactions of one offer can/will have slightly differing transaction times
  • For your offers which were accepted by a 3rd Party , the incoming coins are being marked as incoming transaction, not as incoming trade
  • When cancelling offers, the cancellation Transactions are being shown as transaction, not as trade For accurate records, you should keep a local record of transactions (TXs) and the Offer files made.
Example 1: List a single XCH transaction

Start by listing all wallets associated with the currently synced fingerprint:

chia rpc wallet get_wallets

Response:

{
"fingerprint": 2104826454,
"success": true,
"wallets": [
{
"data": "",
"id": 1,
"name": "Chia Wallet",
"type": 0
},
{
"data": "{\"did_id\": null}",
"id": 2,
"name": "NFT Wallet",
"type": 10
},
{
"data": "{\"did_id\": \"0xb08c01ace955ce180ce2e0b332b4c8d98d46469078e5191351f025d9cf9117f3\"}",
"id": 4,
"name": "NFT Wallet",
"type": 10
},
{
"data": "",
"id": 5,
"name": "DataLayer Wallet",
"type": 11
},
{
"data": "f17f88130c63522821f1a75466849354eee69c414c774bd9f3873ab643e9574d00",
"id": 6,
"name": "CAT f17f88130c635228...",
"type": 6
},
{
"data": "aaee6b63bcbc4aef0a005d31119ad65e5228b0ddff18c5c563fd7a4db54fb08400",
"id": 7,
"name": "CAT aaee6b63bcbc4aef...",
"type": 6
},
{
"data": "",
"id": 11,
"name": "Pool wallet",
"type": 9
}
]
}

In this case, we are interested in the Chia Wallet, of type 0. This has an id of 1.

Next, list only the transaction from that wallet with an index of 3:

chia rpc wallet get_transactions '{"wallet_id": 1, "start": 3, "end": 4}'
{
"success": true,
"transactions": [
{
"additions": [
{
"amount": 999999999,
"parent_coin_info": "0x4346c6f866ce790ef0c48c5afe472751a9f09ee926a1bb60cb4cb6ab7c845377",
"puzzle_hash": "0xe4c9f6dd30498ae0e19d9bdba2eeaa54296d91a5b8ccbb4b9b748034f9525253"
},
{
"amount": 1,
"parent_coin_info": "0x4346c6f866ce790ef0c48c5afe472751a9f09ee926a1bb60cb4cb6ab7c845377",
"puzzle_hash": "0xeff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9"
}
],
"amount": 1,
"confirmed": true,
"confirmed_at_height": 1688205,
"created_at_time": 1666232735,
"fee_amount": 0,
"memos": {},
"name": "0x8d1a6db10aa69a8aceff700596bfd736b87a133d73e394c15c13152633e729d0",
"removals": [
{
"amount": 1000000000,
"parent_coin_info": "0x73336c365fdcae474f672b0f35950369fb12b1dac0289aa2f5b702e731098447",
"puzzle_hash": "0x3377e81d20ad9a3028ffe7e77360c03df48c412f2525aac58035738888adb83d"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": null,
"to_address": "txch1alc82gjf2psvqehkdue2es480caruum6e296afx35e82fnwp8k5shty4cp",
"to_puzzle_hash": "0xeff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9",
"trade_id": null,
"type": 1,
"wallet_id": 1
}
],
"wallet_id": 1
}
Example 2: List all transactions for a CAT

Start by listing all wallets associated with the currently synced fingerprint:

chia rpc wallet get_wallets

Response:

{
"fingerprint": 2104826454,
"success": true,
"wallets": [
{
"data": "",
"id": 1,
"name": "Chia Wallet",
"type": 0
},
{
"data": "{\"did_id\": null}",
"id": 2,
"name": "NFT Wallet",
"type": 10
},
{
"data": "{\"did_id\": \"0xb08c01ace955ce180ce2e0b332b4c8d98d46469078e5191351f025d9cf9117f3\"}",
"id": 4,
"name": "NFT Wallet",
"type": 10
},
{
"data": "",
"id": 5,
"name": "DataLayer Wallet",
"type": 11
},
{
"data": "f17f88130c63522821f1a75466849354eee69c414c774bd9f3873ab643e9574d00",
"id": 6,
"name": "CAT f17f88130c635228...",
"type": 6
},
{
"data": "aaee6b63bcbc4aef0a005d31119ad65e5228b0ddff18c5c563fd7a4db54fb08400",
"id": 7,
"name": "CAT aaee6b63bcbc4aef...",
"type": 6
},
{
"data": "",
"id": 11,
"name": "Pool wallet",
"type": 9
}
]
}

For this example, we'll use the wallet with ID 7. This wallet is type 6 (CAT):

chia rpc wallet get_transactions '{"wallet_id": 7}'

Response:

{
"success": true,
"transactions": [
{
"additions": [
{
"amount": 10000,
"parent_coin_info": "0x5104073950bccd17a7ea57ca9f13c5546f88a048e3165069d0e255d3018faeed",
"puzzle_hash": "0x5e5073dab71209426358624462fac281431f87571ad40009d7ec731784154a1c"
}
],
"amount": 10000,
"confirmed": true,
"confirmed_at_height": 1932515,
"created_at_time": 1670949639,
"fee_amount": 0,
"memos": {},
"name": "0x38306b461975741641d397330bb34c01681bb242119bd4aa457c06e2080cf257",
"removals": [],
"sent": 0,
"sent_to": [],
"spend_bundle": null,
"to_address": "txch1stn20rhgmh5wvmyyfj2etdpdp73fla0ga4ymtsejz600dszf392s58kx2s",
"to_puzzle_hash": "0x82e6a78ee8dde8e66c844c9595b42d0fa29ff5e8ed49b5c332169ef6c0498955",
"trade_id": null,
"type": 0,
"wallet_id": 7
}
],
"wallet_id": 7
}

get_transaction_count

Functionality: Obtain the number of transactions for a wallet

Usage: chia rpc wallet [OPTIONS] get_transaction_count [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idTEXTTrueThe wallet ID from which to obtain the transaction count
Example
chia rpc wallet get_transaction_count '{"wallet_id": 2}'

Response:

{
"count": 2,
"success": true,
"wallet_id": 2
}

get_transaction_memo

Functionality: Obtain the memo for the specified transaction

Usage: chia rpc wallet [OPTIONS] get_transaction_memo [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileTEXTFalseInstead of REQUEST, provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

ParameterTYPERequiredDescription
transaction_idSTRINGTrueThe ID of the transaction for which to retrieve the memo
Example
chia rpc wallet get_transaction_memo '{"transaction_id": "0x21899b89bf36154e44c2277e9bfb6cff0574d7e9df4e100b782b03ab2476e171"}'

Response:

{
"21899b89bf36154e44c2277e9bfb6cff0574d7e9df4e100b782b03ab2476e171": {
"21899b89bf36154e44c2277e9bfb6cff0574d7e9df4e100b782b03ab2476e171": [
"f8858363837eaccf1249844dfd200999ebd480b393dd0f7f2022880868ce3bf3"
]
},
"success": true
}

get_wallet_balance

Functionality: Obtain the balance (and related info) from a wallet

Usage: chia rpc wallet [OPTIONS] get_wallet_balance [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idNUMBERTrueThe Wallet ID of the wallet from which to obtain the balance
Example
chia rpc wallet get_wallet_balance '{"wallet_id": 1}'

Response:

{
"success": true,
"wallet_balance": {
"confirmed_wallet_balance": 999999799,
"fingerprint": 874731676,
"max_send_amount": 999999799,
"pending_change": 0,
"pending_coin_removal_count": 0,
"spendable_balance": 999999799,
"unconfirmed_wallet_balance": 999999799,
"unspent_coin_count": 1,
"wallet_id": 1,
"wallet_type": 0
}
}

get_wallet_balances

Functionality: Obtain the balance (and related info) from one or more wallets

Usage: chia rpc wallet [OPTIONS] get_wallet_balance [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idsLISTFalseA list of Wallet IDs from which to obtain the balance [Default: list info for all wallets]
Example

Get the balance and other info for wallets 1 and 2:

chia rpc wallet get_wallet_balances '{"wallet_ids": [1,2]}'

Response:

{
"success": true,
"wallet_balances": {
"1": {
"confirmed_wallet_balance": 249908082013,
"fingerprint": 3792481086,
"max_send_amount": 249908082013,
"pending_change": 0,
"pending_coin_removal_count": 0,
"spendable_balance": 249908082013,
"unconfirmed_wallet_balance": 249908082013,
"unspent_coin_count": 19,
"wallet_id": 1,
"wallet_type": 0
},
"2": {
"confirmed_wallet_balance": 0,
"fingerprint": 3792481086,
"max_send_amount": 0,
"pending_change": 0,
"pending_coin_removal_count": 0,
"spendable_balance": 0,
"unconfirmed_wallet_balance": 0,
"unspent_coin_count": 6,
"wallet_id": 2,
"wallet_type": 10
}
}
}

select_coins

Functionality: Select coins from a given wallet that add up to at least the specified amount

Usage: chia rpc wallet [OPTIONS] select_coins [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idNUMBERTrueThe ID of the wallet from which to select coins
amountNUMBERTrueThe number of mojos to select
min_coin_amountNUMBERFalseThe smallest coin to be selected in this query [Default: No minimum]
max_coin_amountNUMBERFalseThe largest coin to be selected in this query [Default: No maximum]
excluded_coin_amountsNUMBER ARRAYFalseA list of coin amounts to exclude
excluded_coinsTEXT ARRAYFalseA list of coins to exclude
Example 1

Select 1000 mojos. Note that in this wallet, the smallest coin is worth 999 996 796 mojos, so that coin is selected:

chia rpc wallet select_coins '{"wallet_id": 1, "amount": 1000}'

Response:

{
"coins": [
{
"amount": 999996796,
"parent_coin_info": "0xfecaf9d1cffe1b71f00aee7816ea90562b18307d4461757e23f097703340beb7",
"puzzle_hash": "0x138373343443d3cdf6bd033244f32d904dd93e1ad2772f120955c0d8d761b722"
}
],
"success": true
}
Example 2

Attempt to select 1000 mojos with max_coin_amount set to 10 000. As in the previous example, the smallest coin in the wallet is worth 999 996 796 mojos, so the coin selection will fail:

chia rpc wallet select_coins '{"wallet_id": 1, "amount": 1000, "min_coin_amount": 10, "max_coin_amount": 10000}'

Response:

Request failed: {'error': 'Transaction for 1000 is greater than spendable balance of 0. There may be other transactions pending or our minimum coin amount is too high.', 'success': False}

send_notification

Functionality: Send a notification to a specified puzzle hash

Usage: chia rpc wallet [OPTIONS] send_notification [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileTEXTFalseInstead of REQUEST, provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

ParameterTYPERequiredDescription
targetHEX STRINGTrueThe puzzle hash you would like to send a message to
messageHEX STRINGTrueThe hex-encoded message you would like to send
amountNUMBERTrueThe number of mojos to include with this message
feeNUMBERFalseAn optional blockchain fee, in mojos
Example 1: Send a generic message
chia rpc wallet send_notification '{"target": "8c436f983d5bcbdb92d6d029a4113da580f2fc43b943e92ddf06a9f54e5f5003", "message": "fadedcab", "amount": 10000000, "fee": 10000000}'

Response:

{
"success": true,
"tx": {
"additions": [
{
"amount": 10000000,
"parent_coin_info": "0x7159b046aa0f1af65f561efe6ed1de0beb3341cc28a883892c9bc14d89115ed0",
"puzzle_hash": "0x201ef13f780295649cd7e2c8713c575b8dd2568463add6f8d3cfc6b3687d27bd"
},
{
"amount": 249979799998,
"parent_coin_info": "0x7159b046aa0f1af65f561efe6ed1de0beb3341cc28a883892c9bc14d89115ed0",
"puzzle_hash": "0x970afdde67983d39b55475fa1a6bb24eb23e9ba47681fb693e80dee8c9346a83"
}
],
"amount": 10000000,
"confirmed": false,
"confirmed_at_height": 0,
"created_at_time": 1667386486,
"fee_amount": 10000000,
"memos": {
"f74fb363fbdeef3f6bcf7a0664a8ef76ea3e5f22bb4ffc9a1f9ef23b9329ae28": "fadedcab"
},
"name": "0x749898b3efcd50882283fb879e80e42cd59340c41943832b4daf896b5e6e80e4",
"removals": [
{
"amount": 249999799998,
"parent_coin_info": "0xf634ab1fc513d90d63c7eed840eb49a034f804b2d910418614776333590aab8c",
"puzzle_hash": "0x8c436f983d5bcbdb92d6d029a4113da580f2fc43b943e92ddf06a9f54e5f5003"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": {
"aggregated_signature": "0xb9db8ff2e29f00ec98b17019e13f11daea890a8ef82d1019b7655308c14623a0c15d37504b1e742d0f29132e6225c7f505a2c75f93ea0940f50615c3b83c2b851c5a76f5f027c8d823c85df7bea57e3dd702f03e2d8997173c1bb4ca64b97b87",
"coin_spends": [
{
"coin": {
"amount": 249999799998,
"parent_coin_info": "0xf634ab1fc513d90d63c7eed840eb49a034f804b2d910418614776333590aab8c",
"puzzle_hash": "0x8c436f983d5bcbdb92d6d029a4113da580f2fc43b943e92ddf06a9f54e5f5003"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0acc98d7c361cb95a6d16a2ee6a5dccb55d3beab9e7dbb52ebd7e4a94a8290166cf8e745d67a6eb36de6687141da09dccff018080",
"solution": "0xff80ffff01ffff33ffa0201ef13f780295649cd7e2c8713c575b8dd2568463add6f8d3cfc6b3687d27bdff8400989680ffffa08c436f983d5bcbdb92d6d029a4113da580f2fc43b943e92ddf06a9f54e5f5003ff84fadedcab8080ffff33ffa0970afdde67983d39b55475fa1a6bb24eb23e9ba47681fb693e80dee8c9346a83ff853a33f509be80ffff34ff840098968080ffff3cffa0ef1272dc555d2fa0b17eb8a2d50dc507ce1f873de3443f3b7e36a3c802b0863b80ffff3dffa0a2d1d50e1bf8bd6f08e02885631ea6cbe7aa91d9de9809b5c37a7858fc0ad94b8080ff8080"
},
{
"coin": {
"amount": 10000000,
"parent_coin_info": "0x7159b046aa0f1af65f561efe6ed1de0beb3341cc28a883892c9bc14d89115ed0",
"puzzle_hash": "0x201ef13f780295649cd7e2c8713c575b8dd2568463add6f8d3cfc6b3687d27bd"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff04ffff04ff04ffff04ff05ffff04ff0bff80808080ffff04ffff04ff06ffff01ff808080ff808080ffff04ffff01ff333cff018080ffff04ffff01a08c436f983d5bcbdb92d6d029a4113da580f2fc43b943e92ddf06a9f54e5f5003ffff04ffff018400989680ff01808080",
"solution": "0x80"
}
]
},
"to_address": "xch1yq00z0mcq22kf8xhuty8z0zhtwxay45yvwkad7xnelrtx6ray77sshkp7r",
"to_puzzle_hash": "0x201ef13f780295649cd7e2c8713c575b8dd2568463add6f8d3cfc6b3687d27bd",
"trade_id": null,
"type": 1,
"wallet_id": 1
}
}
Example 2: Send an NFT notification

In this example, we will attempt to buy the following NFT:

nft1dcw9gfx034mxv2xkv568aupaqlc6em5sn3d2y3kzkt5js2gydr0stfd4ek

We will create an offer for this NFT and use the command line to send an offer directly to its owner.

First, create an Offer file. This can be accomplished with the create_offer_for_ids RPC. Offers can also be created from the reference wallet's GUI.

Next, post the offer to a URI. In this example, we will use Dexie.

The human-readable offer is located here:

https://dexie.space/offers/4xtVpZWkTrpdsZhtJCKSpyRqJoT1qZXsJXy6Hqm8tYjr

However, the notification command requires a raw offer file. In Dexie's case, the URI will start with raw.dexie.space, as shown here:

https://raw.dexie.space/4xtVpZWkTrpdsZhtJCKSpyRqJoT1qZXsJXy6Hqm8tYjr

Note that the raw offer file can be posted to any URI; it does not need to be on an exchange.

We will also need to obtain the Current Owner address of the NFT. This can be obtained from the nft_get_info RPC:

chia rpc wallet nft_get_info '{"coin_id":"nft1dcw9gfx034mxv2xkv568aupaqlc6em5sn3d2y3kzkt5js2gydr0stfd4ek"}'

Result:

{
"nft_info": {
"chain_info": "((117 \"https://nftstorage.link/ipfs/bafybeic32cwe43voxoybnwbayy7bedv4ip5tqho4jfol3xmtd62vscfoqa/78.jpg\" \"ipfs://bafybeic32cwe43voxoybnwbayy7bedv4ip5tqho4jfol3xmtd62vscfoqa/78.jpg\") (104 . 0x1a9152787d8374ececa0bf070b7a10e91162ada15964404d52232152f25b8b7a) (28021 \"https://nftstorage.link/ipfs/bafybeic32cwe43voxoybnwbayy7bedv4ip5tqho4jfol3xmtd62vscfoqa/metadata.json\" \"ipfs://bafybeic32cwe43voxoybnwbayy7bedv4ip5tqho4jfol3xmtd62vscfoqa/metadata.json\") (27765) (29550 . 1) (29556 . 1) (28008 . 0xfdfe889a579916f8f75dcfff809eee44fc844df5fa92aecd2d562578e7e69a24))",
"data_hash": "0x1a9152787d8374ececa0bf070b7a10e91162ada15964404d52232152f25b8b7a",
"data_uris": [
"https://nftstorage.link/ipfs/bafybeic32cwe43voxoybnwbayy7bedv4ip5tqho4jfol3xmtd62vscfoqa/78.jpg",
"ipfs://bafybeic32cwe43voxoybnwbayy7bedv4ip5tqho4jfol3xmtd62vscfoqa/78.jpg"
],
"edition_number": 1,
"edition_total": 1,
"launcher_id": "0x6e1c5424cf8d766628d665347ef03d07f1acee909c5aa246c2b2e928290468df",
"launcher_puzhash": "0xeff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9",
"license_hash": "0x",
"license_uris": [],
"metadata_hash": "0xfdfe889a579916f8f75dcfff809eee44fc844df5fa92aecd2d562578e7e69a24",
"metadata_uris": [
"https://nftstorage.link/ipfs/bafybeic32cwe43voxoybnwbayy7bedv4ip5tqho4jfol3xmtd62vscfoqa/metadata.json",
"ipfs://bafybeic32cwe43voxoybnwbayy7bedv4ip5tqho4jfol3xmtd62vscfoqa/metadata.json"
],
"mint_height": 2459174,
"minter_did": "0x7af52cbf50837fd387b02c60351f8ab9842a8f18b99ced7ab9a16a155c35d400",
"nft_coin_id": "0x78a3012f0aa0c837ee1bed53f91c8d4e4897578e7757dee4965fdcd4cff0c94a",
"nft_id": "nft1dcw9gfx034mxv2xkv568aupaqlc6em5sn3d2y3kzkt5js2gydr0stfd4ek",
"off_chain_metadata": null,
"owner_did": null,
"p2_address": "0x47e26aa7ee46e7ed3a2f762fda7aa1d63db6be42e14fc3a18e54e13ee509f84b",
"pending_transaction": false,
"royalty_percentage": 300,
"royalty_puzzle_hash": "0x3ed2cab30efeddb0d58c660b380ef0671292e922e1a01cccdff51d390f0473eb",
"supports_did": true,
"updater_puzhash": "0xfe8a4b4e27a2e29a4d3fc7ce9d527adbcaccbab6ada3903ccf3ba9a769d2d78b"
},
"success": true
}

In this case, we need the p2_address, which is 47e26aa7ee46e7ed3a2f762fda7aa1d63db6be42e14fc3a18e54e13ee509f84b (the leading 0x isn't needed).

Finally, we need to construct a valid message to send. The notification message payload is a JSON object with the following fields:

  • v: <number> version of the notification message. Currently 1.
  • t: <number> type of the notification message. Currently 1 for offer.
  • d: <object> payload of the notification message. The type of the payload depends on the notification type. For offer, the payload is an object with the following fields:
    • u: <string> offer URL
    • ph: <string, optional> puzzlehash of the notification sender, for sending a response (counter offer). If you want to disable counter offers for this offer, simply omit this flag

The ph for the message payload can be any puzzlehash in your key derivation. One way to obtain an address is with the chia wallet get_address command. For this example, we'll use:

xch1ta7zjqqtaw9wyfnawl3z84a26vexr3qtmp7jq6gx4vpzl792sf9qddsacl

This address still needs to be converted into a puzzlehash. One way to accomplish this is with an online converter, such as the one available from spacescan. Another option is to use the decode command from the chia-dev-tools repository:

cdv decode xch1ta7zjqqtaw9wyfnawl3z84a26vexr3qtmp7jq6gx4vpzl792sf9qddsacl

Response:

5f7c29000beb8ae2267d77e223d7aad33261c40bd87d206906ab022ff8aa824a

The payload command we will use in this example is:

{
"v": 1,
"t": 1,
"d": {
"u": "https://raw.dexie.space/4xtVpZWkTrpdsZhtJCKSpyRqJoT1qZXsJXy6Hqm8tYjr",
"ph": "5f7c29000beb8ae2267d77e223d7aad33261c40bd87d206906ab022ff8aa824a"
}
}

However, we still need to convert it to hexadecimal format for the RPC command.

The hex equivalent of the payload command is:

7B2276223A312C2274223A312C2264223A7B2275223A2268747470733A2F2F7261772E64657869652E73706163652F34787456705A576B54727064735A68744A434B53707952714A6F5431715A58734A58793648716D3874596A72222C227068223A2235663763323930303062656238616532323637643737653232336437616164333332363163343062643837643230363930366162303232666638616138323461227D7D

Having obtained all of this information, we can run the command to send the message:

chia rpc wallet send_notification '{"target": "47e26aa7ee46e7ed3a2f762fda7aa1d63db6be42e14fc3a18e54e13ee509f84b", "message": "7B2276223A312C2274223A312C2264223A7B2275223A2268747470733A2F2F7261772E64657869652E73706163652F34787456705A576B54727064735A68744A434B53707952714A6F5431715A58734A58793648716D3874596A72222C227068223A2235663763323930303062656238616532323637643737653232336437616164333332363163343062643837643230363930366162303232666638616138323461227D7D", "amount": 100000000, "fee": 1}'

Response:

{
"success": true,
"tx": {
"additions": [
{
"amount": 100000000,
"parent_coin_info": "0xd5619c0b02a9279edf11ae85407fd8dc7472fe449fe6ab88d4cc480a5d4b24f5",
"puzzle_hash": "0xa52a2bcbff9ece1137bbc9199be03b0b32e6406bf377f6dc201be6ee5a4dfd9c"
},
{
"amount": 3106899989,
"parent_coin_info": "0xd5619c0b02a9279edf11ae85407fd8dc7472fe449fe6ab88d4cc480a5d4b24f5",
"puzzle_hash": "0x1732d207b04a03dd7d622cc9f491d43ca0561cf73a1efacdaa0e26e8902c8b73"
}
],
"amount": 100000000,
"confirmed": false,
"confirmed_at_height": 0,
"created_at_time": 1677570233,
"fee_amount": 1,
"memos": {
"121a439f242f4e59a871c464a9f324507aa4566d61ad8ec5d717468551e89c5a": "7b2276223a312c2274223a312c2264223a7b2275223a2268747470733a2f2f7261772e64657869652e73706163652f34787456705a576b54727064735a68744a434b53707952714a6f5431715a58734a58793648716d3874596a72222c227068223a2235663763323930303062656238616532323637643737653232336437616164333332363163343062643837643230363930366162303232666638616138323461227d7d"
},
"name": "0x61c5c10e604c7196a216ec7c39f1a448a222737ee854c85bb6e3dca174656348",
"removals": [
{
"amount": 3206899990,
"parent_coin_info": "0x162aea6e661610421def30f3c8b58c4154aef9dc4f847024f757a0b92117d704",
"puzzle_hash": "0x035f40ced4483a04d2f677586724af21c868960d94410ac9e595d0944a019842"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": {
"aggregated_signature": "0xa558eb279ebdf8bd9c58cddd992f38c7b2f48e86b2024917f85eb8beb4b24c7541e5ff8b1a81e3f73c35144f42ba4ce60ef55d36474e078292ddb6b99edb3f039a9f3f9282c1be2102ed811af5080cca37cb450a12039edce9ead563a6ab9740",
"coin_spends": [
{
"coin": {
"amount": 3206899990,
"parent_coin_info": "0x162aea6e661610421def30f3c8b58c4154aef9dc4f847024f757a0b92117d704",
"puzzle_hash": "0x035f40ced4483a04d2f677586724af21c868960d94410ac9e595d0944a019842"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b749d5d97e4e0acd2f5683215470994a04ccaaabdf11f6fa8df3d8e872ef28f86cb5fb98b29ec351d343dd5e447865b4ff018080",
"solution": "0xff80ffff01ffff33ffa0a52a2bcbff9ece1137bbc9199be03b0b32e6406bf377f6dc201be6ee5a4dfd9cff8405f5e100ffffa047e26aa7ee46e7ed3a2f762fda7aa1d63db6be42e14fc3a18e54e13ee509f84bffc0a67b2276223a312c2274223a312c2264223a7b2275223a2268747470733a2f2f7261772e64657869652e73706163652f34787456705a576b54727064735a68744a434b53707952714a6f5431715a58734a58793648716d3874596a72222c227068223a2235663763323930303062656238616532323637643737653232336437616164333332363163343062643837643230363930366162303232666638616138323461227d7d8080ffff33ffa01732d207b04a03dd7d622cc9f491d43ca0561cf73a1efacdaa0e26e8902c8b73ff8500b92f881580ffff34ff0180ffff3cffa087e5e080ce5b080e6e42deaf20d2170a553fdf0ace32cbbce0a88b0c46a4aa0580ffff3dffa0eae0770951a738b72415a06b0a92ba0bcd9c46e2f16e2c545e9eafb9020485768080ff8080"
},
{
"coin": {
"amount": 100000000,
"parent_coin_info": "0xd5619c0b02a9279edf11ae85407fd8dc7472fe449fe6ab88d4cc480a5d4b24f5",
"puzzle_hash": "0xa52a2bcbff9ece1137bbc9199be03b0b32e6406bf377f6dc201be6ee5a4dfd9c"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff04ffff04ff04ffff04ff05ffff04ff0bff80808080ffff04ffff04ff06ffff01ff808080ff808080ffff04ffff01ff333cff018080ffff04ffff01a047e26aa7ee46e7ed3a2f762fda7aa1d63db6be42e14fc3a18e54e13ee509f84bffff04ffff018405f5e100ff01808080",
"solution": "0x80"
}
]
},
"to_address": "xch1554zhjllnm8pzdameyvehcpmpvewvsrt7dmldhpqr0nwukjdlkwqsngqcq",
"to_puzzle_hash": "0xa52a2bcbff9ece1137bbc9199be03b0b32e6406bf377f6dc201be6ee5a4dfd9c",
"trade_id": null,
"type": 1,
"wallet_id": 1
}
}

This command will create a Message Coin on the blockchain. Once it has been confirmed, the current owner of the NFT will receive a notification of the offer in their wallet. The owner can choose to accept the offer, delete the notification, or send a counter offer to the ph that was included in the payload.


send_transaction

Functionality: Send a transaction

Usage: chia rpc wallet [OPTIONS] send_transaction [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idTEXTTrueThe wallet ID for the origin of the transaction
addressTEXTTrueThe destination address
amountNUMBERTrueThe number of mojos to send
feeNUMBERFalseAn optional blockchain fee, in mojos
memosTEXT ARRAYFalseAn optional array of memos to be sent with the transaction
min_coin_amountNUMBERFalseThe minimum coin amount to send [Default: 0]
max_coin_amountNUMBERFalseThe maximum coin amount to send [Default: 0]
exclude_coin_amountsNUMBER ARRAYFalseA list of coin amounts to exclude
exclude_coin_idsTEXT ARRAYFalseA list of coin IDs to exclude
reuse_puzhashBOOLEANFalseIf true, will not generate a new puzzle hash / address for this transaction only. Note that setting this parameter to true will override the global default setting from config.yaml
Example
chia rpc wallet send_transaction '{"wallet_id": 1, "address": "xch1fev2qaclwpcue9kx4p39dzfxpzaavvcz5v3lhx77cxha7f0tjjlsngh5k0", "amount": 1000, "fee": 1, "memos":["memo1"]}'

Response:

{
"success": true,
"transaction": {
"additions": [
{
"amount": 1000,
"parent_coin_info": "0xfecaf9d1cffe1b71f00aee7816ea90562b18307d4461757e23f097703340beb7",
"puzzle_hash": "0x4e58a0771f7071cc96c6a86256892608bbd63302a323fb9bdec1afdf25eb94bf"
},
{
"amount": 999996796,
"parent_coin_info": "0xfecaf9d1cffe1b71f00aee7816ea90562b18307d4461757e23f097703340beb7",
"puzzle_hash": "0x138373343443d3cdf6bd033244f32d904dd93e1ad2772f120955c0d8d761b722"
}
],
"amount": 1000,
"confirmed": false,
"confirmed_at_height": 0,
"created_at_time": 1669261889,
"fee_amount": 1,
"memos": {
"029b8689abda7f4ff4871e1cd69eb32725a0cda8520b751bcf774fb681e19bc5": "6d656d6f31"
},
"name": "0x94a6b6a2353a8f49b6dc30d7141272df14bc82727fd0d82a18680605b2a90051",
"removals": [
{
"amount": 999997797,
"parent_coin_info": "0x81d6dac68bb566d696a62629e1e08edd5b684d35c3ee8c7164b1c3a457514203",
"puzzle_hash": "0xd84faa841550d718863fc1139ff880c8366a546ab7dc567a672a14c7ddf5b4b7"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": {
"aggregated_signature": "0xa95fba5e9e310d1c096bb44e27d98b070b7591be29d3f174ac42bcad39ec5e8a356747851c3df456973c96f55884dbb913247000368b0d1fa3518f11dae0ed45cb8f0961899aa7ee2102c58265d9460a31c33bd896ce9a2ef377bbc6419343b0",
"coin_spends": [
{
"coin": {
"amount": 999997797,
"parent_coin_info": "0x81d6dac68bb566d696a62629e1e08edd5b684d35c3ee8c7164b1c3a457514203",
"puzzle_hash": "0xd84faa841550d718863fc1139ff880c8366a546ab7dc567a672a14c7ddf5b4b7"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0a5abd588cc5a2c873ee37809ea33432b7a87aaf8370eba7f9806bc1eac517034b3850cc7a4f2550f108b8a124d3dbbc3ff018080",
"solution": "0xff80ffff01ffff33ffa04e58a0771f7071cc96c6a86256892608bbd63302a323fb9bdec1afdf25eb94bfff8203e8ffff856d656d6f318080ffff33ffa0138373343443d3cdf6bd033244f32d904dd93e1ad2772f120955c0d8d761b722ff843b9abd7c80ffff34ff0180ffff3cffa086ec6c5fe3716c6e0b39c0049a3d164f491c3347c4fd36196ecc561b5cf347da8080ff8080"
}
]
},
"to_address": "xch1fev2qaclwpcue9kx4p39dzfxpzaavvcz5v3lhx77cxha7f0tjjlsngh5k0",
"to_puzzle_hash": "0x4e58a0771f7071cc96c6a86256892608bbd63302a323fb9bdec1afdf25eb94bf",
"trade_id": null,
"type": 1,
"wallet_id": 1
},
"transaction_id": "0x94a6b6a2353a8f49b6dc30d7141272df14bc82727fd0d82a18680605b2a90051"
}

send_transaction_multi

Functionality: Send multiple transactions from a given wallet

Usage: chia rpc wallet [OPTIONS] send_transaction_multi [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idTEXTTrueThe wallet ID for the origin of the transaction
additionsTEXT ARRAYTrueA list of puzzle hashes, amounts, and memos to be included
coinsTEXT ARRAYFalseOptional declaration of coins to be used
feeNUMBERFalseAn optional blockchain fee, in mojos
pushBOOLEANFalseOption to push the transaction to the chain or not (default: true)
Example
chia rpc wallet send_transaction_multi '{"wallet_id": 1, "additions": [{"amount": 1000, "puzzle_hash": "0xd826f3ef83e1752771426f90eadb24e42a78948cb7f747da85c05daab1b1e156"},{"amount": 500, "puzzle_hash": "0x45d4b5bd3f1e2c28483cae0eab27921adabff3300cb7d1241ba1a9628727197d", "memos": ["hello", "world"]}],"fee": 100}'

Response:

{
"success": true,
"transaction": {
"additions": [
{
"amount": 500,
"parent_coin_info": "0x45b30dd00437cdc24b508e1beae38fb11536e40ef1acf03f50a825d84e8dec94",
"puzzle_hash": "0x45d4b5bd3f1e2c28483cae0eab27921adabff3300cb7d1241ba1a9628727197d"
},
{
"amount": 1000,
"parent_coin_info": "0x45b30dd00437cdc24b508e1beae38fb11536e40ef1acf03f50a825d84e8dec94",
"puzzle_hash": "0xd826f3ef83e1752771426f90eadb24e42a78948cb7f747da85c05daab1b1e156"
},
{
"amount": 21999981853856,
"parent_coin_info": "0x45b30dd00437cdc24b508e1beae38fb11536e40ef1acf03f50a825d84e8dec94",
"puzzle_hash": "0xe32e50011a2f5f6af81db9b56c500b84c67429340a9b7b37d4505f0f51fc9450"
}
],
"amount": 1500,
"confirmed": false,
"confirmed_at_height": 0,
"created_at_time": 1730235776,
"fee_amount": 100,
"memos": {
"899c65593cb6bb0d515ac34c5e334287872f92ebcb2273ac0f0914efd6f0cabf": "776f726c64"
},
"name": "0xcc3d1668094e7643de772c5b9de0927508f9402fbb4cb66b4161a34b043c5bfa",
"removals": [
{
"amount": 21999981855456,
"parent_coin_info": "0xedee4defe510196869f53da7877236e56a0b097640b48c1b6c1a20bb92257a16",
"puzzle_hash": "0x58d4fa1f9b0069a41119662f38457ac2ff35ddf74b9fd01762e3da2c97112d3e"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": {
"aggregated_signature": "0x86c593c8156e9c3b7a038b6e945975058dd98e4598d24bbb750b2a3f5aa44439af2370dc736478cdd07249bb0ce8575c174b2cf451655ea45f132502b955d63372d3cb1d6c293c7ad567fc38d54c76cc289bc4ffadbe2a7103a45984dd72a160",
"coin_spends": [
{
"coin": {
"amount": 21999981855456,
"parent_coin_info": "0xedee4defe510196869f53da7877236e56a0b097640b48c1b6c1a20bb92257a16",
"puzzle_hash": "0x58d4fa1f9b0069a41119662f38457ac2ff35ddf74b9fd01762e3da2c97112d3e"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b08b3488cda8b3a32bcb74058bfb10c93a642d987908e6aec880dc85bf81b4b872b9f2cc6e08df73f62019ff593a2de1fdff018080",
"solution": "0xff80ffff01ffff3cffa03fb274324e854698e253364b3f76011ab98bb3b170a0a2633fb6aac19be3512480ffff33ffa045d4b5bd3f1e2c28483cae0eab27921adabff3300cb7d1241ba1a9628727197dff8201f4ffff8568656c6c6fff85776f726c648080ffff33ffa0d826f3ef83e1752771426f90eadb24e42a78948cb7f747da85c05daab1b1e156ff8203e880ffff33ffa0e32e50011a2f5f6af81db9b56c500b84c67429340a9b7b37d4505f0f51fc9450ff861402451a7ca080ffff34ff648080ff8080"
}
]
},
"to_address": "txch1mqn08muru96jwu2zd7gw4keyus4839yvklm50k59cpw64vd3u9tqghkcyg",
"to_puzzle_hash": "0xd826f3ef83e1752771426f90eadb24e42a78948cb7f747da85c05daab1b1e156",
"trade_id": null,
"type": 1,
"valid_times": {
"max_blocks_after_created": null,
"max_height": null,
"max_secs_after_created": null,
"max_time": null,
"min_blocks_since_created": null,
"min_height": null,
"min_secs_since_created": null,
"min_time": null
},
"wallet_id": 1
},
"transaction_id": "0xcc3d1668094e7643de772c5b9de0927508f9402fbb4cb66b4161a34b043c5bfa",
"transactions": [
{
"additions": [
{
"amount": 500,
"parent_coin_info": "0x45b30dd00437cdc24b508e1beae38fb11536e40ef1acf03f50a825d84e8dec94",
"puzzle_hash": "0x45d4b5bd3f1e2c28483cae0eab27921adabff3300cb7d1241ba1a9628727197d"
},
{
"amount": 1000,
"parent_coin_info": "0x45b30dd00437cdc24b508e1beae38fb11536e40ef1acf03f50a825d84e8dec94",
"puzzle_hash": "0xd826f3ef83e1752771426f90eadb24e42a78948cb7f747da85c05daab1b1e156"
},
{
"amount": 21999981853856,
"parent_coin_info": "0x45b30dd00437cdc24b508e1beae38fb11536e40ef1acf03f50a825d84e8dec94",
"puzzle_hash": "0xe32e50011a2f5f6af81db9b56c500b84c67429340a9b7b37d4505f0f51fc9450"
}
],
"amount": 1500,
"confirmed": false,
"confirmed_at_height": 0,
"created_at_time": 1730235776,
"fee_amount": 100,
"memos": {
"899c65593cb6bb0d515ac34c5e334287872f92ebcb2273ac0f0914efd6f0cabf": "776f726c64"
},
"name": "0xcc3d1668094e7643de772c5b9de0927508f9402fbb4cb66b4161a34b043c5bfa",
"removals": [
{
"amount": 21999981855456,
"parent_coin_info": "0xedee4defe510196869f53da7877236e56a0b097640b48c1b6c1a20bb92257a16",
"puzzle_hash": "0x58d4fa1f9b0069a41119662f38457ac2ff35ddf74b9fd01762e3da2c97112d3e"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": {
"aggregated_signature": "0x86c593c8156e9c3b7a038b6e945975058dd98e4598d24bbb750b2a3f5aa44439af2370dc736478cdd07249bb0ce8575c174b2cf451655ea45f132502b955d63372d3cb1d6c293c7ad567fc38d54c76cc289bc4ffadbe2a7103a45984dd72a160",
"coin_spends": [
{
"coin": {
"amount": 21999981855456,
"parent_coin_info": "0xedee4defe510196869f53da7877236e56a0b097640b48c1b6c1a20bb92257a16",
"puzzle_hash": "0x58d4fa1f9b0069a41119662f38457ac2ff35ddf74b9fd01762e3da2c97112d3e"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b08b3488cda8b3a32bcb74058bfb10c93a642d987908e6aec880dc85bf81b4b872b9f2cc6e08df73f62019ff593a2de1fdff018080",
"solution": "0xff80ffff01ffff3cffa03fb274324e854698e253364b3f76011ab98bb3b170a0a2633fb6aac19be3512480ffff33ffa045d4b5bd3f1e2c28483cae0eab27921adabff3300cb7d1241ba1a9628727197dff8201f4ffff8568656c6c6fff85776f726c648080ffff33ffa0d826f3ef83e1752771426f90eadb24e42a78948cb7f747da85c05daab1b1e156ff8203e880ffff33ffa0e32e50011a2f5f6af81db9b56c500b84c67429340a9b7b37d4505f0f51fc9450ff861402451a7ca080ffff34ff648080ff8080"
}
]
},
"to_address": "txch1mqn08muru96jwu2zd7gw4keyus4839yvklm50k59cpw64vd3u9tqghkcyg",
"to_puzzle_hash": "0xd826f3ef83e1752771426f90eadb24e42a78948cb7f747da85c05daab1b1e156",
"trade_id": null,
"type": 1,
"valid_times": {
"max_blocks_after_created": null,
"max_height": null,
"max_secs_after_created": null,
"max_time": null,
"min_blocks_since_created": null,
"min_height": null,
"min_secs_since_created": null,
"min_time": null
},
"wallet_id": 1
}
],
"unsigned_transactions": [
{
"signing_instructions": {
"key_hints": {
"path_hints": [
{
"path": [
12381,
8444,
2,
19
],
"root_fingerprint": "0x428c4870"
}
],
"sum_hints": [
{
"final_pubkey": "0x8b3488cda8b3a32bcb74058bfb10c93a642d987908e6aec880dc85bf81b4b872b9f2cc6e08df73f62019ff593a2de1fd",
"fingerprints": [
"0x619bc5cd"
],
"synthetic_offset": "0x64771976abb4a834675485d405228f1d42de0fe66ff8a15fcccb3edc5318ffed"
}
]
},
"targets": [
{
"fingerprint": "0xb995704b",
"hook": "0x5164cb7113616036c959df00ffa45f0a06e1f1c8d04ac3c811b0f20f591c6d26",
"message": "0x45c51f68a927c0a5cab76e23821c14ed48508a03680d0f2b8171110fd424a38145b30dd00437cdc24b508e1beae38fb11536e40ef1acf03f50a825d84e8dec9437a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615"
}
]
},
"transaction_info": {
"spends": [
{
"coin": {
"amount": 21999981855456,
"parent_coin_id": "0xedee4defe510196869f53da7877236e56a0b097640b48c1b6c1a20bb92257a16",
"puzzle_hash": "0x58d4fa1f9b0069a41119662f38457ac2ff35ddf74b9fd01762e3da2c97112d3e"
},
"puzzle": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b08b3488cda8b3a32bcb74058bfb10c93a642d987908e6aec880dc85bf81b4b872b9f2cc6e08df73f62019ff593a2de1fdff018080",
"solution": "0xff80ffff01ffff3cffa03fb274324e854698e253364b3f76011ab98bb3b170a0a2633fb6aac19be3512480ffff33ffa045d4b5bd3f1e2c28483cae0eab27921adabff3300cb7d1241ba1a9628727197dff8201f4ffff8568656c6c6fff85776f726c648080ffff33ffa0d826f3ef83e1752771426f90eadb24e42a78948cb7f747da85c05daab1b1e156ff8203e880ffff33ffa0e32e50011a2f5f6af81db9b56c500b84c67429340a9b7b37d4505f0f51fc9450ff861402451a7ca080ffff34ff648080ff8080"
}
]
}
}
]
}

sign_message_by_address

Functionality: Sign a message using an XCH address without incurring an on-chain transaction

Usage: chia rpc wallet [OPTIONS] sign_message_by_address [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileTEXTFalseInstead of REQUEST, provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

ParameterTYPERequiredDescription
addressSTRINGTrueThe address to use for signing. Must possess the key for this address
messageSTRINGTrueThe message to include with the signature
Example
chia rpc wallet sign_message_by_address '{"address":"xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46", "message":"test"}'

Response:

{
"pubkey": "814612ec24a4957cf38ee5f5d5bc544820575375d7997da12c07f3f09215a178cfa76f151edba4c0ae40b66a97a6275e",
"signature": "a10234b38cc962f9678882f18885fee23a288c389bc0145588f7000bca12b55fcfaffff0cdd4ef7f136f8aab571ddd2e089b281ae267347fb20225d86490e91fbedad59ba9d38f9308f251070ea1260909dd69133273a49650749cfe6ff96d40",
"success": true
}

sign_message_by_id

Functionality: Sign a message using a DID or NFT ID without incurring an on-chain transaction

Usage: chia rpc wallet [OPTIONS] sign_message_by_id [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileTEXTFalseInstead of REQUEST, provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

ParameterTYPERequiredDescription
idSTRINGTrueThe DID or NFT ID to use for signing. Must possess the key for this ID
messageSTRINGTrueThe message to include with the signature
Example
chia rpc wallet sign_message_by_id '{"id":"nft12dfld077vn3ywp4vdx9ljg96k89kpr6jlqwkm7lgaf3g8jwn2l4q6eytqs", "message":"test"}'

Response:

{
"pubkey": "a5b35d3370745ae7634022ddd970379b4ed4acdd2d34622f1dfdf2b9923b16ac6e8b317abcf1cc8beb1e882d341e4458",
"signature": "843deb871383889bfb8b9b22c0137e9b12cef875e27c998a3def6aa13c9340e2036ae90bbbb9a78894572319bf0fedbc08057849882ca6723834a99bf0e97a5e9f9702c5a02a64434b3550922c488f957036d19af2be2c92eb84c1d5d4f8eba6",
"success": true
}

spend_clawback_coins

Functionality: Spend clawback coins that were sent (to claw them back) or received (to claim them)

Usage: chia rpc wallet [OPTIONS] spend_clawback_coins [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileTEXTFalseInstead of REQUEST, provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
coin_idsSTRING ARRAYTrueList of coin IDs to be spent
batch_sizeNUMBERFalseThe number of coins to spend per bundle, [Default: batch_size obtainable from get_auto_claim]
feeNUMBERFalseAn optional blockchain fee, in mojos

When examining the on-chain metadata for a transaction, a coin with "type": 6 is a clawback coin to be received by this wallet, and a coin with "type": 7 is a clawback coin sent from this wallet.

Example

First, list a clawback transaction. For this example, we will specify the to_address.

Alternatively, you could search for coins with "type": 6 (receive) or "type": 7 (send), and "spent": false.

chia rpc wallet get_transactions '{"wallet_id": 1, "to_address": "txch1cls7s7z7twt89l5ahv7kkmyanqg0zw7t9an2frmp9uqurw5q25hsgtd4fy"}'

Response:

{
"success": true,
"transactions": [
{
"additions": [
{
"amount": 1000000000000,
"parent_coin_info": "0x4bc01742a2fd34c3e73f70325250df90078b27c4ce344c70cb30977800b266b0",
"puzzle_hash": "0x501579507d7b5af574084d7ec4482c808757eea6de4b7af7c404c7941d047df8"
},
{
"amount": 999700000000,
"parent_coin_info": "0x4bc01742a2fd34c3e73f70325250df90078b27c4ce344c70cb30977800b266b0",
"puzzle_hash": "0x80877718b9cbb2cd8a74c16698d2b31e2c282fcb9eb3694d3637dab3777d7963"
}
],
"amount": 1000000000000,
"confirmed": true,
"confirmed_at_height": 2765989,
"created_at_time": 1686643350,
"fee_amount": 100000000,
"memos": {
"97822ef25be65d8c1cf9988a8151dedb140d54bbfe396b153ca561b7afdca1ea": "c7e1e8785e5b9672fe9dbb3d6b6c9d9810f13bcb2f66a48f612f01c1ba80552f"
},
"name": "0x199415953fb4f1fea1131a0a44a30f78d456b970bdb16ac300d2d7ec81897c42",
"removals": [
{
"amount": 1999800000000,
"parent_coin_info": "0x39af4024f6562f5758bf32e9fc554db32a7baf4a9eb6b750d269f95f0f7e52d1",
"puzzle_hash": "0x7414b827d59ca447f82dd51a2672b0cbb1acf8d819d58774b62620b460d9cb43"
}
],
"sent": 3,
"sent_to": [
[
"b3d9de85d29931c10050b56c7afb91c99141943fc81ff2d1a8425e52be0d08ab",
1,
null
],
[
"5d00527d8db1c5ba8043fbe565d065ff1a0933e84b69a1e74b5f2e9c6b07b375",
1,
null
],
[
"a9e061dec18380f16afc72df7a580a5291eaf26175c0089c25f72a6d5be71773",
3,
"ALREADY_INCLUDING_TRANSACTION"
]
],
"spend_bundle": {
"aggregated_signature": "0x807a93c48e191a940738f1d886ade121a99901cd3f57d989cf014c5d09d8179507e5c36161974585c19b5c6b7578f06211742e5439e6d4e9eae69b8f8987898abe3f60e0925aa564e8d4f44b1591743649e61d043347af30f52bfa78d57f2166",
"coin_spends": [
{
"coin": {
"amount": 1999800000000,
"parent_coin_info": "0x39af4024f6562f5758bf32e9fc554db32a7baf4a9eb6b750d269f95f0f7e52d1",
"puzzle_hash": "0x7414b827d59ca447f82dd51a2672b0cbb1acf8d819d58774b62620b460d9cb43"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b1d8407fee30b01e66ab0baa86d1dcb67f41a91bc9aca70867dba877ec7276174344afc58adaf65c6e3ee7e483b39e8bff018080",
"solution": "0xff80ffff01ffff01ff02ffc04e00010000004800000000000002587414b827d59ca447f82dd51a2672b0cbb1acf8d819d58774b62620b460d9cb43c7e1e8785e5b9672fe9dbb3d6b6c9d9810f13bcb2f66a48f612f01c1ba80552f80ffff33ffa0501579507d7b5af574084d7ec4482c808757eea6de4b7af7c404c7941d047df8ff8600e8d4a51000ffffa0c7e1e8785e5b9672fe9dbb3d6b6c9d9810f13bcb2f66a48f612f01c1ba80552f8080ffff33ffa080877718b9cbb2cd8a74c16698d2b31e2c282fcb9eb3694d3637dab3777d7963ff8600e8c2c36d0080ffff34ff8405f5e10080ffff3cffa0cd929a98aba31bcee901d852a568089fb3ab7bbc8830eda7dba733692af3ffb58080ff8080"
}
]
},
"to_address": "txch1cls7s7z7twt89l5ahv7kkmyanqg0zw7t9an2frmp9uqurw5q25hsgtd4fy",
"to_puzzle_hash": "0xc7e1e8785e5b9672fe9dbb3d6b6c9d9810f13bcb2f66a48f612f01c1ba80552f",
"trade_id": null,
"type": 1,
"wallet_id": 1
},
{
"additions": [
{
"amount": 1000000000000,
"parent_coin_info": "0x4bc01742a2fd34c3e73f70325250df90078b27c4ce344c70cb30977800b266b0",
"puzzle_hash": "0x501579507d7b5af574084d7ec4482c808757eea6de4b7af7c404c7941d047df8"
}
],
"amount": 1000000000000,
"confirmed": false,
"confirmed_at_height": 2765989,
"created_at_time": 1686643386,
"fee_amount": 0,
"memos": {
"97822ef25be65d8c1cf9988a8151dedb140d54bbfe396b153ca561b7afdca1ea": "c7e1e8785e5b9672fe9dbb3d6b6c9d9810f13bcb2f66a48f612f01c1ba80552f"
},
"metadata": {
"coin_id": "97822ef25be65d8c1cf9988a8151dedb140d54bbfe396b153ca561b7afdca1ea",
"recipient_puzzle_hash": "0xc7e1e8785e5b9672fe9dbb3d6b6c9d9810f13bcb2f66a48f612f01c1ba80552f",
"sender_puzzle_hash": "0x7414b827d59ca447f82dd51a2672b0cbb1acf8d819d58774b62620b460d9cb43",
"spent": false,
"time_lock": 600
},
"name": "0x97822ef25be65d8c1cf9988a8151dedb140d54bbfe396b153ca561b7afdca1ea",
"removals": [
{
"amount": 1999800000000,
"parent_coin_info": "0x39af4024f6562f5758bf32e9fc554db32a7baf4a9eb6b750d269f95f0f7e52d1",
"puzzle_hash": "0x7414b827d59ca447f82dd51a2672b0cbb1acf8d819d58774b62620b460d9cb43"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": null,
"to_address": "txch1cls7s7z7twt89l5ahv7kkmyanqg0zw7t9an2frmp9uqurw5q25hsgtd4fy",
"to_puzzle_hash": "0xc7e1e8785e5b9672fe9dbb3d6b6c9d9810f13bcb2f66a48f612f01c1ba80552f",
"trade_id": null,
"type": 7,
"wallet_id": 1
}
],
"wallet_id": 1
}

This coin is "type": 7, so it is being sent from this wallet. This RPC can be used to claw back this coin as long as it has yet to be spent by the recipient wallet:

chia rpc wallet spend_clawback_coins '{"wallet_id": 1, "coin_ids": ["97822ef25be65d8c1cf9988a8151dedb140d54bbfe396b153ca561b7afdca1ea"], "fee": 100000000}'

Result:

{
"success": true,
"transaction_ids": [
"66f7fd75bb4a2408d219d89f8588ba4dceb28e95cc3105822142780cdce5fecd"
]
}

If you would like to see the result, call the get_transaction RPC:

chia rpc wallet get_transaction '{"transaction_id": "66f7fd75bb4a2408d219d89f8588ba4dceb28e95cc3105822142780cdce5fecd"}'
{
"success": true,
"transaction": {
"additions": [
{
"amount": 1000000000000,
"parent_coin_info": "0x97822ef25be65d8c1cf9988a8151dedb140d54bbfe396b153ca561b7afdca1ea",
"puzzle_hash": "0x7414b827d59ca447f82dd51a2672b0cbb1acf8d819d58774b62620b460d9cb43"
},
{
"amount": 999600000000,
"parent_coin_info": "0xc06eb268becfb157b92baecced9685db66b048fd7bb8900cabedd14eef773a46",
"puzzle_hash": "0x258815e9a6a41d3dacc4d8959630fda6a0db14364751e58719b84c78df971b3b"
}
],
"amount": 1000000000000,
"confirmed": true,
"confirmed_at_height": 2766056,
"created_at_time": 1686644367,
"fee_amount": 100000000,
"memos": {
"feeedc3b56a7ed6cb96e34c7492cd6fcba07363d6861cd0094d3975734a275f9": "c7e1e8785e5b9672fe9dbb3d6b6c9d9810f13bcb2f66a48f612f01c1ba80552f"
},
"name": "0x66f7fd75bb4a2408d219d89f8588ba4dceb28e95cc3105822142780cdce5fecd",
"removals": [
{
"amount": 1000000000000,
"parent_coin_info": "0x4bc01742a2fd34c3e73f70325250df90078b27c4ce344c70cb30977800b266b0",
"puzzle_hash": "0x501579507d7b5af574084d7ec4482c808757eea6de4b7af7c404c7941d047df8"
},
{
"amount": 999700000000,
"parent_coin_info": "0x4bc01742a2fd34c3e73f70325250df90078b27c4ce344c70cb30977800b266b0",
"puzzle_hash": "0x80877718b9cbb2cd8a74c16698d2b31e2c282fcb9eb3694d3637dab3777d7963"
}
],
"sent": 1,
"sent_to": [
[
"b3d9de85d29931c10050b56c7afb91c99141943fc81ff2d1a8425e52be0d08ab",
1,
null
]
],
"spend_bundle": {
"aggregated_signature": "0xb7a57e1e3c2e93d36c611cac4bc39d6c2f1a9c78dbfc6ec14603c3c7c662a95dffe7295ddaf92f4328c7f2a7f374094007b4b63f5a5f116d63200e4f79e59f249dafd5492d7a09d5c0c0fcfc7af8950c8bd006ee8681e65b96eb98bd21862fdf",
"coin_spends": [
{
"coin": {
"amount": 1000000000000,
"parent_coin_info": "0x4bc01742a2fd34c3e73f70325250df90078b27c4ce344c70cb30977800b266b0",
"puzzle_hash": "0x501579507d7b5af574084d7ec4482c808757eea6de4b7af7c404c7941d047df8"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ffff09ff05ffff02ff06ffff04ff02ffff04ffff0bffff0101ffff02ff04ffff04ff02ffff04ff17ff8080808080ffff04ff0bff808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff04ffff01ffff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff04ffff04ff02ffff04ff09ff80808080ffff02ff04ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff02ffff03ff1bffff01ff02ff06ffff04ff02ffff04ffff02ffff03ffff18ffff0101ff1380ffff01ff0bffff0102ff2bff0580ffff01ff0bffff0102ff05ff2b8080ff0180ffff04ffff04ffff17ff13ffff0181ff80ff3b80ff8080808080ffff010580ff0180ff018080ffff04ffff01a0f917921d94014f9e85421e22cebd5e9e48ee95ba1c7cd80ca85f3f8a46156fd6ff018080",
"solution": "0xffff01ffa0d7dcfd3463b023bd7d49ef029780c011f40a246fbeb5f5313232caf1c15a3b3780ffff02ffff01ff02ffff01ff02ffff03ffff09ff05ffff02ff02ffff04ff02ffff04ff0bff8080808080ffff01ff02ff0bff1780ffff01ff088080ff0180ffff04ffff01ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff02ffff04ff02ffff04ff09ff80808080ffff02ff02ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01a07414b827d59ca447f82dd51a2672b0cbb1acf8d819d58774b62620b460d9cb43ff018080ffffff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b1d8407fee30b01e66ab0baa86d1dcb67f41a91bc9aca70867dba877ec7276174344afc58adaf65c6e3ee7e483b39e8bff018080ffff80ffff01ffff33ffa07414b827d59ca447f82dd51a2672b0cbb1acf8d819d58774b62620b460d9cb43ff8600e8d4a51000ffffa0c7e1e8785e5b9672fe9dbb3d6b6c9d9810f13bcb2f66a48f612f01c1ba80552f8080ffff3cffa047dd5ceefbabf716dab535e57ad057fbfbb080165ccdc985429dde676efbf7498080ff80808080"
},
{
"coin": {
"amount": 999700000000,
"parent_coin_info": "0x4bc01742a2fd34c3e73f70325250df90078b27c4ce344c70cb30977800b266b0",
"puzzle_hash": "0x80877718b9cbb2cd8a74c16698d2b31e2c282fcb9eb3694d3637dab3777d7963"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0918b9dfaeb883c0addc43329396f6a18ab862989b0885f4fed046cf7f04b47bdc849f158be97c6b08e38e46e75c99843ff018080",
"solution": "0xff80ffff01ffff33ffa0258815e9a6a41d3dacc4d8959630fda6a0db14364751e58719b84c78df971b3bff8600e8bccd8c0080ffff34ff8405f5e10080ffff3cffa0ac7c3aeb418ff77a35fdb1d9e8fe97424c8757ffbfcee8f649385f5b4cf9244f80ffff3dffa088e357cca82523bd860af625729fa6bd31b05a7f837c0bbb1ebbe4193e2baf8f8080ff8080"
}
]
},
"to_address": "txch1ws2tsf74njjy07pd65dzvu4sewc6e7xcr82cwa9kycstgcxeedpsqf5r2a",
"to_puzzle_hash": "0x7414b827d59ca447f82dd51a2672b0cbb1acf8d819d58774b62620b460d9cb43",
"trade_id": null,
"type": 8,
"wallet_id": 1
},
"transaction_id": "0x66f7fd75bb4a2408d219d89f8588ba4dceb28e95cc3105822142780cdce5fecd"

split_coins

Functionality: Split one coin into one or more new coins

Usage: chia rpc wallet [OPTIONS] split_coins [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idTEXTTrueThe wallet ID for the origin of the transaction
target_coin_idTEXTTrueThe ID of the coin to split
number_of_coinsINTEGERTrueThe number of new coins to create, excluding the remainder coin (minimum 1, maximum 500)
amount_per_coinINTEGERTrueThe amount of each newly created coin, in the units of the coin (ex. XCH, CAT, etc)
feeINTEGERFalseAn optional blockchain fee, in mojos
info

This command requires a single coin to be specified for splitting. The maximum number of new coins is 500. These coins will be of equal value, and the original coin must contain sufficient funds for the splitting to occur. If any value remains after splitting, this will be stored in a new coin.

For example, if you split a coin worth 10 XCH, using "number_of_coins": 3 and "amount_per_coin": 1, then you will end up with three new coins worth 1 XCH each, along with another coin (the remainder of the original coin) worth 7 XCH.

When splitting a CAT, amount_per_coin refers to the CAT value, where 1 CAT is 1000 mojos.

Keep in mind that (by default) the dust filter will be activated if you have over 200 coins worth one million mojos in your wallet. Therefore, if you split a coin into more than 200 coins worth less than one million mojos, not all of them will show up in your wallet unless you modify or disable the dust filter (see the above link for instructions).

The minimum number of new coins is 1. "Splitting" one coin into one new coin could be useful because a second new coin will be created with the remaining value.

Example

Split a coin into three new coins of 100 mojos apiece, plus a remainder coin. Include a blockchain fee of 25 million mojos.

 chia rpc wallet split_coins '{"wallet_id": 1, "target_coin_id": "0x0451adca5edd164d524fea976792b73e8f745b8210fa8f890fca34a3d258a8d7", "number_of_coins": 3, "amount_per_coin": 100, "fee": 25000000}'

Response:

{
"success": true,
"transactions": [
{
"additions": [
{
"amount": 100,
"parent_coin_info": "0x89901362b3263b039feab8912ddf4410e77bf121e0cc20a741ae2a0e5cd638cd",
"puzzle_hash": "0x14139b3a24dbbb296cbf202b955c00a797eeec7c6456298a6b54e94d2ca715a0"
},
{
"amount": 100,
"parent_coin_info": "0x89901362b3263b039feab8912ddf4410e77bf121e0cc20a741ae2a0e5cd638cd",
"puzzle_hash": "0xe14a645e1d46353efe96d177dd57ad5f35d77aa9abe19b2c512368a1481abd81"
},
{
"amount": 100,
"parent_coin_info": "0x89901362b3263b039feab8912ddf4410e77bf121e0cc20a741ae2a0e5cd638cd",
"puzzle_hash": "0x27c0cd35e650b1aa8e2889694f0c164f2b9383c42f91946251df2aca50501417"
},
{
"amount": 1749975004700,
"parent_coin_info": "0x89901362b3263b039feab8912ddf4410e77bf121e0cc20a741ae2a0e5cd638cd",
"puzzle_hash": "0x07fb005e60a3f7a9b60db37378351ee638da4408a8af199e48f03401970b530a"
}
],
"amount": 300,
"confirmed": false,
"confirmed_at_height": 0,
"created_at_time": 1728973966,
"fee_amount": 25000000,
"memos": {},
"name": "0x865f0996c4b49e57db1035ce8f37aa38159913042d76b6d9b0678a2af80316a0",
"removals": [
{
"amount": 1750000000000,
"parent_coin_info": "0x37a90eb5185a9c4439a91ddc98bbadce0000000000000000000000000006cdfd",
"puzzle_hash": "0x6c479d3f54b92f19461e75f2148c09424aedbaa14ad57e9b9a723f73e0220f7e"
},
{
"amount": 5000,
"parent_coin_info": "0x7b049f25fb03e2659586031737a6da353577cc787b54bfa093e5bd6b76583867",
"puzzle_hash": "0x63cbf170899e4ba334b3c6dacce90f2fb11b7edb34d00bedf9b9824e0643dbbd"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": {
"aggregated_signature": "0x8a75afa050ba31a232183917fb6dadfce7aec22f9976144ac3389601b9be0c74aed6911dda706de6542d22c69ebbd0f904c8c9d4a14baee6169778f3d6d61f8600e6580805cc0af1bb7aeac05e72d6edbce9116abb15a054e0b1f54f9d5b914f",
"coin_spends": [
{
"coin": {
"amount": 1750000000000,
"parent_coin_info": "0x37a90eb5185a9c4439a91ddc98bbadce0000000000000000000000000006cdfd",
"puzzle_hash": "0x6c479d3f54b92f19461e75f2148c09424aedbaa14ad57e9b9a723f73e0220f7e"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b323951e45840af4678ca35f5c165448aa16f28f1ef2a36248ce95b07e0ca3e0fd34b994e8ededb388ffc42d562c15e7ff018080",
"solution": "0xff80ffff01ffff3cffa06dc403b674658a51d0a84d4c0d798d84f072e5f0d807f7f29628a76c7ce046ed80ffff33ffa014139b3a24dbbb296cbf202b955c00a797eeec7c6456298a6b54e94d2ca715a0ff6480ffff33ffa0e14a645e1d46353efe96d177dd57ad5f35d77aa9abe19b2c512368a1481abd81ff6480ffff33ffa027c0cd35e650b1aa8e2889694f0c164f2b9383c42f91946251df2aca50501417ff6480ffff33ffa007fb005e60a3f7a9b60db37378351ee638da4408a8af199e48f03401970b530aff86019772a3761c80ffff34ff84017d78408080ff8080"
},
{
"coin": {
"amount": 5000,
"parent_coin_info": "0x7b049f25fb03e2659586031737a6da353577cc787b54bfa093e5bd6b76583867",
"puzzle_hash": "0x63cbf170899e4ba334b3c6dacce90f2fb11b7edb34d00bedf9b9824e0643dbbd"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b7109039d38c18535bf90fafe62721b69a8112b6ee8ea625486877a08e55be4e4dc6362ec9e8edf2c94f438862c4aa5aff018080",
"solution": "0xff80ffff01ffff3dffa0c08cc1020b24e6e5a3ab563107e467c7fb232ac0bacae4e1db888777423adc638080ff8080"
}
]
},
"to_address": "txch1ylqv6d0x2zc64r3g39557rqkfu4e8q7y97gegcj3mu4v55zszsts3q7np5",
"to_puzzle_hash": "0x27c0cd35e650b1aa8e2889694f0c164f2b9383c42f91946251df2aca50501417",
"trade_id": null,
"type": 1,
"valid_times": {
"max_blocks_after_created": null,
"max_height": null,
"max_secs_after_created": null,
"max_time": null,
"min_blocks_since_created": null,
"min_height": null,
"min_secs_since_created": null,
"min_time": null
},
"wallet_id": 1
}
],
"unsigned_transactions": [
{
"signing_instructions": {
"key_hints": {
"path_hints": [
{
"path": [12381, 8444, 2, 2],
"root_fingerprint": "0xbd7ea085"
},
{
"path": [12381, 8444, 2, 126],
"root_fingerprint": "0xbd7ea085"
}
],
"sum_hints": [
{
"final_pubkey": "0xb323951e45840af4678ca35f5c165448aa16f28f1ef2a36248ce95b07e0ca3e0fd34b994e8ededb388ffc42d562c15e7",
"fingerprints": ["0xd6ec6f98"],
"synthetic_offset": "0x62466ba455dba328aa65267cd279ac1166dfc3235ec42401b0d3a31e2e2560ef"
},
{
"final_pubkey": "0xb7109039d38c18535bf90fafe62721b69a8112b6ee8ea625486877a08e55be4e4dc6362ec9e8edf2c94f438862c4aa5a",
"fingerprints": ["0xc5c2e33e"],
"synthetic_offset": "0x200c5c9f4f35cb688d04b54ef9ee1d17292ac7b05eb26338b6a058f1f5f0d820"
}
]
},
"targets": [
{
"fingerprint": "0xef8ee89b",
"hook": "0xadb951ec17c76b6460c7feec45a0408d232405ce9fb53d781ba7c1a9d003e758",
"message": "0xe59c695d61b21821a57c204d26bb2fe113dcaa774c9f7f50112bf38dce5a148489901362b3263b039feab8912ddf4410e77bf121e0cc20a741ae2a0e5cd638cd37a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615"
},
{
"fingerprint": "0xdd5f5807",
"hook": "0x9767d510677768fcd41d89fd3df68d5b9f8f9bc8359beea52acbfec8800f48bd",
"message": "0x6ab4496b04f3df23cc373bdc1063b56461b28b65e5aa0c8c9ec42d5b818823af0451adca5edd164d524fea976792b73e8f745b8210fa8f890fca34a3d258a8d737a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615"
}
]
},
"transaction_info": {
"spends": [
{
"coin": {
"amount": 1750000000000,
"parent_coin_id": "0x37a90eb5185a9c4439a91ddc98bbadce0000000000000000000000000006cdfd",
"puzzle_hash": "0x6c479d3f54b92f19461e75f2148c09424aedbaa14ad57e9b9a723f73e0220f7e"
},
"puzzle": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b323951e45840af4678ca35f5c165448aa16f28f1ef2a36248ce95b07e0ca3e0fd34b994e8ededb388ffc42d562c15e7ff018080",
"solution": "0xff80ffff01ffff3cffa06dc403b674658a51d0a84d4c0d798d84f072e5f0d807f7f29628a76c7ce046ed80ffff33ffa014139b3a24dbbb296cbf202b955c00a797eeec7c6456298a6b54e94d2ca715a0ff6480ffff33ffa0e14a645e1d46353efe96d177dd57ad5f35d77aa9abe19b2c512368a1481abd81ff6480ffff33ffa027c0cd35e650b1aa8e2889694f0c164f2b9383c42f91946251df2aca50501417ff6480ffff33ffa007fb005e60a3f7a9b60db37378351ee638da4408a8af199e48f03401970b530aff86019772a3761c80ffff34ff84017d78408080ff8080"
},
{
"coin": {
"amount": 5000,
"parent_coin_id": "0x7b049f25fb03e2659586031737a6da353577cc787b54bfa093e5bd6b76583867",
"puzzle_hash": "0x63cbf170899e4ba334b3c6dacce90f2fb11b7edb34d00bedf9b9824e0643dbbd"
},
"puzzle": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0b7109039d38c18535bf90fafe62721b69a8112b6ee8ea625486877a08e55be4e4dc6362ec9e8edf2c94f438862c4aa5aff018080",
"solution": "0xff80ffff01ffff3dffa0c08cc1020b24e6e5a3ab563107e467c7fb232ac0bacae4e1db888777423adc638080ff8080"
}
]
}
}
]
}

verify_signature

Functionality: Given a public key, message and signature, verify if it is valid.

Usage: chia rpc wallet [OPTIONS] verify_signature [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
signing_modeTEXTFalseSpecify the type of signature to verify [Default: BLS with hex input] (see below for more info)
pubkeyTEXTTrueThe public key of the signature to verify
messageTEXTTrueThe message to verify
signatureTEXTTrueThe signature to verify
addressTEXTTrueThe address, which must be derived from pubkey

The signing mode strings are stored in an enum. As of Chia 2.0.0, valid signing mode strings include:

  • BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:hexinput_
    • Default signing mode
    • Describes the standard BLS signatures used by Chia
    • Uses a hex input
    • Taken from ietf.org
    • Cipher suites used for BLS signatures are also defined at ietf.org
  • BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:utf8input_
    • Same as above, but uses UTF-8 instead of hex
  • BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:CHIP-0002_
    • CHIP-0002 signs the result of sha256tree(cons("Chia Signed Message", message)) using the BLS message augmentation scheme
  • BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_AUG:CHIP-0002_P2_DELEGATED_PUZZLE
    • Uses p2_delegated_puzzle
    • Supports signatures generated from Tangem cards

CATs and trading

cancel_offer

Functionality: Cancel an offer

Usage: chia rpc wallet [OPTIONS] cancel_offer [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
secureBOOLEANTrueSet to true to cancel on the blockchain by spending the coin(s) being offered; set to false to cancel in the wallet only. If false, the offer could still be taken if it has been shared
trade_idTEXTTrueThe ID of the offer to cancel
feeNUMBERFalseAn optional blockchain fee, in mojos
Example
chia rpc wallet cancel_offer '{"secure": true, "trade_id": "c4d9f06599e4ba30edfabecc72a03db7d7e86c003ab83520002a844cfebf2ef5", "fee": 1}'

Response:

{
"success": true
}

cancel_offers

Functionality: Cancel all offers, with the option to cancel only offers for a specific asset class

Usage: chia rpc wallet [OPTIONS] cancel_offers [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
secureBOOLEANTrueSet to true to cancel on the blockchain by spending the coin(s) being offered; set to false to cancel in the wallet only. If false, the offer could still be taken if it has been shared
batch_feeNUMBERFalseThe fee, in mojos, to add to each batch cancellation [Default: 0]
batch_sizeNUMBERFalseThe number of offers to cancel in each batch [Default: 5]
cancel_allBOOLEANFalseSet to true to cancel all offers for all assets [Default: false]
asset_idTEXTFalseIf cancel_all is false, then only cancel the specified type of asset [Default: xch]
Example
chia rpc wallet cancel_offers '{"secure": true}'

Response:

{
"success": true
}

cat_asset_id_to_name

Functionality: Retrieve a CAT's name from its ID

Usage: chia rpc wallet [OPTIONS] cat_asset_id_to_name [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
asset_idTEXTTrueThe ID of the CAT whose name you would like to retrieve. This CAT must be listed in your DEFAULT_CATS, ie the CATs your wallet recognizes
Example
chia rpc wallet cat_asset_id_to_name '{"asset_id": "1f9fd0d4a1221241df986f042e014c056571062c82a5ba9b88c866c92808e1a9"}'

Response:

{
"name": "New CAT Wallet",
"success": true,
"wallet_id": 2
}

cat_get_asset_id

Functionality: Retrieve the asset ID from a CAT wallet

Usage: chia rpc wallet [OPTIONS] cat_get_asset_id [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idNUMBERTrueThe wallet ID of the CAT whose ID you would like to retrieve
Example
chia rpc wallet cat_get_asset_id '{"wallet_id": 2}'

Response:

{
"asset_id": "1f9fd0d4a1221241df986f042e014c056571062c82a5ba9b88c866c92808e1a9",
"success": true,
"wallet_id": 2
}

cat_get_name

Functionality: Get the name of a CAT associated with a wallet ID

Usage: chia rpc wallet [OPTIONS] cat_get_name [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idNUMBERTrueThe wallet ID of the CAT whose name you would like to retrieve
Example
chia rpc wallet cat_get_name '{"wallet_id": 2}'

Response:

{
"name": "New CAT Wallet",
"success": true,
"wallet_id": 2
}

cat_set_name

Functionality: Rename a CAT wallet

Usage: chia rpc wallet [OPTIONS] cat_set_name [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idNUMBERTrueThe ID of the wallet whose name you would like to change
nameTEXTTrueThe new name for the wallet
Example
chia rpc wallet cat_set_name '{"wallet_id": 2, "name": "New CAT Wallet"}'

Response:

{
"success": true,
"wallet_id": 2
}

cat_spend

Functionality: Send CAT funds to another wallet

Usage: chia rpc wallet [OPTIONS] cat_spend [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
wallet_idTEXTTrueThe wallet ID for the origin of the transaction
additionsTEXT ARRAYTrue**Must include either additions or amount. A list of puzzle hashes and amounts to be included
amountNUMBERTrue**Must include either additions or amount. The number of mojos to send
inner_addressTEXTTrueThe destination address
memosTEXT ARRAYFalseAn optional array of memos to be sent with the transaction
coinsTEXT ARRAYFalseA list of coins to include in the spend
min_coin_amountNUMBERFalseThe minimum coin amount to send [Default: 0]
max_coin_amountNUMBERFalseThe maximum coin amount to send [Default: 0]
exclude_coin_amountsNUMBER ARRAYFalseA list of coin amounts to exclude
exclude_coin_idsTEXT ARRAYFalseA list of coin IDs to exclude
feeNUMBERFalseAn optional blockchain fee, in mojos
extra_deltaTEXTFalse*The CAT's extra_delta parameter; *If specified, then tail_reveal and tail_solution must also be specified
tail_revealTEXTFalse*The CAT's tail_reveal parameter; *If specified, then extra_delta and tail_solution must also be specified
tail_solutionTEXTFalse*The CAT's tail_solution parameter; *If specified, then extra_delta and tail_reveal must also be specified
reuse_puzhashBOOLEANFalseIf true, will not generate a new puzzle hash / address for this transaction only. Note that setting this parameter to true will override the global default setting from config.yaml
Example
chia rpc wallet cat_spend '{"wallet_id": 7, "amount": 1, "inner_address": "xch19mpn09rnn62nlur7h05naeeq2m6lprdr48f3cgt9j6s8a2h3kk6qdydujd", "fee": 1}'

Response:

{
"success": true,
"transaction": {
"additions": [
{
"amount": 1,
"parent_coin_info": "0x60a8b06515aaefe74236eb234130d769a1b65c99706414901277926fe29c3360",
"puzzle_hash": "0xfe6329b1d5aa73c22d6f9f3c76e97c9c0b07af5799ff70b023b77ccf87cd0e2c"
},
{
"amount": 999999,
"parent_coin_info": "0x60a8b06515aaefe74236eb234130d769a1b65c99706414901277926fe29c3360",
"puzzle_hash": "0xad5de77c7da1316b9b72708d17dbb8937855d740ebaf85669b8bd925275e8d49"
},
{
"amount": 39261664,
"parent_coin_info": "0x12c33763d41055dd71a7a5676ced26bef08e059255c16e59f76033f98dcfedd4",
"puzzle_hash": "0x43a21683130c97ed272becd70e02d60f1b86a180fd759e28bf0d94f7eedd0fa5"
}
],
"amount": 1,
"confirmed": false,
"confirmed_at_height": 0,
"created_at_time": 1669274635,
"fee_amount": 1,
"memos": {
"18ffd7f3bbadda1017218bb535caf7393190222ecf5fbdf04ed5f6855926d6dd": "2ec33794739e953ff07ebbe93ee72056f5f08da3a9d31c216596a07eaaf1b5b4"
},
"name": "0xb9df7b15f7a6b8e7b3903ae3834308a8a3d04943da96bff58b39c112e42b73ab",
"removals": [
{
"amount": 1000000,
"parent_coin_info": "0xe752c4dadffe6edcb14e83646e6d4d53f7b3d8d74d2c20ed138aa35f8230ceb1",
"puzzle_hash": "0x2a161b188eb77baa486653398d8bdc2194ff946f9a9b1d6f55f1ab0017623aa9"
},
{
"amount": 39261665,
"parent_coin_info": "0xeb17e80fcb72f15bfb28924f0bcd684df626646dca282bc88098cb0d59ffe1bb",
"puzzle_hash": "0x057539dee39ab1deddb31f72602e4a280c27e84c53ab92122735a044916619bb"
}
],
"sent": 0,
"sent_to": [],
"spend_bundle": {
"aggregated_signature": "0x961224367d0bb9f61c3cdc306266a00141dc10c895a0702a73a690799870657e365f05c629f99acf6ef5081c03e352af0b3d8701e208cbf4603d59b5cb8460f0036729d5c6938898a8f44114f62b75c6db371c8fc857fa8188502ecc4cdd81f2",
"coin_spends": [
{
"coin": {
"amount": 1000000,
"parent_coin_info": "0xe752c4dadffe6edcb14e83646e6d4d53f7b3d8d74d2c20ed138aa35f8230ceb1",
"puzzle_hash": "0x2a161b188eb77baa486653398d8bdc2194ff946f9a9b1d6f55f1ab0017623aa9"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ff5effff04ff02ffff04ffff04ff05ffff04ffff0bff34ff0580ffff04ff0bff80808080ffff04ffff02ff17ff2f80ffff04ff5fffff04ffff02ff2effff04ff02ffff04ff17ff80808080ffff04ffff02ff2affff04ff02ffff04ff82027fffff04ff82057fffff04ff820b7fff808080808080ffff04ff81bfffff04ff82017fffff04ff8202ffffff04ff8205ffffff04ff820bffff80808080808080808080808080ffff04ffff01ffffffff3d46ff02ff333cffff0401ff01ff81cb02ffffff20ff02ffff03ff05ffff01ff02ff32ffff04ff02ffff04ff0dffff04ffff0bff7cffff0bff34ff2480ffff0bff7cffff0bff7cffff0bff34ff2c80ff0980ffff0bff7cff0bffff0bff34ff8080808080ff8080808080ffff010b80ff0180ffff02ffff03ffff22ffff09ffff0dff0580ff2280ffff09ffff0dff0b80ff2280ffff15ff17ffff0181ff8080ffff01ff0bff05ff0bff1780ffff01ff088080ff0180ffff02ffff03ff0bffff01ff02ffff03ffff09ffff02ff2effff04ff02ffff04ff13ff80808080ff820b9f80ffff01ff02ff56ffff04ff02ffff04ffff02ff13ffff04ff5fffff04ff17ffff04ff2fffff04ff81bfffff04ff82017fffff04ff1bff8080808080808080ffff04ff82017fff8080808080ffff01ff088080ff0180ffff01ff02ffff03ff17ffff01ff02ffff03ffff20ff81bf80ffff0182017fffff01ff088080ff0180ffff01ff088080ff018080ff0180ff04ffff04ff05ff2780ffff04ffff10ff0bff5780ff778080ffffff02ffff03ff05ffff01ff02ffff03ffff09ffff02ffff03ffff09ff11ff5880ffff0159ff8080ff0180ffff01818f80ffff01ff02ff26ffff04ff02ffff04ff0dffff04ff0bffff04ffff04ff81b9ff82017980ff808080808080ffff01ff02ff7affff04ff02ffff04ffff02ffff03ffff09ff11ff5880ffff01ff04ff58ffff04ffff02ff76ffff04ff02ffff04ff13ffff04ff29ffff04ffff0bff34ff5b80ffff04ff2bff80808080808080ff398080ffff01ff02ffff03ffff09ff11ff7880ffff01ff02ffff03ffff20ffff02ffff03ffff09ffff0121ffff0dff298080ffff01ff02ffff03ffff09ffff0cff29ff80ff3480ff5c80ffff01ff0101ff8080ff0180ff8080ff018080ffff0109ffff01ff088080ff0180ffff010980ff018080ff0180ffff04ffff02ffff03ffff09ff11ff5880ffff0159ff8080ff0180ffff04ffff02ff26ffff04ff02ffff04ff0dffff04ff0bffff04ff17ff808080808080ff80808080808080ff0180ffff01ff04ff80ffff04ff80ff17808080ff0180ffff02ffff03ff05ffff01ff04ff09ffff02ff56ffff04ff02ffff04ff0dffff04ff0bff808080808080ffff010b80ff0180ff0bff7cffff0bff34ff2880ffff0bff7cffff0bff7cffff0bff34ff2c80ff0580ffff0bff7cffff02ff32ffff04ff02ffff04ff07ffff04ffff0bff34ff3480ff8080808080ffff0bff34ff8080808080ffff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff2effff04ff02ffff04ff09ff80808080ffff02ff2effff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ffff04ffff04ff30ffff04ff5fff808080ffff02ff7effff04ff02ffff04ffff04ffff04ff2fff0580ffff04ff5fff82017f8080ffff04ffff02ff26ffff04ff02ffff04ff0bffff04ff05ffff01ff808080808080ffff04ff17ffff04ff81bfffff04ff82017fffff04ffff02ff2affff04ff02ffff04ff8204ffffff04ffff02ff76ffff04ff02ffff04ff09ffff04ff820affffff04ffff0bff34ff2d80ffff04ff15ff80808080808080ffff04ff8216ffff808080808080ffff04ff8205ffffff04ff820bffff808080808080808080808080ff02ff5affff04ff02ffff04ff5fffff04ff3bffff04ffff02ffff03ff17ffff01ff09ff2dffff02ff2affff04ff02ffff04ff27ffff04ffff02ff76ffff04ff02ffff04ff29ffff04ff57ffff04ffff0bff34ff81b980ffff04ff59ff80808080808080ffff04ff81b7ff80808080808080ff8080ff0180ffff04ff17ffff04ff05ffff04ff8202ffffff04ffff04ffff04ff78ffff04ffff0eff5cffff02ff2effff04ff02ffff04ffff04ff2fffff04ff82017fff808080ff8080808080ff808080ffff04ffff04ff20ffff04ffff0bff81bfff5cffff02ff2effff04ff02ffff04ffff04ff15ffff04ffff10ff82017fffff11ff8202dfff2b80ff8202ff80ff808080ff8080808080ff808080ff138080ff80808080808080808080ff018080ffff04ffff01a037bef360ee858133b69d595a906dc45d01af50379dad515eb9518abb7c1d2a7affff04ffff01a00570076f3c2cd8d6e65f9b56f96ab92079d3ce7ab7372c751e1c19fdb42b25d4ffff04ffff01ff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b08059810f9c69bc54f8aeebafdbb47faca702105ba15f59152a80168944a751a1042a7affb1a09fc5379c4334fcd2d3f0ff018080ff0180808080",
"solution": "0xffff80ffff01ffff33ffa02ec33794739e953ff07ebbe93ee72056f5f08da3a9d31c216596a07eaaf1b5b4ff01ffffa02ec33794739e953ff07ebbe93ee72056f5f08da3a9d31c216596a07eaaf1b5b48080ffff33ffa0ee1d5710dcd99fd96ad38174bb4d0f87f04031abe15dc28d84415a251c67f1b9ff830f423f80ffff3cffa05e300a78dd793d53afb2a59039ea5f9661b9114b6ff006af9a5f9fdd088424948080ff8080ffffa094a128de0450c01d3d9e4b68516a2ec09fd219a3fe371d20ebbc47dd2f092faeffa0bae24162efbd568f89bc7a340798a6118df0189eb9e3f8697bcea27af99f8f79ff830f424080ffa060a8b06515aaefe74236eb234130d769a1b65c99706414901277926fe29c3360ffffa0e752c4dadffe6edcb14e83646e6d4d53f7b3d8d74d2c20ed138aa35f8230ceb1ffa02a161b188eb77baa486653398d8bdc2194ff946f9a9b1d6f55f1ab0017623aa9ff830f424080ffffa0e752c4dadffe6edcb14e83646e6d4d53f7b3d8d74d2c20ed138aa35f8230ceb1ffa0b361e26773b161ca94291a54353dfd7e257f18a8e9abbb49ee89718e8c8bfc0bff830f424080ff80ff8080"
},
{
"coin": {
"amount": 39261665,
"parent_coin_info": "0xeb17e80fcb72f15bfb28924f0bcd684df626646dca282bc88098cb0d59ffe1bb",
"puzzle_hash": "0x057539dee39ab1deddb31f72602e4a280c27e84c53ab92122735a044916619bb"
},
"puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b08ed87f7cda15feadd676e2677f4bc162176c408910dcbf29d79cfe6d1aff1c2f1d2897ab4e29f90cb91f605dc575705aff018080",
"solution": "0xff80ffff01ffff33ffa043a21683130c97ed272becd70e02d60f1b86a180fd759e28bf0d94f7eedd0fa5ff84025715e080ffff34ff0180ffff3cffa09840c31ad16cb371bdcaf0433554ff0e7a648e2517f530d004f2a08fa9e3ee6b80ffff3dffa0469663a0bb12424a04b8b0331c09a7887f23b50e64fd9cca4afac9d920d8246a8080ff8080"
}
]
},
"to_address": "xch19mpn09rnn62nlur7h05naeeq2m6lprdr48f3cgt9j6s8a2h3kk6qdydujd",
"to_puzzle_hash": "0x2ec33794739e953ff07ebbe93ee72056f5f08da3a9d31c216596a07eaaf1b5b4",
"trade_id": null,
"type": 1,
"wallet_id": 7
},
"transaction_id": "0xb9df7b15f7a6b8e7b3903ae3834308a8a3d04943da96bff58b39c112e42b73ab"
}

check_offer_validity

Functionality: Check if an offer is valid

Usage: chia rpc wallet [OPTIONS] check_offer_validity [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
offerTEXTTrueThe contents of the offer to check
Example
chia rpc wallet check_offer_validity '{"offer": "offer1qqzh3wcuu2rykcmqvpsxygqqwc7hynr6hum6e0mnf72sn7uvvkpt68eyumkhelprk0adeg42nlelk2mpagr90qq0a37v8lc9pfxkwhdhlns4tnwtx933g0gsj06neuds6jjugly4k5x7we0x39h9ur65y2cmwttg00ht60xnjly6zhduf0h9hmedaq67yh89uafrzctmgrka06llmvv9uhze9tqqpd38v8zcv4x32hhe7wueh4t8vd9cn6uhqk7vejppfygfgtje8usle5c5ukqmlw72va4pv8mweg5ztmcakwex27z9uamchklr2mtk7ax4tadcte8hq98380vuxcnfkjxndkjxrdk68rdk69rdk68ga95mfr2xhump4wrstastammnc2aav3hrd4ej8gexus0gje2urasruamdvrwvas9wm56mykj42pj6cp0vlymr5daw8k9e780kxd46wsh9u4e4tk7dw49w2epylahdz44aq2kj4ypthrsme4qwdncgdnwhlcw2amlhhsl6z0wlca7573y7knevrjjz4kpg80gnrlmlx7q6lh2rdtll6j6kh72t66vmwn25gwh5eqsd6wpqc6yqkn9luteq6nz0hh7yln3r7ct9yqecrfh95lyzace38xayytnu7x2fl4whv40e6etxehv03mwzdlnfttaxckmea7xle3hs0tzvlmdlch7qjzul97gymhjsew40ef2vmf6m8m4ntw0x08ceu7xkxm0fxjut754n9qd2anljlwpk49z4472n65af226w03fha2j7hyshuuh8gdr68z3a67atjcnl07vswj0clutncre6wt4la0au8vdlmxjn7fe8mqald7l8rh2hgls66uxhutuzdqmnr0ljlkyulq5t67rru25jnxjjyxntvllt2n4j244utj7ahu6avas47nlhrah2p5uursd0uteccgjtncy6e62uvn6tathamz0m0rfweuaaq5mevp6klth99dhf0f6hcqksxfpqmvhlpvyrtj2qjmvnwyr96saajuyp8vm70h7vhtw93vkmj7llmquru84g0vv80fd3eg65vhfrlm5yrgzs4pa95el4wa6w9nfkgvvazzek9eef4kd6zr6rjue6culxd8wdg5dglrevft9lc7hfljuc70hx9uq587fl64gp3s467zj58nvdaawuet3lvft8hvynv5j83tlg5phaeteme079hw6xn5dn54tm602ln2vgknvammql8fe7zuqzvfq20gc9s4d4"}'

Response:

{
"success": true,
"valid": true
}

create_offer_for_ids

Functionality: Create a new offer

Usage: chia rpc wallet [OPTIONS] create_offer_for_ids [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
offerTEXTTrueThe offer to create
validate_onlyBOOLEANFalseOnly validate the offer instead of creating it [Default: false]
driver_dictDICTTrueA dictionary of keys and values associated with the offer
min_coin_amountNUMBERFalseThe minimum coin amount to select for the offer [Default: none]
max_coin_amountNUMBERFalseThe maximum coin amount to select for the offer [Default: none]
solverTEXTFalseA marshalled solver
feeNUMBERFalseAn optional blockchain fee, in mojos
reuse_puzhashBOOLEANFalseIf true, will not generate a new puzzle hash / address for this transaction only. Note that setting this parameter to true will override the global default setting from config.yaml

get_all_offers

Functionality: Show the details of all offers for this wallet

Usage: chia rpc wallet [OPTIONS] get_all_offers [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
startNUMBERFalseThe sequence number of the first offer to show [Default: 0]
endNUMBERFalseThe sequence number of the last offer to show [Default: 10]
exclude_my_offersBOOLEANFalseSet to true to exclude offers you originated [Default: false]
exclude_taken_offersBOOLEANFalseSet to true to exclude offers that have already been taken [Default: false]
include_completedBOOLEANFalseSet to true to include offers that have been taken [Default: false]
sort_keyNUMBERFalseSpecify the key for sorting, sort_keys members [Default: confirmed_at_height]
reverseBOOLEANFalseSet to true to sort the results in reverse order [Default: false]
file_contentsBOOLEANFalseSet to true to display the contents of each offer [Default: false]
Example
chia rpc wallet get_all_offers

Response:

{
"offers": null,
"success": true,
"trade_records": [
{
"accepted_at_time": null,
"coins_of_interest": [
{
"amount": 999999,
"parent_coin_info": "0x60a8b06515aaefe74236eb234130d769a1b65c99706414901277926fe29c3360",
"puzzle_hash": "0xad5de77c7da1316b9b72708d17dbb8937855d740ebaf85669b8bd925275e8d49"
}
],
"confirmed_at_index": 0,
"created_at_time": 1669275137,
"is_my_offer": true,
"pending": {
"0570076f3c2cd8d6e65f9b56f96ab92079d3ce7ab7372c751e1c19fdb42b25d4": 999999
},
"sent": 0,
"sent_to": [],
"status": "PENDING_ACCEPT",
"summary": {
"fees": 0,
"infos": {
"0570076f3c2cd8d6e65f9b56f96ab92079d3ce7ab7372c751e1c19fdb42b25d4": {
"tail": "0x0570076f3c2cd8d6e65f9b56f96ab92079d3ce7ab7372c751e1c19fdb42b25d4",
"type": "CAT"
}
},
"offered": {
"0570076f3c2cd8d6e65f9b56f96ab92079d3ce7ab7372c751e1c19fdb42b25d4": 1000
},
"requested": {
"xch": 1000000000000
}
},
"taken_offer": null,
"trade_id": "0x84d14398c1a38f376953bf8fa76cbee0d3216b382266d38b5612f17e96bcd1de"
}
]
}

get_cat_list

Functionality: Return the default CAT list

Usage: chia rpc wallet [OPTIONS] get_cat_list [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example

Get the default CAT list:

chia rpc wallet get_cat_list

Response:

{
"cat_list": [
{
"asset_id": "a628c1c2c6fcb74d53746157e438e108eab5c0bb3e5c80ff9b1910b3e4832913",
"name": "Spacebucks",
"symbol": "SBX"
},
{
"asset_id": "8ebf855de6eb146db5602f0456d2f0cbe750d57f821b6f91a8592ee9f1d4cf31",
"name": "Marmot",
"symbol": "MRMT"
},
{
"asset_id": "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589",
"name": "Stably USD",
"symbol": "USDS"
},
{
"asset_id": "509deafe3cd8bbfbb9ccce1d930e3d7b57b40c964fa33379b18d628175eb7a8f",
"name": "Chia Holiday 2021 Token",
"symbol": "CH21"
}
],
"success": true
}

get_offer

Functionality: Show the details of one offer

Usage: chia rpc wallet [OPTIONS] get_offer [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
trade_idTEXTTrueThe offer's ID
file_contentsTEXTFalseThe contents of the offer. Required if the offer's info is not stored in the database for this wallet
Example
chia rpc wallet get_offer '{"trade_id": "c4d9f06599e4ba30edfabecc72a03db7d7e86c003ab83520002a844cfebf2ef5"}'

Response:

{
"offer": null,
"success": true,
"trade_record": {
"accepted_at_time": null,
"coins_of_interest": [
{
"amount": 998999,
"parent_coin_info": "0xc40219a0d62cd481f2a47fdedc5ef1c936f3dea0d8a751794dba233c8aeac790",
"puzzle_hash": "0x91362b7593aab3bcc4d3f5c0b3e9952b5eeccd0b22e06d1ce6242d6fce9b6526"
},
{
"amount": 100000,
"parent_coin_info": "0x5e0ec48322fff686044e02d159e2679fba716cab80f4fb10fdf42a775f85604a",
"puzzle_hash": "0xa023dfcc927f2c5f71fb9f4cd81078d478448452c10acac9156e3b51bd7abe63"
}
],
"confirmed_at_index": 0,
"created_at_time": 1669280986,
"is_my_offer": true,
"pending": {
"0570076f3c2cd8d6e65f9b56f96ab92079d3ce7ab7372c751e1c19fdb42b25d4": 998999,
"unknown": 100000
},
"sent": 0,
"sent_to": [],
"status": "PENDING_ACCEPT",
"summary": {
"fees": 1,
"infos": {
"0570076f3c2cd8d6e65f9b56f96ab92079d3ce7ab7372c751e1c19fdb42b25d4": {
"tail": "0x0570076f3c2cd8d6e65f9b56f96ab92079d3ce7ab7372c751e1c19fdb42b25d4",
"type": "CAT"
}
},
"offered": {
"0570076f3c2cd8d6e65f9b56f96ab92079d3ce7ab7372c751e1c19fdb42b25d4": 1000
},
"requested": {
"xch": 10000
}
},
"taken_offer": null,
"trade_id": "0xc4d9f06599e4ba30edfabecc72a03db7d7e86c003ab83520002a844cfebf2ef5"
}
}

get_offers_count

Functionality: Obtain the number of offers from the current wallet

Usage: chia rpc wallet [OPTIONS] get_offers_count [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters: None

Example
chia rpc wallet get_offers_count

Response:

{
"my_offers_count": 0,
"success": true,
"taken_offers_count": 1,
"total": 1
}

get_offer_summary

Functionality: Show a summary of an offer

Usage: chia rpc wallet [OPTIONS] get_offer_summary [REQUEST]

Options:

Short CommandLong CommandTypeRequiredDescription
-j--json-fileFILENAMEFalseOptionally instead of REQUEST you can provide a json file containing the request data
-h--helpNoneFalseShow a help message and exit

Request Parameters:

FlagTypeRequiredDescription
offerTEXTTrueThe offer for which to retrieve a summary
advancedBOOLEANFalseSet to true to show a detailed summary [Default: false]
Example
chia rpc wallet get_offer_summary '{"offer": "offer1qqzh3wcuu2rykcmqvpsxygqqwc7hynr6hum6e0mnf72sn7uvvkpt68eyumkhelprk0adeg42nlelk2mpagr90qq0a37v8lc9pfxkwhdhlns4tnwtx933g0gsj06neuds6jjugly4k5x7we0x39h9ur65y2cmwttg00ht60xnjly6zhduf0h9hmedaq67yh89uafrzctmgrka06llmvv9uhze9tqqpd38v8zcv4x32hhe7wueh4t8vd9cn6uhqk7vejppfygfgtje8usle5c5ukqmlw72va4pv8mweg5ztmcakwex27z9uamchklr2mtk7ax4tadcte8hq98380vuxcnfkjxndkjxrdk68rdk69rdk68ga95mfr2xhump4wrstastammnc2aav3hrd4ej8gexus0gje2urasruamdvrwvas9wm56mykj42pj6cp0vlymr5daw8k9e780kxd46wsh9u4e4tk7dw49w2epylahdz44aq2kj4ypthrsme4qwdncgdnwhlcw2amlhhsl6z0wlca7573y7knevrjjz4kpg80gnrlmlx7q6lh2rdtll6j6kh72t66vmwn25gwh5eqsd6wpqc6yqkn9luteq6nz0hh7yln3r7ct9yqecrfh95lyzace38xayytnu7x2fl4whv40e6etxehv03mwzdlnfttaxckmea7xle3hs0tzvlmdlch7qjzul97gymhjsew40ef2vmf6m8m4ntw0x08ceu7xkxm0fxjut754n9qd2anljlwpk49z4472n65af226w03fha2j7hyshuuh8gdr68z3a67atjcnl07vswj0clutncre6wt4la0au8vdlmxjn7fe8mqald7l8rh2hgls66uxhutuzdqmnr0ljlkyulq5t67rru25jnxjjyxntvllt2n4j244utj7ahu6avas47nlhrah2p5uursd0uteccgjtncy6e62uvn6tathamz0m0rfweuaaq5mevp6klth99dhf0f6hcqksxfpqmvhlpvyrtj2qjmvnwyr96saajuyp8vm70h7vhtw93vkmj7llmquru84g0vv80fd3eg65vhfrlm5yrgzs4pa95el4wa6w9nfkgvvazzek9eef4kd6zr6rjue6culxd8wdg5dglrevft9lc7hfljuc70hx9uq587fl64gp3s467zj58nvdaawuet3lvft8hvynv5j83tlg5phaeteme079hw6xn5dn54tm602ln2vgknvammql8fe7zuqzvfq20gc9s4d4", "advanced": true}'

Response: