Download OpenAPI specification:Download
The Chia node and services come with a JSON RPC API server that allows you to access information and control the services. These are accessible via HTTPS, WebSockets, or via client SDKs. The ports can be configured in ~/.chia/mainnet/config/config.yaml
. The RPC ports should not be exposed to the internet. TLS certificates are used to secure the communication using mutualTLS.
The data layer uses port 8562 by default.
The data layer RPC API is exposed, by default, on port 8561 and contains methods interacting with =off-chain data.
Creates a data store.
fee | integer <uint64> Default: 0 |
{- "fee": 0
}
{- "txs": [
- {
- "confirmed_at_height": 2863494,
- "created_at_time": 1669182237,
- "to_puzzle_hash": "0xb6ed191a2f80194f49fe33e9b9254642ca942ee287faeca2a45f4b96a5c0875a",
- "amount": 100,
- "fee_amount": 0,
- "confirmed": true,
- "sent": 10,
- "spend_bundle": {
- "aggregated_signature": "0xa5e5ea1f5ae2335a72fe0a7ed7ca39e8f142e2e1f6e37a348482290e88eb9cea2d973acf6145e34d0afeee7ba22f99850641e21a549b2c092bb49aa393acd938825bccca9413c1a268ba44367bc8433cd0fc0eb82e87bebe23817aa695bdb566",
- "coin_spends": [
- {
- "coin": {
- "amount": 1750000000000,
- "parent_coin_info": "0xccd5bb71183532bff220ba46c268991a00000000000000000000000000004082",
- "puzzle_hash": "0x94c6db00186900418ef7c1f05e127ee1a647cbe6e514ec3bc57acb7bbe6dfb10"
}, - "puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0aec9c2e5984fe928406abca942d55ec6b56340af8315bfefa55889dbaade669b9fd3f330af2af44c2a0626d383e64757ff018080",
- "solution": "0xff80ffff01ffff33ffa03fa549a708302b401c45cf387f8f03b4f76b7c9eabf567bea974f61dedf721e0ff840098968080ffff33ffa055b9fe4c9ce0cef8ad574bf5a9158dc0db7848b96be1a98ab2806d8f0a376a08ff860197738845808080ff8080"
}
]
}, - "additions": [
- {
- "amount": 100,
- "parent_coin_info": "0xabbb6c6859db74e8e627f21263c078893383131bcf22faec68b2de914d03e59f",
- "puzzle_hash": "0xb4a41bbce457745b006181ab99e34a0cbd8c83c196bc74fc98eb3aec882ed784"
}
], - "removals": [
- {
- "amount": 100,
- "parent_coin_info": "0x9c0083d8da8733c899787e4dcf18a56bc944f49ed668808e20890f01cbc35f37",
- "puzzle_hash": "0xb4a41bbce457745b006181ab99e34a0cbd8c83c196bc74fc98eb3aec882ed784"
}
], - "wallet_id": 2,
- "sent_to": [ ],
- "trade_id": null,
- "type": 0,
- "name": "0x43f6811a4daf18622fc7f132f5166a1246056b4a983b7befccb7e4b2e2c57f3b",
- "memos": { },
- "valid_times": {
- "min_secs_since_created": 0,
- "min_time": 0,
- "min_blocks_since_created": 0,
- "min_height": 0,
- "max_secs_after_created": 0,
- "max_time": 0,
- "max_blocks_after_created": 0,
- "max_height": 0
}
}
], - "id": "string",
- "success": true,
- "error": "string"
}
Gets the list of owned store ids.
Empty request body
{ }
{- "store_ids": [
- "string"
], - "success": true,
- "error": "string"
}
Applies a batch of updates.
id required | string <bytes32> |
Array of objects (change) | |
fee | integer <uint64> Default: 0 |
submit_on_chain | boolean Default: true |
{- "id": "string",
- "changelist": [
- {
- "reference_node_hash": "string",
- "side": 0,
- "value": "string"
}
], - "fee": 0,
- "submit_on_chain": true
}
{- "tx_id": "string",
- "success": true,
- "error": "string"
}
Get the value for a given id/key pair.
id required | string <bytes32> |
key required | string <bytes32> |
root_hash | string <bytes32> |
{- "id": "string",
- "key": "string",
- "root_hash": "string"
}
{- "value": "string",
- "success": true,
- "error": "string"
}
Get the keys for a given id/root_hash pair.
id required | string <bytes32> |
root_hash required | string <bytes32> |
page | integer <int32> |
max_page_size | integer <int32> |
{- "id": "string",
- "root_hash": "string",
- "page": 0,
- "max_page_size": 0
}
{- "keys": [
- "string"
], - "root_hash": "string",
- "total_pages": 0,
- "total_bytes": 0,
- "success": true,
- "error": "string"
}
Get the keys and values for a given id/root_hash pair.
id required | string <bytes32> |
root_hash required | string <bytes32> |
page | integer <int32> |
max_page_size | integer <int32> |
{- "id": "string",
- "root_hash": "string",
- "page": 0,
- "max_page_size": 0
}
{- "keys_values": [
- {
- "hash": "string",
- "key": "string",
- "value": "string"
}
], - "root_hash": "string",
- "total_pages": 0,
- "total_bytes": 0,
- "success": true,
- "error": "string"
}
Gets the list of ancestors for a given id/hash pair.
id required | string <bytes32> |
hash required | string <bytes32> |
{- "id": "string",
- "hash": "string"
}
{- "ancestors": [
- {
- "hash": "string",
- "left_hash": "string",
- "right_hash": "string",
- "pair": [
- { }
], - "atom": "string"
}
], - "success": true,
- "error": "string"
}
Gets the sync status of a store.
id required | string <bytes32> |
{- "id": "string"
}
{- "sync_status": {
- "root_hash": "string",
- "generation": 0,
- "target_root_hash": "string",
- "target_generation": 0
}, - "success": true,
- "error": "string"
}
Gets hash of latest tree root.
id required | string <bytes32> |
{- "id": "string"
}
{- "hash": "string",
- "confirmed": true,
- "timestamp": 0,
- "success": true,
- "error": "string"
}
Gets hash of latest tree root saved in our local datastore.
id required | string <bytes32> |
{- "id": "string"
}
{- "hash": "string",
- "success": true,
- "error": "string"
}
Gets state hashes for a list of roots.
ids required | Array of strings <bytes32> [ items <bytes32 > ] |
{- "ids": [
- "string"
]
}
{- "root_hashes": [
- {
- "id": "string",
- "hash": "string",
- "confirmed": true,
- "timestamp": 0
}
], - "success": true,
- "error": "string"
}
Removes a list of rows.
key required | string <bytes32> |
id required | string <bytes32> |
fee | integer <uint64> Default: 0 |
{- "key": "string",
- "id": "string",
- "fee": 0
}
{- "tx_id": "string",
- "success": true,
- "error": "string"
}
Adds a list of clvm objects as bytes to add to table.
value required | string <bytes32> |
id required | string <bytes32> |
fee | integer <uint64> Default: 0 |
{- "value": "string",
- "id": "string",
- "fee": 0
}
{- "tx_id": "string",
- "success": true,
- "error": "string"
}
Get kv diff between two root hashes.
id required | string <bytes32> |
hash_1 required | string <bytes32> |
hash_2 required | string <bytes32> |
page | integer <int32> |
max_page_size | integer <int32> |
{- "id": "string",
- "hash_1": "string",
- "hash_2": "string",
- "page": 0,
- "max_page_size": 0
}
{- "diff": [
- {
- "type": "string",
- "key": "string",
- "value": "string"
}
], - "total_pages": 0,
- "total_bytes": 0,
- "success": true,
- "error": "string"
}
Get history of state hashes for a store.
id required | string <bytes32> |
{- "id": "string"
}
{- "root_history": [
- {
- "root_hash": "string",
- "confirmed": true,
- "timestamp": 0
}
], - "success": true,
- "error": "string"
}
Complete the data server files.
ids required | Array of strings <bytes32> [ items <bytes32 > ] |
overwrite | boolean Default: false |
foldername | string |
{- "ids": [
- "string"
], - "overwrite": false,
- "foldername": "string"
}
{- "success": true,
- "error": "string"
}
Logs into the wallet.
fingerprint required | integer <uint32> |
{- "fingerprint": 0
}
{- "success": true,
- "error": "string"
}
Retrieves a proof.
store_id required | string <bytes32> |
keys | Array of strings <bytes32> [ items <bytes32 > ] |
{- "store_id": "string",
- "keys": [
- "string"
]
}
{- "proof": {
- "coin_id": "string",
- "inner_puzzle_hash": "string",
- "store_proofs": {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "proofs": [
- {
- "key": "9999",
- "layers": [
- {
- "combined_hash": "0a3024099e40c27cfe294ce91bdabf727887fecd406d7208c53297f79d4e8902",
- "other_hash": "cd4046b6c3b03e20afd506b50e552f1b698283d72566732134437fcb364c47a5",
- "other_hash_side": "left"
}, - {
- "combined_hash": "568ca0020114772138db61001c63ac8574a7c8c76c051dd2d3e28964496aa88c",
- "other_hash": "919735911d7f9ca0de316878ddb92e7772c9f39bf9d37e9d84ccab39f5d49a11",
- "other_hash_side": "left"
}
], - "node_hash": "b87c24e0521f559236a2e06d6e1bb196c138c1c9bfcadad3b25708e7eab97ca7",
- "value": "abc123"
}
]
}
}, - "success": true,
- "error": "string"
}
Verifies a proof.
coin_id | string <bytes32> |
inner_puzzle_hash | string <bytes32> |
object (store_proofs) |
{- "coin_id": "string",
- "inner_puzzle_hash": "string",
- "store_proofs": {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "proofs": [
- {
- "key": "9999",
- "layers": [
- {
- "combined_hash": "0a3024099e40c27cfe294ce91bdabf727887fecd406d7208c53297f79d4e8902",
- "other_hash": "cd4046b6c3b03e20afd506b50e552f1b698283d72566732134437fcb364c47a5",
- "other_hash_side": "left"
}, - {
- "combined_hash": "568ca0020114772138db61001c63ac8574a7c8c76c051dd2d3e28964496aa88c",
- "other_hash": "919735911d7f9ca0de316878ddb92e7772c9f39bf9d37e9d84ccab39f5d49a11",
- "other_hash_side": "left"
}
], - "node_hash": "b87c24e0521f559236a2e06d6e1bb196c138c1c9bfcadad3b25708e7eab97ca7",
- "value": "abc123"
}
]
}
}
{- "current_root": true,
- "verified_clvm_hashes": {
- "store_id": "string",
- "inclusions": [
- {
- "key_clvm_hash": "string",
- "value_clvm_hash": "string"
}
]
}, - "success": true,
- "error": "string"
}
Submits a pending root.
store_id required | string <bytes32> |
fee | integer <uint64> Default: 0 |
{- "store_id": "string",
- "fee": 0
}
{- "tx_id": "string",
- "success": true,
- "error": "string"
}
Applies a batch of updates, across 1:n stores.
required | Array of objects |
submit_on_chain | boolean Default: true |
fee | integer <uint64> Default: 0 |
{- "store_updates": [
- {
- "store_id": "string",
- "changelist": [
- {
- "reference_node_hash": "string",
- "side": 0,
- "value": "string"
}
]
}
], - "submit_on_chain": true,
- "fee": 0
}
{- "success": true,
- "error": "string"
}
Submits all pending roots.
fee | integer <uint64> Default: 0 |
{- "fee": 0
}
{- "tx_id": "string",
- "success": true,
- "error": "string"
}
Adds a mirror.
id required | string <bytes32> |
amount required | integer <uint64> |
urls required | Array of strings <bytes32> [ items <bytes32 > ] |
fee | integer <uint64> Default: 0 |
{- "id": "string",
- "amount": 0,
- "urls": [
- "string"
], - "fee": 0
}
{- "success": true,
- "error": "string"
}
Deletes a mirror.
coin_id required | string <bytes32> |
fee | integer <uint64> Default: 0 |
{- "coin_id": "string",
- "fee": 0
}
{- "success": true,
- "error": "string"
}
Gets the mirrors for a given store id.
id required | string <bytes32> |
{- "id": "string"
}
{- "mirrors": [
- {
- "coin_id": "b5756487c17fe3a2628e45a9d3d42e89231af718bb1735e6c8441e07ec005f9d",
- "launcher_id": "1a119374fc7d7055d3419fdcd7f93065f28a1e4acacdf9c73b933b27b685550f",
- "amount": 1000,
- "ours": true
}
], - "success": true,
- "error": "string"
}
Subscribe to singleton.
urls | Array of strings <bytes32> [ items <bytes32 > ] |
id required | string <bytes32> |
{- "urls": [
- "string"
], - "id": "string"
}
{- "success": true,
- "error": "string"
}
Unsubscribe from singleton.
id required | string <bytes32> |
retain | boolean Default: false |
{- "id": "string",
- "retain": false
}
{- "success": true,
- "error": "string"
}
Removes subscriptions for the given id.
urls | Array of strings <bytes32> [ items <bytes32 > ] |
id required | string <bytes32> |
{- "urls": [
- "string"
], - "id": "string"
}
{- "success": true,
- "error": "string"
}
List current subscriptions.
Empty request body
{ }
{- "store_ids": [
- "string"
], - "success": true,
- "error": "string"
}
Checks the status of plugins.
Empty request body
{ }
{- "uploaders": {
- "property1": { },
- "property2": { }
}, - "downloaders": {
- "property1": { },
- "property2": { }
}, - "success": true,
- "error": "string"
}
Clears pending roots.
store_id required | string <bytes32> |
{- "store_id": "string"
}
{- "tree_id": "string",
- "node_hash": "string",
- "generation": 0,
- "status": 1,
- "success": true,
- "error": "string"
}
Makes an offer.
required | Array of objects (offer_store) |
required | Array of objects (offer_store) |
fee | integer <uint64> Default: 0 |
{- "maker": [
- {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "inclusions": [
- {
- "key": "9999",
- "value": "abc123"
}
]
}
], - "taker": [
- {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "inclusions": [
- {
- "key": "9999",
- "value": "abc123"
}
]
}
], - "fee": 0
}
{- "offer": {
- "trade_id": "string",
- "offer": "string",
- "maker": {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "proofs": [
- {
- "key": "9999",
- "layers": [
- {
- "combined_hash": "0a3024099e40c27cfe294ce91bdabf727887fecd406d7208c53297f79d4e8902",
- "other_hash": "cd4046b6c3b03e20afd506b50e552f1b698283d72566732134437fcb364c47a5",
- "other_hash_side": "left"
}, - {
- "combined_hash": "568ca0020114772138db61001c63ac8574a7c8c76c051dd2d3e28964496aa88c",
- "other_hash": "919735911d7f9ca0de316878ddb92e7772c9f39bf9d37e9d84ccab39f5d49a11",
- "other_hash_side": "left"
}
], - "node_hash": "b87c24e0521f559236a2e06d6e1bb196c138c1c9bfcadad3b25708e7eab97ca7",
- "value": "abc123"
}
]
}, - "taker": {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "inclusions": [
- {
- "key": "9999",
- "value": "abc123"
}
]
}
}, - "success": true,
- "error": "string"
}
Takes an offer.
required | object (offer) |
fee | integer <uint64> Default: 0 |
{- "offer": {
- "trade_id": "string",
- "offer": "string",
- "maker": {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "proofs": [
- {
- "key": "9999",
- "layers": [
- {
- "combined_hash": "0a3024099e40c27cfe294ce91bdabf727887fecd406d7208c53297f79d4e8902",
- "other_hash": "cd4046b6c3b03e20afd506b50e552f1b698283d72566732134437fcb364c47a5",
- "other_hash_side": "left"
}, - {
- "combined_hash": "568ca0020114772138db61001c63ac8574a7c8c76c051dd2d3e28964496aa88c",
- "other_hash": "919735911d7f9ca0de316878ddb92e7772c9f39bf9d37e9d84ccab39f5d49a11",
- "other_hash_side": "left"
}
], - "node_hash": "b87c24e0521f559236a2e06d6e1bb196c138c1c9bfcadad3b25708e7eab97ca7",
- "value": "abc123"
}
]
}, - "taker": {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "inclusions": [
- {
- "key": "9999",
- "value": "abc123"
}
]
}
}, - "fee": 0
}
{- "trade_id": "string",
- "success": true,
- "error": "string"
}
Verifies an offer.
required | object (offer) |
fee | integer <uint64> Default: 0 |
{- "offer": {
- "trade_id": "string",
- "offer": "string",
- "maker": {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "proofs": [
- {
- "key": "9999",
- "layers": [
- {
- "combined_hash": "0a3024099e40c27cfe294ce91bdabf727887fecd406d7208c53297f79d4e8902",
- "other_hash": "cd4046b6c3b03e20afd506b50e552f1b698283d72566732134437fcb364c47a5",
- "other_hash_side": "left"
}, - {
- "combined_hash": "568ca0020114772138db61001c63ac8574a7c8c76c051dd2d3e28964496aa88c",
- "other_hash": "919735911d7f9ca0de316878ddb92e7772c9f39bf9d37e9d84ccab39f5d49a11",
- "other_hash_side": "left"
}
], - "node_hash": "b87c24e0521f559236a2e06d6e1bb196c138c1c9bfcadad3b25708e7eab97ca7",
- "value": "abc123"
}
]
}, - "taker": {
- "store_id": "14d1c3042ef38d76796146e6248e02b73db7a0eeefb740fa2e8439dad15bca27",
- "inclusions": [
- {
- "key": "9999",
- "value": "abc123"
}
]
}
}, - "fee": 0
}
{- "valid": true,
- "fee": 0,
- "success": true,
- "error": "string"
}
Cancels an offer.
object | |
fee | integer <uint64> Default: 0 |
{- "offer": {
- "trade_id": "string",
- "secure": true
}, - "fee": 0
}
{- "success": true,
- "error": "string"
}