Skip to content

Commit

Permalink
Merge branch 'master' into fix_nep366_errors
Browse files Browse the repository at this point in the history
  • Loading branch information
frol authored Aug 4, 2023
2 parents 8e033e3 + 4290e6f commit 7ab7e59
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 23 deletions.
2 changes: 1 addition & 1 deletion neps/nep-0141.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Prior art:

Learn about NEP-141:

- [Figment Learning Pathway](https://learn.figment.io/tutorials/stake-fungible-token)
- [Figment Learning Pathway](https://web.archive.org/web/20220621055335/https://learn.figment.io/tutorials/stake-fungible-token)

## Specification

Expand Down
11 changes: 5 additions & 6 deletions specs/DataStructures/Account.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

## Account ID

[account_id]: #account_id

NEAR Protocol has an account names system. Account ID is similar to a username. Account IDs have to follow the rules.

### Account ID Rules
Expand All @@ -26,6 +24,7 @@ Regex for a full account ID, without checking for length:
```regex
^(([a-z\d]+[\-_])*[a-z\d]+\.)*([a-z\d]+[\-_])*[a-z\d]+$
```

### Top Level Accounts

| Name | Value |
Expand All @@ -52,7 +51,7 @@ def action_create_account(predecessor_id, account_id):

Valid accounts:

```
```c
ok
bowen
ek-2
Expand All @@ -73,7 +72,7 @@ bro.a

Invalid accounts:

```
```c
not ok // Whitespace characters are not allowed
a // Too short
100- // Suffix separator
Expand All @@ -91,6 +90,7 @@ abcdefghijklmnopqrstuvwxyz.abcdefghijklmnopqrstuvwxyz.abcdefghijklmnopqrstuvwxyz
```

## System account

`system` is a special account that is only used to identify refund receipts. For refund receipts, we set the predecessor_id to be `system` to indicate that it is a refund receipt. Users cannot create or access the `system` account. In fact, this account does not exist as part of the state.

## Implicit account IDs
Expand All @@ -107,6 +107,7 @@ The corresponding secret key allows you to sign transactions on behalf of this a
### Implicit account creation

An account with implicit account ID can only be created by sending a transaction/receipt with a single `Transfer` action to the implicit account ID receiver:

- The account will be created with the account ID.
- The account will have a new full access key with the ED25519-curve public key of `decode_hex(account_id)` and nonce `0`.
- The account balance will have a transfer balance deposited to it.
Expand All @@ -117,8 +118,6 @@ Once an implicit account is created it acts as a regular account until it's dele

## Account

[account]: #account

Data for an single account is collocated in one shard. The account data consists of the following:

- Balance
Expand Down
Loading

0 comments on commit 7ab7e59

Please sign in to comment.