@uptickjs/aa-wallet-sdk
v1.0.0
Published
An ERC-4337 Account Abstraction wallet SDK with a minimal public API. This SDK is **only designed for the Uptick Network chain**.
Readme
AA Wallet SDK
An ERC-4337 Account Abstraction wallet SDK with a minimal public API. This SDK is only designed for the Uptick Network chain.
Common methods:
init: Initialize chain and sponsor configuration (bundler / paymaster / chainId / rpc / apiKey, etc.)createWallet: Create and return the AA wallet address (auto-sponsored deployment when needed)sendTransaction: Send a transaction with the AA wallet (single call or batched calls)
The internal design follows a layered architecture:
core: Parameter normalization and input validationservices: Wallet and transaction flow orchestrationsdk: External SDK instance API (while keeping default singleton compatibility)
Installation & Import
npm install @uptickjs/aa-wallet-sdkimport { init, createWallet, sendTransaction } from '@uptickjs/aa-wallet-sdk';API
1) init(config)
init({
chainId: 9000,
bundlerUrl: 'https://...',
paymasterServiceUrl: 'https://...',
bundlerApiKey: '',
paymasterApiKey: '',
});2) createWallet(params)
const wallet = await createWallet({
ownerPrivateKey: '0x...',
});Return example:
{
ownerAddress: "0x...",
aaWalletAddress: "0x...",
deployedOnChain: true,
deployTxHash: "0x..." // null if deployment is not triggered
}3) sendTransaction(params)
const tx = await sendTransaction({
ownerPrivateKey: '0x...',
to: '0x...',
value: 0n,
data: '0x',
});
const data = encodeFunctionData({
abi: loadAbi,
functionName: 'transfer',
args: [params1,params2...],
});
const tx = await sendTransaction({
ownerPrivateKey: '0x...',
to: contractAddress,
value: 0n,
data: data,
});