Returns a correctly-formed paymasterParams object for common paymaster flows.
The non-zero paymaster address.
The input data for the paymaster.
Create general-based parameters.const paymasterAddress = "0x0a67078A35745947A37A552174aFe724D8180c25";const paymasterParams = getPaymasterParams(paymasterAddress, { type: "General", innerInput: new Uint8Array(),}); Copy
Create general-based parameters.const paymasterAddress = "0x0a67078A35745947A37A552174aFe724D8180c25";const paymasterParams = getPaymasterParams(paymasterAddress, { type: "General", innerInput: new Uint8Array(),});
Create approval-based parameters.const result = getPaymasterParams("0x0a67078A35745947A37A552174aFe724D8180c25", { type: "ApprovalBased", token: "0x65C899B5fb8Eb9ae4da51D67E1fc417c7CB7e964", minimalAllowance: BigInt(1), innerInput: new Uint8Array(),}); Copy
Create approval-based parameters.const result = getPaymasterParams("0x0a67078A35745947A37A552174aFe724D8180c25", { type: "ApprovalBased", token: "0x65C899B5fb8Eb9ae4da51D67E1fc417c7CB7e964", minimalAllowance: BigInt(1), innerInput: new Uint8Array(),});
Returns a correctly-formed paymasterParams object for common paymaster flows.