pub struct WalletMandateApprovalOption {
pub option_id: String,
pub payloads: Vec<ApprovalPayload>,
pub source: MandateSourceWallet,
}Expand description
An option for approving a mandate on a wallet source. Specifies the source (address, network, asset) and the payloads the customer must sign to approve the mandate on that source.
JSON schema
{
"title": "Wallet Mandate Approval Option",
"description": "An option for approving a mandate on a wallet source. Specifies the source (address, network, asset) and the payloads the customer must sign to approve the mandate on that source.",
"type": "object",
"required": [
"optionId",
"payloads",
"source"
],
"properties": {
"optionId": {
"description": "The unique identifier of the wallet mandate approval option.",
"examples": [
"opt_a1b2c3d4-e5f6-7890-abcd-ef1234567890"
],
"type": "string"
},
"payloads": {
"description": "The payloads the customer must sign to approve this source.",
"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": "array",
"items": {
"$ref": "#/components/schemas/ApprovalPayload"
}
},
"source": {
"description": "The source this option would attach to the mandate.",
"examples": [
{
"address": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
"asset": "usdc",
"network": "base"
}
],
"allOf": [
{
"$ref": "#/components/schemas/MandateSourceWallet"
}
]
}
}
}Fields§
§option_id: StringThe unique identifier of the wallet mandate approval option.
payloads: Vec<ApprovalPayload>The payloads the customer must sign to approve this source.
source: MandateSourceWalletThe source this option would attach to the mandate.
Implementations§
Trait Implementations§
Source§impl Clone for WalletMandateApprovalOption
impl Clone for WalletMandateApprovalOption
Source§impl Debug for WalletMandateApprovalOption
impl Debug for WalletMandateApprovalOption
Source§impl<'de> Deserialize<'de> for WalletMandateApprovalOption
impl<'de> Deserialize<'de> for WalletMandateApprovalOption
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<&WalletMandateApprovalOption> for WalletMandateApprovalOption
impl From<&WalletMandateApprovalOption> for WalletMandateApprovalOption
Source§fn from(value: &WalletMandateApprovalOption) -> Self
fn from(value: &WalletMandateApprovalOption) -> Self
Converts to this type from the input type.
Source§impl From<WalletMandateApprovalOption> for WalletMandateApprovalOption
impl From<WalletMandateApprovalOption> for WalletMandateApprovalOption
Source§fn from(value: WalletMandateApprovalOption) -> Self
fn from(value: WalletMandateApprovalOption) -> Self
Converts to this type from the input type.
Source§impl TryFrom<WalletMandateApprovalOption> for WalletMandateApprovalOption
impl TryFrom<WalletMandateApprovalOption> for WalletMandateApprovalOption
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: WalletMandateApprovalOption) -> Result<Self, ConversionError>
fn try_from(value: WalletMandateApprovalOption) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for WalletMandateApprovalOption
impl RefUnwindSafe for WalletMandateApprovalOption
impl Send for WalletMandateApprovalOption
impl Sync for WalletMandateApprovalOption
impl Unpin for WalletMandateApprovalOption
impl UnsafeUnpin for WalletMandateApprovalOption
impl UnwindSafe for WalletMandateApprovalOption
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