pub struct Eip2612Payload {
pub data: Eip712Message,
pub payload_id: String,
pub type_: Eip2612PayloadType,
}Expand description
An EIP-2612 Permit typed-data payload. The payer must pass data to eth_signTypedData_v4 and return the resulting signature. Used to set up a mandate’s reusable credential; the permit stands in for a live per-authorization signature on later authorizations.
JSON schema
{
"title": "EIP-2612 Payload",
"description": "An EIP-2612 Permit typed-data payload. The payer must pass `data` to `eth_signTypedData_v4` and return the resulting signature. Used to set up a mandate's reusable credential; the permit stands in for a live per-authorization signature on later authorizations.",
"examples": [
{
"data": {
"domain": {
"chainId": 8453,
"name": "USD Coin",
"verifyingContract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"version": "2"
},
"message": {
"deadline": "1798761600",
"nonce": "0",
"owner": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
"spender": "0x9Fb909eA400c2b8D99Be292DADf07e63B814527c",
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
},
"primaryType": "Permit",
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Permit": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
}
]
}
},
"payloadId": "payload_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"type": "eip2612"
}
],
"type": "object",
"required": [
"data",
"payloadId",
"type"
],
"properties": {
"data": {
"description": "EIP-712 typed data for an EIP-2612 Permit. Pass to `eth_signTypedData_v4`.",
"examples": [
{
"domain": {
"chainId": 8453,
"name": "USD Coin",
"verifyingContract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"version": "2"
},
"message": {
"deadline": "1798761600",
"nonce": "0",
"owner": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
"spender": "0x9Fb909eA400c2b8D99Be292DADf07e63B814527c",
"value": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
},
"primaryType": "Permit",
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Permit": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
}
]
}
}
],
"allOf": [
{
"$ref": "#/components/schemas/EIP712Message"
}
]
},
"payloadId": {
"description": "The unique identifier of the payload.",
"examples": [
"payload_af2937b0-9846-4fe7-bfe9-ccc22d935114"
],
"type": "string"
},
"type": {
"description": "The payload type.",
"examples": [
"eip2612"
],
"type": "string",
"enum": [
"eip2612"
]
}
}
}Fields§
§data: Eip712MessageEIP-712 typed data for an EIP-2612 Permit. Pass to eth_signTypedData_v4.
payload_id: StringThe unique identifier of the payload.
type_: Eip2612PayloadTypeThe payload type.
Implementations§
Source§impl Eip2612Payload
impl Eip2612Payload
pub fn builder() -> Eip2612Payload
Trait Implementations§
Source§impl Clone for Eip2612Payload
impl Clone for Eip2612Payload
Source§impl Debug for Eip2612Payload
impl Debug for Eip2612Payload
Source§impl<'de> Deserialize<'de> for Eip2612Payload
impl<'de> Deserialize<'de> for Eip2612Payload
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<&Eip2612Payload> for Eip2612Payload
impl From<&Eip2612Payload> for Eip2612Payload
Source§fn from(value: &Eip2612Payload) -> Self
fn from(value: &Eip2612Payload) -> Self
Converts to this type from the input type.
Source§impl From<Eip2612Payload> for ApprovalPayload
impl From<Eip2612Payload> for ApprovalPayload
Source§fn from(value: Eip2612Payload) -> Self
fn from(value: Eip2612Payload) -> Self
Converts to this type from the input type.
Source§impl From<Eip2612Payload> for RevocationPayload
impl From<Eip2612Payload> for RevocationPayload
Source§fn from(value: Eip2612Payload) -> Self
fn from(value: Eip2612Payload) -> Self
Converts to this type from the input type.
Source§impl From<Eip2612Payload> for Eip2612Payload
impl From<Eip2612Payload> for Eip2612Payload
Source§fn from(value: Eip2612Payload) -> Self
fn from(value: Eip2612Payload) -> Self
Converts to this type from the input type.
Source§impl Serialize for Eip2612Payload
impl Serialize for Eip2612Payload
Source§impl TryFrom<Eip2612Payload> for Eip2612Payload
impl TryFrom<Eip2612Payload> for Eip2612Payload
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: Eip2612Payload) -> Result<Self, ConversionError>
fn try_from(value: Eip2612Payload) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Eip2612Payload
impl RefUnwindSafe for Eip2612Payload
impl Send for Eip2612Payload
impl Sync for Eip2612Payload
impl Unpin for Eip2612Payload
impl UnsafeUnpin for Eip2612Payload
impl UnwindSafe for Eip2612Payload
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