Skip to content

Create Paymaster

You can create a paymaster endpoint by using the web interface or by using this SDK.

import { ChainId, KriptonioSdk } from '@kriptonio/sdk';
 
const sdk = new KriptonioSdk({
  accessToken: 'your-access-token',
});
 

const paymaster = await sdk.paymaster.create({
  title: 'My Paymaster',
  chainId: ChainId.Polygon,
});

Allow sponsorship from a specific wallet address only

If you want to allow only a specific wallet address to use your paymaster, you can specify the wallet option when creating a paymaster. Transactions coming from other wallets will be rejected/won't be sponsored.

import { ChainId, KriptonioSdk } from '@kriptonio/sdk';
 
const sdk = new KriptonioSdk({
  accessToken: 'your-access-token',
});
 

const paymaster = await sdk.paymaster.create({
  title: 'My Paymaster',
  wallet: '0x123', 
  chainId: ChainId.Polygon,
});