mechanisms/svm/exact/v1/facilitator
import "github.com/x402-foundation/x402/go/v2/mechanisms/svm/exact/v1/facilitator"
Constants
Facilitator error constants for the exact SVM (Solana) scheme (V1)
Source: mechanisms/svm/exact/v1/facilitator/errors.go:6
const (
// Verify errors
ErrUnsupportedScheme = "invalid_exact_solana_unsupported_scheme"
ErrNetworkMismatch = "invalid_exact_solana_network_mismatch"
ErrInvalidExtraField = "invalid_exact_solana_extra_field"
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 NewExactSvmSchemeV1(signer svm.FacilitatorSvmSigner, cache ...*svm.SettlementCache) *ExactSvmSchemeV1
Source: mechanisms/svm/exact/v1/facilitator/scheme.go:29
NewExactSvmSchemeV1 creates a new ExactSvmSchemeV1. An optional SettlementCache may be provided to share deduplication state across V1 and V2 instances; if nil a new cache is created.
Types
type ExactSvmSchemeV1
Source: mechanisms/svm/exact/v1/facilitator/scheme.go:21
ExactSvmSchemeV1 implements the SchemeNetworkFacilitator interface for SVM (Solana) exact payments (V1)
type ExactSvmSchemeV1 struct {
// contains filtered or unexported fields
}func CaipFamily() string
Source: mechanisms/svm/exact/v1/facilitator/scheme.go:48
CaipFamily returns the CAIP family pattern this facilitator supports
func GetExtra(network x402.Network) map[string]interface{}
Source: mechanisms/svm/exact/v1/facilitator/scheme.go:55
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/v1/facilitator/scheme.go:68
GetSigners returns signer addresses used by this facilitator. For SVM, returns all available fee payer addresses for the given network.
func SchemeV1) Scheme() string
Source: mechanisms/svm/exact/v1/facilitator/scheme.go:43
Scheme returns the scheme identifier
func Settle( ctx context.Context, payload types.PaymentPayloadV1, requirements types.PaymentRequirementsV1, fctx *x402.FacilitatorContext, ) (*x402.SettleResponse, error)
Source: mechanisms/svm/exact/v1/facilitator/scheme.go:248
Settle settles a payment by submitting the transaction (V1) Ensures the correct signer is used based on the feePayer specified in requirements.
func Verify( ctx context.Context, payload types.PaymentPayloadV1, requirements types.PaymentRequirementsV1, _ *x402.FacilitatorContext, ) (*x402.VerifyResponse, error)
Source: mechanisms/svm/exact/v1/facilitator/scheme.go:78
Verify verifies a V1 payment payload against requirements
