Skip to main content

SDK overview

@tayho/sdk is a provider-neutral TypeScript client for browsers, Node.js, and edge runtimes. It uses the Tayho API for indexed data and lifecycle state, can optionally read execution-critical values directly from HyperEVM, and submits every signed write through the Tayho relayer.
The package is currently a development-preview workspace package. Public npm availability is not asserted until Tayho publishes and verifies the package.

Design guarantees

  • The API key is required when creating a client.
  • Environment configuration is validated before data is trusted.
  • API results preserve request IDs, opaque cursors, and indexed checkpoints.
  • Onchain amounts and identifiers are decoded to bigint.
  • RPC and wallet adapters expose narrow interfaces rather than arbitrary provider access.
  • Contract preparation reads use named ABIs and one pinned-block Multicall3 snapshot.
  • No adapter exposes eth_getLogs or transaction broadcasting.
  • Writes produce inspectable typed data and stable idempotency keys before submission.

Client modules

Client shape

configuration() is memoized for the client lifetime. Create a new client when changing environment, API key, API origin, signer, or RPC configuration.

Choose a data path

Configuration and providers

Configure API origins, RPC failover, EIP-1193, viem, ethers, and typed-data signing.

Reads

Browse every indexed and live read module and its consistency semantics.

Relayed actions

Prepare, inspect, sign, submit, and wait for non-order actions.

Orders

Submit market and conditional orders and signed cancellation requests.

Package entry points

Ethers is an optional peer dependency. Import only the adapter your application uses.

Configuration and providers

Configure Tayho environments, API keys, RPC failover, and EIP-1193, viem, or ethers adapters.

Read data

Read Tayho markets, accounts, positions, vault, staking, orders, and transactions with explicit consistency semantics.

Relayed actions

Prepare, review, sign, submit, and track Tayho sessions, margin, vault, and staking actions.

Orders

Prepare, submit, monitor, and cancel relayed Tayho market and conditional orders.

Realtime, errors, and quotas

Subscribe safely, recover from disconnects, and handle Tayho API errors and quota responses.
Last modified on July 23, 2026