pub struct Eip3009Payload {
pub data: Eip712Message,
pub payload_id: String,
pub type_: Eip3009PayloadType,
}Expand description
An EIP-3009 TransferWithAuthorization typed-data payload. The payer must pass data to eth_signTypedData_v4 and return the resulting signature.
JSON schema
{
"title": "EIP-3009 Payload",
"description": "An EIP-3009 TransferWithAuthorization typed-data payload. The payer must pass `data` to `eth_signTypedData_v4` and return the resulting signature.",
"examples": [
{
"data": {
"domain": {
"chainId": 8453,
"name": "USD Coin",
"verifyingContract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"version": "2"
},
"message": {
"from": "0x1111111111111111111111111111111111111111",
"nonce": "0x8f5c2d6f4b9a1e3c7d2f8a6b5c4e3d2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d",
"to": "0x2222222222222222222222222222222222222222",
"validAfter": "0",
"validBefore": "1767225600",
"value": "1000000"
},
"primaryType": "TransferWithAuthorization",
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"TransferWithAuthorization": [
{
"name": "from",
"type": "address"
},
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "validAfter",
"type": "uint256"
},
{
"name": "validBefore",
"type": "uint256"
},
{
"name": "nonce",
"type": "bytes32"
}
]
}
},
"payloadId": "payload_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"type": "eip3009"
}
],
"type": "object",
"required": [
"data",
"payloadId",
"type"
],
"properties": {
"data": {
"description": "EIP-712 typed data for a TransferWithAuthorization. Pass to `eth_signTypedData_v4`.",
"examples": [
{
"domain": {
"chainId": 8453,
"name": "USD Coin",
"verifyingContract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"version": "2"
},
"message": {
"from": "0x1111111111111111111111111111111111111111",
"nonce": "0x8f5c2d6f4b9a1e3c7d2f8a6b5c4e3d2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d",
"to": "0x2222222222222222222222222222222222222222",
"validAfter": "0",
"validBefore": "1767225600",
"value": "1000000"
},
"primaryType": "TransferWithAuthorization",
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"TransferWithAuthorization": [
{
"name": "from",
"type": "address"
},
{
"name": "to",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "validAfter",
"type": "uint256"
},
{
"name": "validBefore",
"type": "uint256"
},
{
"name": "nonce",
"type": "bytes32"
}
]
}
}
],
"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": [
"eip3009"
],
"type": "string",
"enum": [
"eip3009"
]
}
}
}Fields§
§data: Eip712MessageEIP-712 typed data for a TransferWithAuthorization. Pass to eth_signTypedData_v4.
payload_id: StringThe unique identifier of the payload.
type_: Eip3009PayloadTypeThe payload type.
Implementations§
Source§impl Eip3009Payload
impl Eip3009Payload
pub fn builder() -> Eip3009Payload
Trait Implementations§
Source§impl Clone for Eip3009Payload
impl Clone for Eip3009Payload
Source§impl Debug for Eip3009Payload
impl Debug for Eip3009Payload
Source§impl<'de> Deserialize<'de> for Eip3009Payload
impl<'de> Deserialize<'de> for Eip3009Payload
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<&Eip3009Payload> for Eip3009Payload
impl From<&Eip3009Payload> for Eip3009Payload
Source§fn from(value: &Eip3009Payload) -> Self
fn from(value: &Eip3009Payload) -> Self
Converts to this type from the input type.
Source§impl From<Eip3009Payload> for OnchainSignaturePayload
impl From<Eip3009Payload> for OnchainSignaturePayload
Source§fn from(value: Eip3009Payload) -> Self
fn from(value: Eip3009Payload) -> Self
Converts to this type from the input type.
Source§impl From<Eip3009Payload> for Eip3009Payload
impl From<Eip3009Payload> for Eip3009Payload
Source§fn from(value: Eip3009Payload) -> Self
fn from(value: Eip3009Payload) -> Self
Converts to this type from the input type.
Source§impl Serialize for Eip3009Payload
impl Serialize for Eip3009Payload
Source§impl TryFrom<Eip3009Payload> for Eip3009Payload
impl TryFrom<Eip3009Payload> for Eip3009Payload
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: Eip3009Payload) -> Result<Self, ConversionError>
fn try_from(value: Eip3009Payload) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Eip3009Payload
impl RefUnwindSafe for Eip3009Payload
impl Send for Eip3009Payload
impl Sync for Eip3009Payload
impl Unpin for Eip3009Payload
impl UnsafeUnpin for Eip3009Payload
impl UnwindSafe for Eip3009Payload
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