Skip to content
Alchemy Logo

@alchemy/wallet-apis

Beta — This package replaces @account-kit/wallet-client. See the migration guide.

High-level viem-style client for Alchemy's Smart Wallet APIs. Provides EIP-7702 smart wallet support with signing, transaction preparation, and call sending.

npm install @alchemy/wallet-apis viem

  • createSmartWalletClient - Factory to create a SmartWalletClient (viem client extended with smart wallet actions)
  • alchemyWalletTransport - Alchemy transport pre-configured for the Wallet API gateway
  • smartWalletActions - Client decorator attaching all wallet API actions

  • Signing - signMessage, signTypedData, prepareSign, signPreparedCalls, signSignatureRequest
  • Transactions - prepareCalls, sendCalls, sendPreparedCalls
  • Account management - getCapabilities, listAccounts, requestAccount
  • Permissions - grantPermissions

  • requestQuoteV0, swapActions - Pre-release swap functionality

MIT

FunctionDescription
alchemyWalletTransport-
createSmartWalletClientCreates a smart wallet client with wallet API actions.
formatSignFormats a signature request for signing messages or transactions.
getCapabilitiesGets the capabilities supported by the wallet for the given account. Delegates to viem's getCapabilities and renames paymasterService to paymaster for consistency with the SDK's public API.
grantPermissionsGrants permissions to a smart account by creating a session. This allows another key to perform operations on behalf of the account.
listAccountsLists all smart accounts for a given signer using the wallet API client.
prepareCallsPrepares a set of contract calls for execution by building a user operation. Returns the built user operation and a signature request that needs to be signed before submitting to sendPreparedCalls.
prepareSignPrepares a signature request for signing messages or transactions.
requestAccountRequests a smart account address for the provided signer using the wallet API client.
sendCallsPrepares, signs, and submits calls. This function internally calls prepareCalls, signPreparedCalls, and sendPreparedCalls.
sendPreparedCallsSends prepared calls by submitting a signed user operation. This method is used after signing the signature request returned from prepareCalls.
signMessageSigns a message using the smart account. This method requests the account associated with the signer and uses it to sign the message.
signPreparedCallsSigns prepared calls using the provided signer.
signSignatureRequestSigns a signature request using the provided signer. This method handles different types of signature requests including personal_sign, eth_signTypedData_v4, and authorization.
signTypedDataSigns typed data (EIP-712) using the smart account. This method requests the account associated with the signer and uses it to sign the typed data.
smartWalletActionsDecorator that adds smart wallet actions to a wallet API client. Provides both Alchemy-specific methods and standard viem wallet actions.
undelegateAccountPrepares, signs, and sends an EIP-7702 undelegation to remove delegation from an EOA. Gas is sponsored by Alchemy (requires Enterprise plan).
Was this page helpful?