Intro
Paymasters are used to sponsor transactions and enable paying for
gas with ERC20 Tokens.
How-to guide
- Import the ArkaPaymaster object.
- Initialise the object.
- Use arkaPaymaster to call functions.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import { ArkaPaymaster } from "@etherspot/prime-sdk";
const arka_api_key = 'etherspot_public_key';
const arka_url = 'https://arka.etherspot.io';
const arkaPaymaster = new ArkaPaymaster(11155111, arka_api_key, arka_url);
console.log(await arkaPaymaster.metadata());
console.log(await arkaPaymaster.getTokenPaymasterAddress("USDC"))
console.log(await arkaPaymaster.addWhitelist(["0xB3aF6CFDDc444B948132753AD8214a20605692eF"]));
console.log(await arkaPaymaster.removeWhitelist(["0xB3aF6CFDDc444B948132753AD8214a20605692eF"]));
console.log(await arkaPaymaster.checkWhitelist("0xB3aF6CFDDc444B948132753AD8214a20605692eF"));
console.log(await arkaPaymaster.deposit(0.000000001));
{
"sponsorAddress": "0xaeAF09795d8C0e6fA4bB5f89dc9c15EC02021567",
"sponsorWalletBalance": { "type": "BigNumber", "hex": "0x1ed81fac4b400e4d" },
"chainsSupported": [
5, 114,
420, 11155111,
84531, 421613,
534351, 11155111,
84532
],
"tokenPaymasters": {
"1": { "USDC": "0x0000000000fABFA8079AB313D1D14Dcf4D15582a" },
"10": { "USDC": "0x0000000000fce6614d3c6f679e48c9cdd09aa634" },
"56": { "USDC": "0x0000000000db7995889f54d72dac9d36a9f7f467" },
}
}
