pub struct Policy {
pub chain_type: PolicyChainType,
pub created_at: f64,
pub id: PolicyId,
pub name: PolicyName,
pub owner_id: Option<String>,
pub rules: Vec<PolicyRuleResponse>,
pub version: PolicyVersion,
}Expand description
Policy
JSON schema
{
"examples": [
{
"chain_type": "ethereum",
"created_at": 1741833088894,
"id": "tb54eps4z44ed0jepousxi4n",
"name": "Allowlisted stablecoins",
"owner_id": null,
"rules": [
{
"action": "ALLOW",
"conditions": [
{
"field": "to",
"field_source": "ethereum_transaction",
"operator": "eq",
"value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
],
"id": "bdyfoa65pro1eez6iwtzanol",
"method": "eth_sendTransaction",
"name": "Allowlist USDC contract on Base"
}
],
"version": "1.0"
}
],
"type": "object",
"required": [
"chain_type",
"created_at",
"id",
"name",
"owner_id",
"rules",
"version"
],
"properties": {
"chain_type": {
"$ref": "#/components/schemas/PolicyChainType"
},
"created_at": {
"description": "Unix timestamp of when the policy was created in
milliseconds.",
"type": "number"
},
"id": {
"description": "Unique ID of the created policy. This will be the
primary identifier when using the policy in the future.",
"type": "string",
"maxLength": 24,
"minLength": 24
},
"name": {
"description": "Name to assign to policy.",
"type": "string",
"maxLength": 50,
"minLength": 1
},
"owner_id": {
"description": "The key quorum ID of the owner of the policy.",
"type": [
"string",
"null"
]
},
"rules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PolicyRuleResponse"
}
},
"version": {
"description": "Version of the policy. Currently, 1.0 is the only
version.",
"type": "string",
"enum": [
"1.0"
]
}
}
}Fields§
§chain_type: PolicyChainType§created_at: f64§id: PolicyIdUnique ID of the created policy. This will be the primary identifier when using the policy in the future.
name: PolicyNameName to assign to policy.
owner_id: Option<String>The key quorum ID of the owner of the policy.
rules: Vec<PolicyRuleResponse>§version: PolicyVersionVersion of the policy. Currently, 1.0 is the only version.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Policy
impl<'de> Deserialize<'de> for Policy
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
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
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