Input & Output
The shared config-key pattern across every operation, and how errors surface
Shared Input Pattern
Every operation takes resource and operation, plus its own operation-specific fields.
Unlike some other chain nodes, network is not a blanket third key here — whether it's
needed (and which field plays its role) depends on the operation:
| Operation | Network-ish Field | Required? |
|---|---|---|
account.getBalance | network | ✓ Yes — calls the chain |
utility.chainInfo | network | ✓ Yes — calls the chain |
utility.validateAddress | — none | Not used — local only |
utility.convertAddress | targetNetwork (a distinct field) | ✓ Yes — but it's a re-encoding target, not an RPC target |
utility.convertUnits | — none | Not used — local only |
utility.convertRate | — none | Not used — local only |
No default network. Where
network is required, there is no
DefaultNetwork-style fallback to fall back to — omitting it returns
CFG_MISSING_NETWORK rather than silently picking mainnet. See Networks.
All Config Keys
| Key | Used By |
|---|---|
resource | Every operation — account or utility |
operation | Every operation — the operation name within that resource |
network | account.getBalance, utility.chainInfo |
address | account.getBalance, utility.validateAddress, utility.convertAddress |
targetNetwork | utility.convertAddress |
amount | utility.convertUnits |
fromUnit / toUnit | utility.convertUnits |
decimals | utility.convertUnits |
rate | utility.convertRate |
direction | utility.convertRate |
Shared Output Shape
A successful call returns a JSON object whose fields are documented on each operation's page, plus a
status: "success" field. There's no additional wrapper envelope — the fields listed on each operation
page are the output.
How Errors Surface
Every error, regardless of cause, surfaces via the node's error output port with the same
structured shape:
{
"errorCode": "CFG_CHAIN_UNAVAILABLE",
"message": "...",
"status": "error"
}
| Situation | What happens |
|---|---|
| Missing required field | A CFG_MISSING_* code, checked before any network call is attempted. |
Unknown/unconfigured network or targetNetwork | CFG_INVALID_NETWORK, before any HTTP call is made. |
| Malformed SS58 address | VAL_INVALID_SS58_ADDRESS. |
| Address prefix doesn't match the selected network | VAL_NETWORK_MISMATCH. |
| Substrate RPC endpoint unreachable or times out | CHAIN_RPC_UNAVAILABLE / CHAIN_TIMEOUT — see Troubleshooting. |
Attempting a write (e.g. account.transfer) | CHAIN_SIGNING_NOT_AVAILABLE — see Roadmap. |
Idempotent by nature. Every operation shipped today is either a read or a pure local
conversion, so calling the same operation twice with the same input is always safe — there's no risk of
double-submitting an extrinsic. That changes once signed writes ship; see Roadmap.