Skip to main content

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

The pool accepts one to eight unique HTTPS origins without URL userinfo. It retries across origins, temporarily cools repeatedly failing origins, and disables an origin that reports the wrong chain during verification. Only these RPC methods are used:
  • eth_chainId
  • eth_blockNumber
  • eth_getBalance
  • eth_call
  • eth_getTransactionReceipt
There is no generic request method, log scan, or transaction send.

Browser EIP-1193

The signer calls eth_accounts and eth_signTypedData_v4. It cannot ask the wallet to send a transaction.

viem

ethers v6

Chain verification

The first configuration() call:
  1. Reads the Tayho deployment from the API.
  2. Verifies that its environment equals the requested environment.
  3. Verifies the chain reader against the deployment chain when configured.
  4. Rejects mismatched, malformed, or unavailable RPC origins with a TayhoError.
Do not catch a chain mismatch and continue with the same reader. Correct the environment or RPC configuration.

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/or actions:submit scopes.
  • Revoked, expired, suspended, wrong-origin, wrong-CIDR, or wrong-scope keys fail closed.
The client never sends configured RPC URLs to Tayho. It does send the API key on every HTTP request and uses a short-lived single-use ticket for WebSocket authentication.
Last modified on July 23, 2026