pub struct X402UptoEvmPermit2PayloadPermit2Authorization {
pub deadline: String,
pub from: X402UptoEvmPermit2PayloadPermit2AuthorizationFrom,
pub nonce: X402UptoEvmPermit2PayloadPermit2AuthorizationNonce,
pub permitted: X402UptoEvmPermit2PayloadPermit2AuthorizationPermitted,
pub spender: X402UptoEvmPermit2PayloadPermit2AuthorizationSpender,
pub witness: X402UptoEvmPermit2PayloadPermit2AuthorizationWitness,
}Expand description
The authorization data for the Permit2 PermitWitnessTransferFrom message. The permitted.amount is the maximum the client authorizes; the actual settled amount is decided by the resource server at settle time and MUST be less than or equal to it.
JSON schema
{
"description": "The authorization data for the Permit2 PermitWitnessTransferFrom message. The `permitted.amount` is the maximum the client authorizes; the actual settled amount is decided by the resource server at settle time and MUST be less than or equal to it.",
"type": "object",
"required": [
"deadline",
"from",
"nonce",
"permitted",
"spender",
"witness"
],
"properties": {
"deadline": {
"description": "The unix timestamp before which the permit is valid.",
"examples": [
"1740672154"
],
"type": "string"
},
"from": {
"description": "The 0x-prefixed, checksum EVM address of the sender of the payment.",
"examples": [
"0x857b06519E91e3A54538791bDbb0E22373e36b66"
],
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"nonce": {
"description": "The Permit2 nonce as a decimal string (uint256).",
"examples": [
"12345678901234567890"
],
"type": "string",
"pattern": "^[0-9]+$"
},
"permitted": {
"description": "The token permissions for the transfer.",
"type": "object",
"required": [
"amount",
"token"
],
"properties": {
"amount": {
"description": "The maximum amount the client authorizes to transfer in atomic units.",
"examples": [
"5000000"
],
"type": "string"
},
"token": {
"description": "The 0x-prefixed, checksum EVM address of the token to transfer.",
"examples": [
"0x036CbD53842c5426634e7929541eC2318f3dCF7e"
],
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
}
},
"spender": {
"description": "The 0x-prefixed, checksum EVM address of the spender (the x402 Upto Permit2 proxy contract).",
"examples": [
"0x4020A4f3b7b90ccA423B9fabCc0CE57C6C240002"
],
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"witness": {
"description": "The witness data containing payment details. Includes a `facilitator` field to bind the authorization to a specific facilitator address.",
"type": "object",
"required": [
"facilitator",
"to",
"validAfter"
],
"properties": {
"facilitator": {
"description": "The 0x-prefixed, checksum EVM address of the facilitator authorized to settle this payment. MUST match the `facilitatorAddress` advertised in the payment requirements `extra` field.",
"examples": [
"0x1111111111111111111111111111111111111111"
],
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"to": {
"description": "The 0x-prefixed, checksum EVM address of the recipient.",
"examples": [
"0x209693Bc6afc0C5328bA36FaF03C514EF312287C"
],
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"validAfter": {
"description": "The unix timestamp after which the payment is valid.",
"examples": [
"1740672089"
],
"type": "string"
}
}
}
}
}Fields§
§deadline: StringThe unix timestamp before which the permit is valid.
from: X402UptoEvmPermit2PayloadPermit2AuthorizationFromThe 0x-prefixed, checksum EVM address of the sender of the payment.
nonce: X402UptoEvmPermit2PayloadPermit2AuthorizationNonceThe Permit2 nonce as a decimal string (uint256).
permitted: X402UptoEvmPermit2PayloadPermit2AuthorizationPermitted§spender: X402UptoEvmPermit2PayloadPermit2AuthorizationSpenderThe 0x-prefixed, checksum EVM address of the spender (the x402 Upto Permit2 proxy contract).
witness: X402UptoEvmPermit2PayloadPermit2AuthorizationWitnessImplementations§
Trait Implementations§
Source§impl Clone for X402UptoEvmPermit2PayloadPermit2Authorization
impl Clone for X402UptoEvmPermit2PayloadPermit2Authorization
Source§fn clone(&self) -> X402UptoEvmPermit2PayloadPermit2Authorization
fn clone(&self) -> X402UptoEvmPermit2PayloadPermit2Authorization
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<'de> Deserialize<'de> for X402UptoEvmPermit2PayloadPermit2Authorization
impl<'de> Deserialize<'de> for X402UptoEvmPermit2PayloadPermit2Authorization
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<&X402UptoEvmPermit2PayloadPermit2Authorization> for X402UptoEvmPermit2PayloadPermit2Authorization
impl From<&X402UptoEvmPermit2PayloadPermit2Authorization> for X402UptoEvmPermit2PayloadPermit2Authorization
Source§fn from(value: &X402UptoEvmPermit2PayloadPermit2Authorization) -> Self
fn from(value: &X402UptoEvmPermit2PayloadPermit2Authorization) -> Self
Converts to this type from the input type.
Source§impl From<X402UptoEvmPermit2PayloadPermit2Authorization> for X402UptoEvmPermit2PayloadPermit2Authorization
impl From<X402UptoEvmPermit2PayloadPermit2Authorization> for X402UptoEvmPermit2PayloadPermit2Authorization
Source§fn from(value: X402UptoEvmPermit2PayloadPermit2Authorization) -> Self
fn from(value: X402UptoEvmPermit2PayloadPermit2Authorization) -> Self
Converts to this type from the input type.
Source§impl TryFrom<X402UptoEvmPermit2PayloadPermit2Authorization> for X402UptoEvmPermit2PayloadPermit2Authorization
impl TryFrom<X402UptoEvmPermit2PayloadPermit2Authorization> for X402UptoEvmPermit2PayloadPermit2Authorization
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
value: X402UptoEvmPermit2PayloadPermit2Authorization,
) -> Result<Self, ConversionError>
fn try_from( value: X402UptoEvmPermit2PayloadPermit2Authorization, ) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for X402UptoEvmPermit2PayloadPermit2Authorization
impl RefUnwindSafe for X402UptoEvmPermit2PayloadPermit2Authorization
impl Send for X402UptoEvmPermit2PayloadPermit2Authorization
impl Sync for X402UptoEvmPermit2PayloadPermit2Authorization
impl Unpin for X402UptoEvmPermit2PayloadPermit2Authorization
impl UnsafeUnpin for X402UptoEvmPermit2PayloadPermit2Authorization
impl UnwindSafe for X402UptoEvmPermit2PayloadPermit2Authorization
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