For AI agents: the documentation index for this site is at /llms.txt. For a markdown version of any page, append .md to its URL or request it with Accept: text/markdown. llms.txt
Types
Shared request/response types, generic envelopes, error taxonomy, chain profiles, and artifact definitions used across REST, JSON-RPC, and MCP transports.
Source files:pkg/types/*.go
The types package holds the shared wire contracts for all tachyon transports. Every request and response type, the generic envelope, the error taxonomy, chain profiles, and artifact definitions live here.
Envelope
type Envelope[T any] struct { Ok bool `json:"ok"` Data T `json:"data,omitempty"` Error *Error `json:"error,omitempty"`}
Constructors: types.OK(data) and types.Fail(err). Used by all three transports (REST, JSON-RPC, MCP).
Error
type Error struct { Code string `json:"code"` Message string `json:"message"` Retry bool `json:"retry"` Details any `json:"details,omitempty"`}
Error implements the error interface. NewError(code, message, retry, details) is the constructor.
Stable error codes
Code
Retry
When
COMPILER_FORGE_FAILED
yes
forge build subprocess failed
COMPILER_SOLC_FAILED
yes
solc mismatch or compile error
TEST_FORGE_FAILED
yes
forge test subprocess failed
TEST_ASSERTION_FAILED
no
one or more tests failed
CHAIN_NOT_FOUND
no
unknown chain_id
CHAIN_RPC_FAILED
yes
RPC dial or transport error
SIMULATE_FAILED
no
eth_call reverted
DEPLOY_FAILED
varies
deployment planning or broadcast failed
DEPLOY_IDEMPOTENT_HIT
no
(reserved)
CALL_FAILED
yes
broadcast call failed
ARTIFACT_NOT_FOUND
no
compile first or wrong project_id
REGISTRY_NOT_FOUND
no
(reserved)
WALLET_POLICY_DENIED
no
spend cap or allow-list rejected
WALLET_NOT_CONFIGURED
no
no signer configured
INVALID_REQUEST
no
malformed input
INTERNAL_ERROR
varies
unexpected server error
HealthData
type HealthData struct { Version string `json:"version"` Forge string `json:"forge,omitempty"` Chains []string `json:"chains"` Project string `json:"project_root"`}