createAvokClient
There are two factories namedcreateAvokClient. They differ by entry point.
The two-argument wired factory is what most apps use.
wallet is the operator identity, a
WalletInfo: { name?: string; rdns?: string; icon?: string }. Every field is optional. Set name
and rdns for a proper display name and a stable id; if you omit either, the wiring derives it from
the page’s own origin (name from the hostname, rdns from its reverse-DNS form) so the announced
identity is honest, never anonymous and never an Avok brand. rdnsFromOrigin(origin) is exported if
you want to compute the id yourself.
ClientConfig
Passed as the first argument tocreateAvokClient.
|
rpcUrls | RpcOverrides | No | registry public endpoint (development only) | RPC endpoints per chain. Set for production. |
| storage | StorageAdapter | No | - | Adapter for non-secret state (e.g. session metadata). |
| nonceAllocator | NonceAllocator | No | random 256-bit | Intent-nonce allocation. Use createSequentialNonceAllocator(storage) on L1. |
| defaultDeadlineSeconds | number | No | 3600 | Deadline window for sponsored batch signatures. |
deps is an internal test-injection seam. SPONSORED.md documents how to inject a custom
Bundler or Paymaster7677 through it when a URL is not enough.The client surface
Every client has the use-only surface. A self-custody (own-origin) connection additionally gets the management verbs.UseOnlyAvokClient
FullAvokClient (adds, self-custody only)
The wired client (from
@avokjs/core) also has getEip1193Provider(): Eip1193Provider.