pub struct SignEvmTypedDataFieldCriterion {
pub conditions: Vec<SignEvmTypedDataFieldCriterionConditionsItem>,
pub type_: SignEvmTypedDataFieldCriterionType,
pub types: SignEvmTypedDataFieldCriterionTypes,
}
Expand description
SignEvmTypedDataFieldCriterion
JSON schema
{
"title": "SignEvmTypedDataFieldCriterion",
"type": "object",
"required": [
"conditions",
"type",
"types"
],
"properties": {
"conditions": {
"description": "A list of conditions to check against the data being signed. Each condition must be met for the rule to take effect.",
"examples": [
[
{
"addresses": [
"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
],
"operator": "in",
"path": "to.wallet"
},
{
"operator": ">=",
"path": "to.score",
"value": "50"
},
{
"match": "^hello ([a-z]+)$",
"path": "contents"
}
]
],
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/EvmTypedAddressCondition"
},
{
"$ref": "#/components/schemas/EvmTypedNumericalCondition"
},
{
"$ref": "#/components/schemas/EvmTypedStringCondition"
}
]
}
},
"type": {
"description": "The type of criterion to use. This should be `evmTypedDataField`.",
"examples": [
"evmTypedDataField"
],
"type": "string",
"enum": [
"evmTypedDataField"
]
},
"types": {
"description": "An object containing EIP-712 type definitions, as well as a primary type for the root message object.",
"examples": [
{
"primaryType": "Mail",
"types": {
"Mail": [
{
"name": "from",
"type": "Person"
},
{
"name": "to",
"type": "Person"
},
{
"name": "contents",
"type": "string"
}
],
"Person": [
{
"name": "name",
"type": "string"
},
{
"name": "wallet",
"type": "address"
},
{
"name": "score",
"type": "uint256"
}
]
}
}
],
"type": "object",
"required": [
"primaryType",
"types"
],
"properties": {
"primaryType": {
"description": "The name of the root EIP-712 type. This value must be included in the `types` object.",
"type": "string"
},
"types": {
"description": "EIP-712 compliant map of model names to model definitions.",
"type": "object",
"additionalProperties": {
"description": "Object containing names and types for fields within structured data.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The name of a key within an EIP-712 data structure.",
"type": "string"
},
"type": {
"description": "The Solidity type of a value within an EIP-712 data structure.",
"type": "string"
}
}
}
}
}
}
}
},
"x-audience": "public"
}
Fields§
§conditions: Vec<SignEvmTypedDataFieldCriterionConditionsItem>
A list of conditions to check against the data being signed. Each condition must be met for the rule to take effect.
type_: SignEvmTypedDataFieldCriterionType
The type of criterion to use. This should be evmTypedDataField
.
types: SignEvmTypedDataFieldCriterionTypes
Implementations§
Trait Implementations§
Source§impl Clone for SignEvmTypedDataFieldCriterion
impl Clone for SignEvmTypedDataFieldCriterion
Source§fn clone(&self) -> SignEvmTypedDataFieldCriterion
fn clone(&self) -> SignEvmTypedDataFieldCriterion
Returns a duplicate of the value. Read more
1.0.0 · 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 SignEvmTypedDataFieldCriterion
impl<'de> Deserialize<'de> for SignEvmTypedDataFieldCriterion
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<&SignEvmTypedDataFieldCriterion> for SignEvmTypedDataFieldCriterion
impl From<&SignEvmTypedDataFieldCriterion> for SignEvmTypedDataFieldCriterion
Source§fn from(value: &SignEvmTypedDataFieldCriterion) -> Self
fn from(value: &SignEvmTypedDataFieldCriterion) -> Self
Converts to this type from the input type.
Source§impl From<SignEvmTypedDataFieldCriterion> for SignEvmTypedDataCriteriaItem
impl From<SignEvmTypedDataFieldCriterion> for SignEvmTypedDataCriteriaItem
Source§fn from(value: SignEvmTypedDataFieldCriterion) -> Self
fn from(value: SignEvmTypedDataFieldCriterion) -> Self
Converts to this type from the input type.
Source§impl From<SignEvmTypedDataFieldCriterion> for SignEvmTypedDataFieldCriterion
impl From<SignEvmTypedDataFieldCriterion> for SignEvmTypedDataFieldCriterion
Source§fn from(value: SignEvmTypedDataFieldCriterion) -> Self
fn from(value: SignEvmTypedDataFieldCriterion) -> Self
Converts to this type from the input type.
Source§impl TryFrom<SignEvmTypedDataFieldCriterion> for SignEvmTypedDataFieldCriterion
impl TryFrom<SignEvmTypedDataFieldCriterion> for SignEvmTypedDataFieldCriterion
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
value: SignEvmTypedDataFieldCriterion,
) -> Result<Self, ConversionError>
fn try_from( value: SignEvmTypedDataFieldCriterion, ) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SignEvmTypedDataFieldCriterion
impl RefUnwindSafe for SignEvmTypedDataFieldCriterion
impl Send for SignEvmTypedDataFieldCriterion
impl Sync for SignEvmTypedDataFieldCriterion
impl Unpin for SignEvmTypedDataFieldCriterion
impl UnwindSafe for SignEvmTypedDataFieldCriterion
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