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 daemon uses port 55400 by default.
The daemon interface is exposed on port 55400 by default and uses WebSockets only. It can be used to interact with other service endpoints.
Registers this daemon to receive messages. This is needed to receive responses from services other than the daemon.
Request body with the name of a service
service required | string |
{- "service": "string"
}
{- "queue": [
- {
- "delay": 0,
- "deleted": true,
- "error": "string",
- "id": "string",
- "log": "string",
- "log_new": "string",
- "parallel": true,
- "queue": "string",
- "size": 25,
- "state": "string"
}
], - "success": true,
- "error": "string"
}
Starts the named service.
Request body with the name of a service
service required | string |
{- "service": "string"
}
{- "success": true,
- "error": "string"
}
Stops the named service.
Request body with the name of a service
service required | string |
{- "service": "string"
}
{- "success": true,
- "error": "string"
}
Tells the daemon at the RPC endpoint to exit. There isn't a way to start the daemon remotely via RPC, so take care that you have access to the RPC host if needed.
Empty request body
{ }
{- "success": true,
- "error": "string"
}
Determines if the named service is running.
Request body with the name of a service
service required | string |
{- "service": "string"
}
{- "is_running": true,
- "success": true,
- "error": "string"
}
Indicator if the genesis block is initialized.
Empty request body
{ }
{- "genesis_initialized": true,
- "success": true,
- "error": "string"
}
Returns the list of running services.
Empty request body
{ }
{- "running_services": [
- "string"
], - "success": true,
- "error": "string"
}
Returns the list of addresses.
Input parameters
fingerprints | Array of integers <uint32> [ items <uint32 > ] |
index | integer <uint32> |
count | integer <uint32> |
non_observer_derivation | boolean Default: false |
{- "fingerprints": [
- 0
], - "index": 0,
- "count": 0,
- "non_observer_derivation": false
}
{- "wallet_addresses": {
- "property1": [
- "string"
], - "property2": [
- "string"
]
}, - "success": true,
- "error": "string"
}
Returns whether the keyring is in a locked state. If the keyring doesn't have a master passphrase set, or if a master passphrase is set and the cached passphrase is valid, the keyring is "unlocked".
Empty request body
{ }
{- "is_keyring_locked": true,
- "success": true,
- "error": "string"
}
Get detailed status of the key ring.
Empty request body
{ }
{- "is_keyring_locked": true,
- "passphrase_support_enabled": true,
- "can_save_passphrase": true,
- "user_passphrase_is_set": true,
- "needs_migration": true,
- "can_remove_legacy_keys": true,
- "can_set_passphrase_hint": true,
- "passphrase_hint": "string",
- "passphrase_requirements": {
- "is_optional": true,
- "min_length": 0
}, - "success": true,
- "error": "string"
}
Test the validity of a passphrase.
The passphrase
key | string |
{- "key": "string"
}
{- "success": true,
- "error": "string"
}
Update the key ring passphrase.
The passphrase options
current_passphrase | string |
new_passphrase required | string |
passphrase_hint | string |
save_passphrase | boolean Default: false |
{- "current_passphrase": "string",
- "new_passphrase": "string",
- "passphrase_hint": "string",
- "save_passphrase": false
}
{- "success": true,
- "error": "string"
}
Remove the key ring passphrase.
The passphrase
current_passphrase required | string |
{- "current_passphrase": "string"
}
{- "success": true,
- "error": "string"
}
Adds a private key to the keychain, with the given entropy and passphrase. The keychain itself will store the public key, and the entropy bytes, but not the passphrase.
The private key
mnemonic required | string |
passphrase required | string |
{- "mnemonic": "string",
- "passphrase": "string"
}
{- "success": true,
- "error": "string",
- "error_details": {
- "message": "string"
}, - "fingerprint": 0
}
Check the keys.
The config root path
root_path required | string |
{- "root_path": "string"
}
{- "success": true,
- "error": "string",
- "error_details": {
- "message": "string"
}
}
Deletes all keys from the keychain.
Empty request body
{ }
{- "success": true,
- "error": "string"
}
Deletes all keys which have the given public key fingerprint.
The fingerprint
fingerprint required | integer <uint32> |
{- "fingerprint": 0
}
{- "success": true,
- "error": "string",
- "error_details": {
- "message": "string"
}
}
Returns all private keys which can be retrieved, with the given passphrases. A tuple of key, and entropy bytes (i.e. mnemonic) is returned for each key.
Empty request body
{ }
{- "private_keys": [
- {
- "pk": "string",
- "entropy": "string"
}
], - "success": true,
- "error": "string"
}
Returns the first key in the keychain.
Empty request body
{ }
{- "pk": "string",
- "entropy": "string",
- "success": true,
- "error": "string"
}
Locates and returns a private key matching the provided fingerprint.
The fingerprint
fingerprint required | integer <uint32> |
{- "fingerprint": 0
}
{- "pk": "string",
- "entropy": "string",
- "success": true,
- "error": "string"
}
Locates and returns KeyData matching the provided fingerprint.
The fingerprint
fingerprint required | integer <uint32> |
include_secrets | boolean Default: false |
{- "fingerprint": 0,
- "include_secrets": false
}
{- "fingerprint": 2473794447,
- "public_key": "0665913196501420c0fe2de6b5ce7b25f749d52dcbf997b069bb2ea8438c6c3c",
- "label": "string",
- "secrets": {
- "mnemonic": [
- "stringstringstringstring"
], - "bytes": "string",
- "label": "string",
- "private_key": {
- "fingerprint": 2473794447,
- "sk": "0665913196501420c0fe2de6b5ce7b25f749d52dcbf997b069bb2ea8438c6c3c",
- "pk": "b73cf2471b10a7ba839616aff0ab1cb319d9d3a77ee26ff88ec1c8e645468eb0b7653518b85e5dd0df7cf50d8612b978",
- "farmer_pk": "8c65856685323f149a651e6cbe068ece36f87a84efa16246b0eef65ac586a30fb678878bd4364d52c432fbb77838cbf6",
- "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"
}
}, - "success": true,
- "error": "string"
}
Returns the KeyData of all keys which can be retrieved.
The fingerprint
fingerprint required | integer <uint32> |
include_secrets | boolean Default: false |
{- "fingerprint": 0,
- "include_secrets": false
}
{- "keys": [
- {
- "fingerprint": 2473794447,
- "public_key": "0665913196501420c0fe2de6b5ce7b25f749d52dcbf997b069bb2ea8438c6c3c",
- "label": "string",
- "secrets": {
- "mnemonic": [
- "stringstringstringstring"
], - "bytes": "string",
- "label": "string",
- "private_key": {
- "fingerprint": 2473794447,
- "sk": "0665913196501420c0fe2de6b5ce7b25f749d52dcbf997b069bb2ea8438c6c3c",
- "pk": "b73cf2471b10a7ba839616aff0ab1cb319d9d3a77ee26ff88ec1c8e645468eb0b7653518b85e5dd0df7cf50d8612b978",
- "farmer_pk": "8c65856685323f149a651e6cbe068ece36f87a84efa16246b0eef65ac586a30fb678878bd4364d52c432fbb77838cbf6",
- "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"
}
}
}
], - "success": true,
- "error": "string"
}
Assigns the given label to the first key with the given fingerprint.
The fingerprint
fingerprint required | integer <uint32> |
label required | string |
{- "fingerprint": 0,
- "label": "string"
}
{- "success": true,
- "error": "string"
}
Removes the label assigned to the key with the given fingerprint.
The fingerprint
fingerprint required | integer <uint32> |
{- "fingerprint": 0
}
{- "success": true,
- "error": "string"
}
Get info about installed and installable plotters.
Empty request body
{ }
{- "plotters": {
- "property1": {
- "can_install": true,
- "display_name": "string",
- "installed": true,
- "version": "string"
}, - "property2": {
- "can_install": true,
- "display_name": "string",
- "installed": true,
- "version": "string"
}
}, - "success": true,
- "error": "string"
}
Starts plotting. Returns after request is added to the plotting queue. Does not wait for plotting to finish.
Options for creating the plots
delay | integer <int32> The number of seconds to delay before beginning the plotting. |
parallel | boolean Default: false |
n | integer <int32> Default: 1 The number of plots that will be made, in sequence. |
k | integer (k_size) Default: 32 Enum: 25 32 33 34 35 Defines the size of a plot. 25 is used for testing only. https://github.com/Chia-Network/chia-blockchain/wiki/k-sizes |
queue | string Default: "default" |
t | string Define the temporary directory for plot creation. This is where Plotting Phase 1 (Forward Propagation) and Phase 2 (Backpropagation) both occur. The -t dir requires the largest working space: normally about 2.5 times the size of the final plot. |
t2 | string Define a secondary temporary directory for plot creation. This is where Plotting Phase 3 (Compression) and Phase 4 (Checkpoints) occur. |
d | string Define the final location for plot(s). Of course, -d should have enough free space as the final size of the plot. This directory is automatically added to your ~/.chia/VERSION/config/config.yaml file. |
b | integer <int32> Default: 4608 Define memory/RAM usage. Default is 4608 (4.6 GiB). More RAM will marginally increase speed of plot creation. Please bear in mind that this is what is allocated to the plotting algorithm alone. Code, container, libraries etc. will require additional RAM from your system. |
u | integer <int32> Default: 128 More buckets require less RAM but more random seeks to disk. With spinning disks you want less buckets and with NVMe more buckets. There is no significant benefit from using smaller buckets - just use 128 |
a | integer or null <uint32> This is the key Fingerprint used to select both the Farmer and Pool Public Keys to use. Utilize this when you want to select one key out of several in your keychain. |
c | string The pool contract address. |
p | string This is your "Pool Public Key". Utilise this when you want to create plots on other machines for which you do not want to give full chia account access. |
f | string This is your "Farmer Public Key". Utilise this when you want to create plots on other machines for which you do not want to give full chia account access |
memo | string |
e | boolean Default: false Setting to true will disable the bitfield plotting algorithm, and revert back to the older b17 plotting style. After 1.0.4 it's better to use bitfield for most cases |
r | integer <int32> Default: 2 The number of threads to devote to each plot. |
x | boolean Default: false Skips adding [final dir] to harvester for farming. |
overrideK | boolean or null Default: false Only needed when k is set to 25 |
w | boolean or null Default: false BladeBit Only - warm start |
m | boolean or null Default: false BladeBit Only - disable NUMA |
K | boolean or null Default: false MadMax Only - note upper case - Thread multiplier for phase 2 |
G | boolean or null Default: false MadMax Only - note upper case - Alternate tmpdir/tmp2dir |
{- "delay": 0,
- "parallel": false,
- "n": 1,
- "k": 25,
- "queue": "default",
- "t": "string",
- "t2": "string",
- "d": "string",
- "b": 4608,
- "u": 128,
- "a": 0,
- "c": "string",
- "p": "string",
- "f": "string",
- "memo": "string",
- "e": false,
- "r": 2,
- "x": false,
- "overrideK": false,
- "w": false,
- "m": false,
- "K": false,
- "G": false
}
{- "ids": [
- "string"
], - "success": true,
- "error": "string"
}
Stops the plot with the given id.
The id of the plot to stop
id required | string |
{- "id": "string"
}
{- "success": true,
- "error": "string"
}
Returns the list of keys used for plotting.
Input parameters
fingerprints | Array of integers <uint32> [ items <uint32 > ] |
{- "fingerprints": [
- 0
]
}
{- "keys": {
- "property1": {
- "pool_public_key": "string",
- "farmer_public_key": "string"
}, - "property2": {
- "pool_public_key": "string",
- "farmer_public_key": "string"
}
}, - "success": true,
- "error": "string"
}