Integration
First, install the required packages for initializing the Paymaster.
- npm
- yarn
npm install @abstraxn/paymaster
yarn add @abstraxn/paymaster
Usage
Set up a paymaster for the smart account by providing only the paymaster API key. The default mode used is Sponsored mode in this case.
import { IPaymaster, AbstraxnPaymaster } from "@abstraxn/paymaster";
To create a paymaster instance pass the paymaster url, with other optional params.
const paymaster = new AbstraxnPaymaster({
paymasterUrl: "", // you can get this value from abstraxn dashboard.
strictMode: true
});
Parameters
- paymasterUrl(
string
, required): URL of the paymaster.
returns
- paymaster(
Promise<Paymaster>
): paymaster instance