pub struct AccessKey {
pub nonce: u64,
pub permission: AccessKeyPermission,
}
Expand description
Access key provides limited access to an account. Each access key belongs to some account and
is identified by a unique (within the account) public key. One account may have large number of
access keys. Access keys allow to act on behalf of the account by restricting transactions
that can be issued.
account_id,public_key
is a key in the state
JSON schema
{
"description": "Access key provides limited access to an account. Each access key belongs to some account and\nis identified by a unique (within the account) public key. One account may have large number of\naccess keys. Access keys allow to act on behalf of the account by restricting transactions\nthat can be issued.\n`account_id,public_key` is a key in the state",
"type": "object",
"required": [
"nonce",
"permission"
],
"properties": {
"nonce": {
"description": "Nonce for this access key, used for tx nonce generation. When access key is created, nonce\nis set to `(block_height - 1) * 1e6` to avoid tx hash collision on access key re-creation.\nSee <https://github.com/near/nearcore/issues/3779> for more details.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"permission": {
"description": "Defines permissions for this access key.",
"allOf": [
{
"$ref": "#/components/schemas/AccessKeyPermission"
}
]
}
}
}
Fields§
§nonce: u64
Nonce for this access key, used for tx nonce generation. When access key is created, nonce
is set to (block_height - 1) * 1e6
to avoid tx hash collision on access key re-creation.
See https://github.com/near/nearcore/issues/3779 for more details.
permission: AccessKeyPermission
Defines permissions for this access key.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AccessKey
impl<'de> Deserialize<'de> for AccessKey
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 AccessKey
impl RefUnwindSafe for AccessKey
impl Send for AccessKey
impl Sync for AccessKey
impl Unpin for AccessKey
impl UnwindSafe for AccessKey
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