Overview
The @atxp/base
package provides a BaseAppAccount
implementation for using ATXP with Base Mini Apps. This package handles wallet management, spend permissions, and payment processing specifically for the Base ecosystem.
Installation
BaseAppAccount
The main class for managing Base Mini App accounts with ATXP.
Functions
initialize
initialize ({
walletAddress: string ,
apiKey: string ,
appName: string ,
allowance? : bigint ,
periodInDays? : number ,
useEphemeralWallet? : boolean
}): Promise < BaseAppAccount >
Creates and initializes a new BaseAppAccount instance for use with Base Mini Apps.
Arguments
Show initialize arguments
The user’s wallet address from wagmi or similar wallet connection library.
Display name for your mini app, shown to users during permission flows.
Maximum USDC amount the ephemeral wallet can spend on behalf of the user. Specified in wei (1 USDC = 10^6 wei).
Duration in days for which the spend permission remains valid.
Whether to use ephemeral wallet mode. Set to false
to use the user’s main wallet directly (with degraded UX).
Storage mechanism to use for storing the account data in non-browser environments.
Returns
Returns a configured BaseAppAccount instance ready for use with ATXP clients.
clearAllStoredData
clearAllStoredData ({
userWalletAddress: string ,
storage? : IStorage < string >
}): Promise < void >
Clears all stored data for a specific wallet address.
Arguments
Show clearAllStoredData arguments
Wallet address to clear stored data for.
Returns
Returns a promise that resolves when the data has been cleared.