Configuration and providers
The client requires an environment and API key. A signer is needed only for writes. A chain reader is optional because the API can perform the bounded preparation reads; direct RPC reads are useful when an application wants to verify execution-critical state itself.Client options
Native RPC configuration
eth_chainIdeth_blockNumbereth_getBalanceeth_calleth_getTransactionReceipt
Browser EIP-1193
eth_accounts and eth_signTypedData_v4. It cannot ask the wallet to send a
transaction.
viem
ethers v6
Chain verification
The firstconfiguration() call:
- Reads the Tayho deployment from the API.
- Verifies that its environment equals the requested environment.
- Verifies the chain reader against the deployment chain when configured.
- Rejects mismatched, malformed, or unavailable RPC origins with a
TayhoError.
API keys
- Publishable keys (
th_pk_) can be used in browsers only when origin restrictions and project quotas are appropriate. - Secret keys (
th_sk_) are server-only. - Keys carry
read,realtime, and/oractions:submitscopes. - Revoked, expired, suspended, wrong-origin, wrong-CIDR, or wrong-scope keys fail closed.