Skip to content

getSignerClient

getSignerClient(config, options): Promise<Client<Transport, Chain, Account>>

Defined in: synapse-react/src/signer.ts:47

Resolve the client that signs a write: the session key client when a session key is given, otherwise the connector client of the connected wallet.

ParameterTypeDescription
configConfigThe wagmi config.
options{ account: `0x${string}` | undefined; chainId: number; sessionKey?: SessionKey<"Secp256k1"> | null; }The account, chain id and optional session key.
options.account`0x${string}` | undefined-
options.chainIdnumber-
options.sessionKey?SessionKey<"Secp256k1"> | null-

Promise<Client<Transport, Chain, Account>>

The client to sign with.

Error if the session key is for a different chain than chainId, or for a different root than account.