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

npm install @atxp/base

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 Returns
BaseAppAccount
Promise<BaseAppAccount>
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 Returns
void
Promise<void>
Returns a promise that resolves when the data has been cleared.