Intialization
For Telegram Login Integration
import { AA0xGaslessTG, TelegramClientOptions } from '@0xgasless/0xgasless-aa-sdk';
const apiKey = 'YOUR_API_KEY'; // Replace with your API key
const clientOptions: TelegramClientOptions = {
chainId: 1, // Required: Replace with the desired chain ID
telegramUserId: 'YOUR_TELEGRAM_USER_ID', // Required: Specify the Telegram user ID
walletAddress: 'YOUR_WALLET_ADDRESS', // Required: Provide the wallet address
rpcUrl: 'YOUR_RPC_URL', // Optional: Specify your custom RPC URL if needed
isSponsoredTrx: false, // Optional: Set to true if using sponsored transactions
paymasterEndpoint: 'PAYMASTER_ENDPOINT', // Optional: Specify your custom paymaster endpoint
paymaster: 'PIMLICO', // Optional: Choose a paymaster type ("PIMLICO" or "STACKUP")
};
const client = new AA0xGaslessTG(apiKey, clientOptions);
const address = await client.init(provider);
console.log("Smart account address", address);
For Other Integration Methods
Last updated