mechanisms/evm/exact/v1/facilitator
import "github.com/x402-foundation/x402/go/v2/mechanisms/evm/exact/v1/facilitator"
Constants
Facilitator error constants for the exact EVM scheme (V1)
Source: mechanisms/evm/exact/v1/facilitator/errors.go:6
const (
// Verify errors
ErrUnsupportedScheme = "invalid_exact_evm_unsupported_scheme"
ErrNetworkMismatch = "invalid_exact_evm_network_mismatch"
ErrInvalidPayload = "invalid_exact_evm_payload"
ErrMissingSignature = "invalid_exact_evm_payload_missing_signature"
ErrFailedToGetNetworkConfig = "invalid_exact_evm_failed_to_get_network_config"
ErrInvalidExtraField = "invalid_exact_evm_extra_field"
ErrMissingEip712Domain = "invalid_exact_evm_missing_eip712_domain"
ErrRecipientMismatch = "invalid_exact_evm_payload_recipient_mismatch"
ErrInvalidAuthorizationValue = "invalid_exact_evm_payload_authorization_value"
ErrInvalidRequiredAmount = "invalid_exact_evm_required_amount"
ErrAuthorizationValueMismatch = "invalid_exact_evm_payload_authorization_value_mismatch"
ErrAuthorizationValidBeforeExpired = "invalid_exact_evm_payload_authorization_valid_before"
ErrAuthorizationValidAfterInFuture = "invalid_exact_evm_payload_authorization_valid_after"
ErrInsufficientFunds = "invalid_exact_evm_insufficient_funds"
ErrInvalidSignatureFormat = "invalid_exact_evm_signature_format"
ErrFailedToVerifySignature = "invalid_exact_evm_failed_to_verify_signature"
ErrInvalidSignature = "invalid_exact_evm_payload_signature"
// Settle errors
ErrVerificationFailed = "invalid_exact_evm_verification_failed"
ErrFailedToParseSignature = "invalid_exact_evm_failed_to_parse_signature"
ErrFailedToCheckDeployment = "invalid_exact_evm_failed_to_check_deployment"
ErrTransactionFailed = "invalid_exact_evm_transaction_failed"
ErrFailedToGetReceipt = "invalid_exact_evm_failed_to_get_receipt"
ErrInvalidTransactionState = "invalid_exact_evm_transaction_state"
// Smart wallet errors
ErrUndeployedSmartWallet = "invalid_exact_evm_payload_undeployed_smart_wallet"
ErrSmartWalletDeploymentFailed = "smart_wallet_deployment_failed"
ErrFactoryNotAllowed = "eip6492_factory_not_allowed"
)Functions
func NewExactEvmSchemeV1(signer evm.FacilitatorEvmSigner, config *ExactEvmSchemeV1Config) *ExactEvmSchemeV1
Source: mechanisms/evm/exact/v1/facilitator/scheme.go:49
NewExactEvmSchemeV1 creates a new ExactEvmSchemeV1 Args:
signer: The EVM signer for facilitator operations
config: Optional configuration (nil uses defaults)Returns:
Configured ExactEvmSchemeV1 instanceTypes
type ExactEvmSchemeV1
Source: mechanisms/evm/exact/v1/facilitator/scheme.go:35
ExactEvmSchemeV1 implements the SchemeNetworkFacilitatorV1 interface for EVM exact payments (V1)
type ExactEvmSchemeV1 struct {
// contains filtered or unexported fields
}func CaipFamily() string
Source: mechanisms/evm/exact/v1/facilitator/scheme.go:66
CaipFamily returns the CAIP family pattern this facilitator supports
func GetExtra(_ x402.Network) map[string]interface{}
Source: mechanisms/evm/exact/v1/facilitator/scheme.go:72
GetExtra returns mechanism-specific extra data for the supported kinds endpoint. For EVM, no extra data is needed.
func GetSigners(_ x402.Network) []string
Source: mechanisms/evm/exact/v1/facilitator/scheme.go:78
GetSigners returns signer addresses used by this facilitator. Returns all addresses this facilitator can use for signing/settling transactions.
func SchemeV1) Scheme() string
Source: mechanisms/evm/exact/v1/facilitator/scheme.go:61
Scheme returns the scheme identifier
func Settle( ctx context.Context, payload types.PaymentPayloadV1, requirements types.PaymentRequirementsV1, fctx *x402.FacilitatorContext, ) (*x402.SettleResponse, error)
Source: mechanisms/evm/exact/v1/facilitator/scheme.go:253
Settle settles a V1 payment on-chain
func Verify( ctx context.Context, payload types.PaymentPayloadV1, requirements types.PaymentRequirementsV1, fctx *x402.FacilitatorContext, ) (*x402.VerifyResponse, error)
Source: mechanisms/evm/exact/v1/facilitator/scheme.go:83
Verify verifies a V1 payment payload against requirements
type ExactEvmSchemeV1Config
Source: mechanisms/evm/exact/v1/facilitator/scheme.go:22
ExactEvmSchemeV1Config holds configuration for the ExactEvmSchemeV1 facilitator
type ExactEvmSchemeV1Config struct {
// EIP6492AllowedFactories is the allowlist of factory contract addresses (hex strings,
// case-insensitive) that the facilitator will call when deploying an undeployed smart wallet
// via ERC-6492. A non-empty list enables ERC-4337 smart wallet deployment. An empty list
// (the default) denies all factory deployment calls. Facilitators must explicitly list every
// factory they trust to prevent arbitrary transaction injection via attacker-controlled
// ERC-6492 signature wrappers.
EIP6492AllowedFactories []string
// SimulateInSettle reruns transfer simulation during settle. Verify always simulates.
SimulateInSettle bool
}Fields
EIP6492AllowedFactories []stringEIP6492AllowedFactories is the allowlist of factory contract addresses (hex strings, case-insensitive) that the facilitator will call when deploying an undeployed smart wallet via ERC-6492. A non-empty list enables ERC-4337 smart wallet deployment. An empty list (the default) denies all factory deployment calls. Facilitators must explicitly list every factory they trust to prevent arbitrary transaction injection via attacker-controlled ERC-6492 signature wrappers.
SimulateInSettle boolSimulateInSettle reruns transfer simulation during settle. Verify always simulates.
