Struct near_primitives_core::account::AccessKey
source · pub struct AccessKey {
pub nonce: Nonce,
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
Fields§
§nonce: Nonce
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.
Implementations§
source§impl AccessKey
impl AccessKey
pub const ACCESS_KEY_NONCE_RANGE_MULTIPLIER: u64 = 1_000_000u64
pub fn full_access() -> Self
Trait Implementations§
source§impl BorshDeserialize for AccessKey
impl BorshDeserialize for AccessKey
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for AccessKey
impl BorshSerialize for AccessKey
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
source§impl PartialEq for AccessKey
impl PartialEq for AccessKey
impl Eq for AccessKey
impl StructuralPartialEq for AccessKey
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