Non-sponsored transactions

If you want to send a userOperation without sponsorship from a Paymaster, you need to pass the flag noSponsorship: true in the config.

IMP - Please ensure the Smart Account has enough native currency to pay for gas if you're doing this.

const bastion = new Bastion();
const bastionConnect = await bastion.bastionConnect;

const CONFIG = {
	chainId: <chain_id>, // optional
	privateKey: <your_private_key>, //optional
	rpcUrl: <RPC_URL>, //optional
	apiKey: <your_api_key>, //required
	noSponsorship: true,
};			
bastionConnect.init(<your_web3Provider>, CONFIG);

Last updated