account¶
- class FunctionCallPermission¶
Grants limited permission to make transactions with FunctionCallActions The permission can limit the allowed balance to be spent on the prepaid gas. It also restrict the account ID of the receiver for this function call. It also can restrict the method name for the allowed function calls.
- allowance¶
Allowance is a balance limit to use by this access key to pay for function call gas and transaction fees. When this access key is used, both account balance and the allowance is decreased by the same value. None means unlimited allowance. NOTE: To change or increase the allowance, the old access key needs to be deleted and a new access key should be created.
- Type:
int | None
- static from_bytes(data)¶
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)¶
Build from a JSON string.
- method_names¶
A list of method names that can be used. The access key only allows transactions with the function call of one of the given method names. Empty list means any method name can be used.
- Type:
list[str]
- receiver_id¶
The access key only allows transactions with the given receiver’s account id.
- to_json()¶
Convert to a JSON string.
- class AccessKey¶
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.
- ACCESS_KEY_NONCE_RANGE_MULTIPLIER = 1000000¶
- static from_bytes(data)¶
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)¶
Build from a JSON string.
- static full_access()¶
Returns: AccessKey.
- 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.- Type:
int
- permission¶
Defines permissions for this access key.
- Type:
AccessKeyPermission
- to_json()¶
Convert to a JSON string.
- class Account¶
Per account information stored in the state.
- MAX_ACCOUNT_DELETION_STORAGE_USAGE = 10000¶
- amount¶
The total not locked tokens.
- Type:
int
- code_hash¶
Hash of the code stored in the storage for this account.
- Type:
- static from_bytes(data)¶
Deserialize from bytes.
- Parameters:
data (bytes) – the serialized object.
Returns: the deserialized object.
- static from_json(raw)¶
Build from a JSON string.
- locked¶
The amount locked due to staking.
- Type:
int
- storage_usage¶
Storage used by the given account, includes account id, this struct, access keys and other data.
- Type:
int
- to_json()¶
Convert to a JSON string.
- version¶
Version of Account in re migrations and similar
- Type: