pub enum RevocationPayload {
Eip2612Payload(Eip2612Payload),
Permit2AllowancePayload(Permit2AllowancePayload),
Erc20ApprovalPayload(Erc20ApprovalPayload),
SolanaSubscriptionPayload(SolanaSubscriptionPayload),
}Expand description
A single payload the customer signs to remove the mandate’s spending allowance on-chain. Each payload sets the allowance to zero using the same credential type that granted it. Inspect type to determine how to handle data:
- `eip2612`: an EIP-2612 `Permit` with `value` of `0`; pass `data` to
`eth_signTypedData_v4`, return the signature.
- `permit2`: a Permit2 `PermitSingle` with `amount` of `0`; pass `data` to
`eth_signTypedData_v4`, return the signature.
- `erc20_approval`: an ERC-20 `approve` of `0`; send `data` via
`eth_sendTransaction`, return the transaction hash.
- `solana_subscription`: decode `data.transaction` from base64 and pass the
bytes to the Solana Wallet Standard `signTransaction` method (never
`signAndSendTransaction`). The transaction is `revokeDelegation`.
From the signed transaction, extract the 64-byte ed25519 signature for
the payer that signed, base58-encode it, and return that string as
`OnchainSignedPayload.signature`.JSON schema
{
"description": "A single payload the customer signs to remove the mandate's spending allowance on-chain. Each payload sets the allowance to zero using the same credential type that granted it. Inspect `type` to determine how to handle `data`:\n\n- `eip2612`: an EIP-2612 `Permit` with `value` of `0`; pass `data` to\n `eth_signTypedData_v4`, return the signature.\n\n\n- `permit2`: a Permit2 `PermitSingle` with `amount` of `0`; pass `data` to\n `eth_signTypedData_v4`, return the signature.\n\n\n- `erc20_approval`: an ERC-20 `approve` of `0`; send `data` via\n `eth_sendTransaction`, return the transaction hash.\n\n- `solana_subscription`: decode `data.transaction` from base64 and pass the\n bytes to the Solana Wallet Standard `signTransaction` method (never\n `signAndSendTransaction`). The transaction is `revokeDelegation`.\n From the signed transaction, extract the 64-byte ed25519 signature for\n the payer that signed, base58-encode it, and return that string as\n `OnchainSignedPayload.signature`.",
"oneOf": [
{
"$ref": "#/components/schemas/EIP2612Payload"
},
{
"$ref": "#/components/schemas/Permit2AllowancePayload"
},
{
"$ref": "#/components/schemas/Erc20ApprovalPayload"
},
{
"$ref": "#/components/schemas/SolanaSubscriptionPayload"
}
]
}Variants§
Eip2612Payload(Eip2612Payload)
Permit2AllowancePayload(Permit2AllowancePayload)
Erc20ApprovalPayload(Erc20ApprovalPayload)
SolanaSubscriptionPayload(SolanaSubscriptionPayload)
Trait Implementations§
Source§impl Clone for RevocationPayload
impl Clone for RevocationPayload
Source§impl Debug for RevocationPayload
impl Debug for RevocationPayload
Source§impl<'de> Deserialize<'de> for RevocationPayload
impl<'de> Deserialize<'de> for RevocationPayload
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<&RevocationPayload> for RevocationPayload
impl From<&RevocationPayload> for RevocationPayload
Source§fn from(value: &RevocationPayload) -> Self
fn from(value: &RevocationPayload) -> 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<Erc20ApprovalPayload> for RevocationPayload
impl From<Erc20ApprovalPayload> for RevocationPayload
Source§fn from(value: Erc20ApprovalPayload) -> Self
fn from(value: Erc20ApprovalPayload) -> Self
Converts to this type from the input type.
Source§impl From<Permit2AllowancePayload> for RevocationPayload
impl From<Permit2AllowancePayload> for RevocationPayload
Source§fn from(value: Permit2AllowancePayload) -> Self
fn from(value: Permit2AllowancePayload) -> Self
Converts to this type from the input type.
Source§impl From<SolanaSubscriptionPayload> for RevocationPayload
impl From<SolanaSubscriptionPayload> for RevocationPayload
Source§fn from(value: SolanaSubscriptionPayload) -> Self
fn from(value: SolanaSubscriptionPayload) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RevocationPayload
impl RefUnwindSafe for RevocationPayload
impl Send for RevocationPayload
impl Sync for RevocationPayload
impl Unpin for RevocationPayload
impl UnsafeUnpin for RevocationPayload
impl UnwindSafe for RevocationPayload
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