mechanisms/svm/exact/facilitator
import "github.com/x402-foundation/x402/go/v2/mechanisms/svm/exact/facilitator"
Constants
Facilitator error constants for the exact SVM (Solana) scheme (V2)
Source: mechanisms/svm/exact/facilitator/errors.go:6
const (
// Verify errors
ErrUnsupportedScheme = "invalid_exact_solana_unsupported_scheme"
ErrNetworkMismatch = "invalid_exact_solana_network_mismatch"
ErrMissingFeePayer = "invalid_exact_solana_payload_missing_fee_payer"
ErrFeePayerNotManaged = "invalid_exact_solana_fee_payer_not_managed_by_facilitator"
ErrInvalidPayloadTransaction = "invalid_exact_solana_payload_transaction"
ErrTransactionCouldNotBeDecoded = "invalid_exact_solana_payload_transaction_could_not_be_decoded"
ErrTransactionInstructionsLength = "invalid_exact_solana_payload_transaction_instructions_length"
ErrUnknownFourthInstruction = "invalid_exact_solana_payload_unknown_fourth_instruction"
ErrUnknownFifthInstruction = "invalid_exact_solana_payload_unknown_fifth_instruction"
ErrUnknownSixthInstruction = "invalid_exact_solana_payload_unknown_sixth_instruction"
ErrComputeLimitInstruction = "invalid_exact_solana_payload_transaction_instructions_compute_limit_instruction"
ErrComputePriceInstruction = "invalid_exact_solana_payload_transaction_instructions_compute_price_instruction"
ErrComputePriceInstructionTooHigh = "invalid_exact_solana_payload_transaction_instructions_compute_price_instruction_too_high"
ErrNoTransferInstruction = "invalid_exact_solana_payload_no_transfer_instruction"
ErrFeePayerTransferringFunds = "invalid_exact_solana_payload_transaction_fee_payer_transferring_funds"
ErrMintMismatch = "invalid_exact_solana_payload_mint_mismatch"
ErrRecipientMismatch = "invalid_exact_solana_payload_recipient_mismatch"
ErrAmountInsufficient = "invalid_exact_solana_payload_amount_insufficient"
ErrInvalidFeePayer = "invalid_exact_solana_invalid_fee_payer"
ErrTransactionSigningFailed = "invalid_exact_solana_transaction_signing_failed"
ErrTransactionSimulationFailed = "invalid_exact_solana_transaction_simulation_failed"
// Memo verification errors
ErrMemoMismatch = "invalid_exact_solana_payload_memo_mismatch"
ErrMemoCount = "invalid_exact_solana_payload_memo_count"
// Settle errors
ErrVerificationFailed = "invalid_exact_solana_verification_failed"
ErrFeePayerMismatch = "invalid_exact_solana_fee_payer_mismatch"
ErrTransactionFailed = "invalid_exact_solana_transaction_failed"
ErrTransactionConfirmationFailed = "invalid_exact_solana_transaction_confirmation_failed"
ErrDuplicateSettlement = "duplicate_settlement"
)Functions
func NewExactSvmScheme(signer svm.FacilitatorSvmSigner, cache ...*svm.SettlementCache) *ExactSvmScheme
Source: mechanisms/svm/exact/facilitator/scheme.go:28
NewExactSvmScheme creates a new ExactSvmScheme. An optional SettlementCache may be provided to share deduplication state across V1 and V2 instances; if nil a new cache is created.
Types
type ExactSvmScheme
Source: mechanisms/svm/exact/facilitator/scheme.go:20
ExactSvmScheme implements the SchemeNetworkFacilitator interface for SVM (Solana) exact payments (V2)
type ExactSvmScheme struct {
// contains filtered or unexported fields
}func CaipFamily() string
Source: mechanisms/svm/exact/facilitator/scheme.go:47
CaipFamily returns the CAIP family pattern this facilitator supports
func GetExtra(network x402.Network) map[string]interface{}
Source: mechanisms/svm/exact/facilitator/scheme.go:54
GetExtra returns mechanism-specific extra data for the supported kinds endpoint. For SVM, this includes a randomly selected fee payer address. Random selection distributes load across multiple signers.
func GetSigners(network x402.Network) []string
Source: mechanisms/svm/exact/facilitator/scheme.go:67
GetSigners returns signer addresses used by this facilitator. For SVM, returns all available fee payer addresses for the given network.
func Scheme) Scheme() string
Source: mechanisms/svm/exact/facilitator/scheme.go:42
Scheme returns the scheme identifier
func Settle( ctx context.Context, payload types.PaymentPayload, requirements types.PaymentRequirements, fctx *x402.FacilitatorContext, ) (*x402.SettleResponse, error)
Source: mechanisms/svm/exact/facilitator/scheme.go:251
Settle settles a payment by submitting the transaction (V2) Ensures the correct signer is used based on the feePayer specified in requirements.
func Verify( ctx context.Context, payload types.PaymentPayload, requirements types.PaymentRequirements, _ *x402.FacilitatorContext, ) (*x402.VerifyResponse, error)
Source: mechanisms/svm/exact/facilitator/scheme.go:77
Verify verifies a V2 payment payload against requirements
