Config
Treasury instances can be configured using a treasury.toml
file.
Api
The API process exposes HTTP endpoints to query and submit requests to.
[api]
# allowed origins for CORS
origins = ["http://localhost:3000", "https://treasury.cordial.systems"]
# socket to bind to
listen = "0.0.0.0"
# do not enforce CORS
any_origin = false
Engine
The engine process validates requests and policies.
[engine]
# the P2P port used to gossip with other nodes
listen = "0.0.0.0:26656"
# The peers of the engine (it's okay to reference itself)
[[engine.peers]]
# socket of peer
socket = "engine-1:26656"
# public key of peer (see `cord engine show-node-id`)
node_id = "3996b5df6a9158f5ac74e7fd1b48c82b8eca9ad5"
[[engine.peers]]
socket = "engine-2:26656"
node_id = "c517f64162d360bc7284b7d518883bda4627f578"
Signer
Signer processes manage key shares and perform MPC to produce signatures.
[signer]
[signer.api]
[signer.api.engine]
# listen port for other signer process to connect to
listen = "0.0.0.0:7867"
# peers (may refer to itself)
[[signer.api.engine.peers]]
# participant ID of signer peer (check `signer init-node --db <path/to/db>`)
participant = "1"
socket = "signer-1:7867"
[[signer.api.engine.peers]]
participant = "2"
socket = "signer-2:7867"
Connector
Connector process connects treasury to public blockchains. At least one connector needs to be active.
By default, the connector will use Cordial Systems hosted Connector API, but you are free to provide your own RPC nodes to connect to instead.
[connector]
# The api endpoint to connect to
api = "http://api:8777"
# The invite code used when first connecting
invite_code = "connector"
# path to enrolled credential (defaults to TREASURY_HOME/connector/credential1.txt)
private_key_path = "/path/to/credential"
# API key used to enroll addresses to oracle-api
api_key = ""
# Oracle URL to connect for address tracking and prices (default "https://oracle.cordialapis.com")
oracle_url = ""
# optional list of RPC node overrides
[connector.chains.sui]
rpc = "https://fullnode.devnet.sui.io:443"
[connector.chains.sol]
rpc = "https://api.testnet.solana.com"
Backup
Automatic periodic backups will use these settings.
[backup]
# the public age key to encrypt against (starts with `age1...`)
bak = ""