pub enum X402v2PaymentPayloadPayload {
ExactEvmPayload(X402ExactEvmPayload),
ExactEvmPermit2Payload(X402ExactEvmPermit2Payload),
ExactSolanaPayload(X402ExactSolanaPayload),
UptoEvmPermit2Payload(X402UptoEvmPermit2Payload),
BatchSettlementEvmPayload(X402BatchSettlementEvmPayload),
}Expand description
The payload of the payment depending on the x402Version, scheme, and network. Discriminated by scheme-specific fields: exact-EVM/upto-EVM payloads carry a signature; exact-Solana carries a transaction; batch-settlement carries a type discriminator. See x402BatchSettlementEvmPayload for the documented batch-settlement variants.
JSON schema
{
"description": "The payload of the payment depending on the x402Version, scheme, and network. Discriminated by scheme-specific fields: exact-EVM/upto-EVM payloads carry a `signature`; exact-Solana carries a `transaction`; batch-settlement carries a `type` discriminator. See `x402BatchSettlementEvmPayload` for the documented batch-settlement variants.",
"examples": [
{
"authorization": {
"from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"nonce": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"validAfter": "1716150000",
"validBefore": "1716150000",
"value": "1000000000000000000"
},
"signature": "0xf3746613c2d920b5fdabc0856f2aeb2d4f88ee6037b8cc5d04a71a4462f134801234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b"
}
],
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/x402ExactEvmPayload"
},
{
"$ref": "#/components/schemas/x402ExactEvmPermit2Payload"
},
{
"$ref": "#/components/schemas/x402ExactSolanaPayload"
},
{
"$ref": "#/components/schemas/x402UptoEvmPermit2Payload"
},
{
"$ref": "#/components/schemas/x402BatchSettlementEvmPayload"
}
]
}Variants§
ExactEvmPayload(X402ExactEvmPayload)
ExactEvmPermit2Payload(X402ExactEvmPermit2Payload)
ExactSolanaPayload(X402ExactSolanaPayload)
UptoEvmPermit2Payload(X402UptoEvmPermit2Payload)
BatchSettlementEvmPayload(X402BatchSettlementEvmPayload)
Trait Implementations§
Source§impl Clone for X402v2PaymentPayloadPayload
impl Clone for X402v2PaymentPayloadPayload
Source§fn clone(&self) -> X402v2PaymentPayloadPayload
fn clone(&self) -> X402v2PaymentPayloadPayload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for X402v2PaymentPayloadPayload
impl Debug for X402v2PaymentPayloadPayload
Source§impl<'de> Deserialize<'de> for X402v2PaymentPayloadPayload
impl<'de> Deserialize<'de> for X402v2PaymentPayloadPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&X402v2PaymentPayloadPayload> for X402v2PaymentPayloadPayload
impl From<&X402v2PaymentPayloadPayload> for X402v2PaymentPayloadPayload
Source§fn from(value: &X402v2PaymentPayloadPayload) -> Self
fn from(value: &X402v2PaymentPayloadPayload) -> Self
Converts to this type from the input type.
Source§impl From<X402BatchSettlementEvmPayload> for X402v2PaymentPayloadPayload
impl From<X402BatchSettlementEvmPayload> for X402v2PaymentPayloadPayload
Source§fn from(value: X402BatchSettlementEvmPayload) -> Self
fn from(value: X402BatchSettlementEvmPayload) -> Self
Converts to this type from the input type.
Source§impl From<X402ExactEvmPayload> for X402v2PaymentPayloadPayload
impl From<X402ExactEvmPayload> for X402v2PaymentPayloadPayload
Source§fn from(value: X402ExactEvmPayload) -> Self
fn from(value: X402ExactEvmPayload) -> Self
Converts to this type from the input type.
Source§impl From<X402ExactEvmPermit2Payload> for X402v2PaymentPayloadPayload
impl From<X402ExactEvmPermit2Payload> for X402v2PaymentPayloadPayload
Source§fn from(value: X402ExactEvmPermit2Payload) -> Self
fn from(value: X402ExactEvmPermit2Payload) -> Self
Converts to this type from the input type.
Source§impl From<X402ExactSolanaPayload> for X402v2PaymentPayloadPayload
impl From<X402ExactSolanaPayload> for X402v2PaymentPayloadPayload
Source§fn from(value: X402ExactSolanaPayload) -> Self
fn from(value: X402ExactSolanaPayload) -> Self
Converts to this type from the input type.
Source§impl From<X402UptoEvmPermit2Payload> for X402v2PaymentPayloadPayload
impl From<X402UptoEvmPermit2Payload> for X402v2PaymentPayloadPayload
Source§fn from(value: X402UptoEvmPermit2Payload) -> Self
fn from(value: X402UptoEvmPermit2Payload) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for X402v2PaymentPayloadPayload
impl RefUnwindSafe for X402v2PaymentPayloadPayload
impl Send for X402v2PaymentPayloadPayload
impl Sync for X402v2PaymentPayloadPayload
impl Unpin for X402v2PaymentPayloadPayload
impl UnsafeUnpin for X402v2PaymentPayloadPayload
impl UnwindSafe for X402v2PaymentPayloadPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more