pub struct GasKey {
pub balance: NearToken,
pub num_nonces: u32,
pub permission: AccessKeyPermission,
}Expand description
Gas key is like an access key, except it stores a balance separately, and transactions signed with it deduct their cost from the gas key balance instead of the account balance.
JSON schema
{
"description": "Gas key is like an access key, except it stores a balance separately, and transactions signed\nwith it deduct their cost from the gas key balance instead of the account balance.",
"type": "object",
"required": [
"balance",
"num_nonces",
"permission"
],
"properties": {
"balance": {
"description": "The balance of the gas key.",
"allOf": [
{
"$ref": "#/components/schemas/NearToken"
}
]
},
"num_nonces": {
"description": "The number of nonces this gas key has.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"permission": {
"description": "Defines the permissions for this gas key.\nIf this is a `FunctionCallPermission`, the allowance must be None (unlimited).",
"allOf": [
{
"$ref": "#/components/schemas/AccessKeyPermission"
}
]
}
}
}Fields§
§balance: NearTokenThe balance of the gas key.
num_nonces: u32The number of nonces this gas key has.
permission: AccessKeyPermissionDefines the permissions for this gas key.
If this is a FunctionCallPermission, the allowance must be None (unlimited).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GasKey
impl<'de> Deserialize<'de> for GasKey
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 GasKey
impl RefUnwindSafe for GasKey
impl Send for GasKey
impl Sync for GasKey
impl Unpin for GasKey
impl UnwindSafe for GasKey
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