T402 API Reference - v2.8.0
    Preparing search index...

    Paymaster client for gas sponsorship

    Index

    Constructors

    Methods

    • Get paymaster data for a UserOperation

      Parameters

      • userOp: Partial<UserOperation>

        Partial UserOperation to get paymaster data for

      • chainId: number

        The chain ID for the operation

      • entryPoint: `0x${string}`

        The EntryPoint contract address

      • Optionalcontext: Record<string, unknown>

        Optional context data for the paymaster

      Returns Promise<PaymasterData>

      Paymaster data including address and gas limits

    • Get gas estimates including paymaster gas

      Parameters

      • _userOp: Partial<UserOperation>

        Partial UserOperation to estimate gas for (reserved for future use)

      • _chainId: number

        The chain ID for the operation (reserved for future use)

      Returns Promise<GasEstimate>

      Gas estimates including paymaster verification and postOp gas

    • Check if the paymaster will sponsor this operation

      Parameters

      • userOp: Partial<UserOperation>

        Partial UserOperation to check sponsorship for

      • chainId: number

        The chain ID for the operation

      • entryPoint: `0x${string}`

        The EntryPoint contract address

      • Optionalcontext: Record<string, unknown>

        Optional context data for policy validation

      Returns Promise<boolean>

      True if the paymaster will sponsor the operation