Skip to main content

Integration

First, install the required packages for initializing the Paymaster.

npm install @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