Skip to content

Commit

Permalink
Add more details from Discord
Browse files Browse the repository at this point in the history
  • Loading branch information
clay-aptos authored and gregnazario committed Oct 17, 2022
1 parent 6f4a4f5 commit 63c9c3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion developer-docs-site/docs/reference/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ then there is a guarantee that T_N will never be included in the blockchain.

## Resource Account

- A resource account is used to manage resources independent of an account managed by a user. For example, a developer may use a resource account to manage an account for module publishing, say managing a contract. The contract itself does not require a signer post initialization.
- A resource account is used to manage resources independent of an account managed by a user. For example, a developer may use a resource account to manage an account for module publishing, say managing a contract. The contract itself does not require a signer post initialization. A resource account gives you the means for the module to provide a signer to other modules and sign transactions on behalf of the module.
- In Aptos, a resource account is created based upon the SHA3-256 hash of the source's address and additional seed data. A resource account can be created only once. An entity may call `create_account` in an attempt to claim an account ahead of the creation of a resource account. But if a resource account is found, Aptos will transition ownership of the account over to the resource account. This is done by validating that the account has yet to execute any transactions and that the `Account::signer_capbility_offer::for` is none. The probability of a collision where someone has legitimately produced a private key that maps to a resource account address is improbably low.
- For an example, see the `SignerCapability` employed by the `mint_nft` function in this [section of `minting.move`](https://github.com/aptos-labs/aptos-core/blob/2e9d8ee759fcd3f6e831034f05c1656b1c48efc4/aptos-move/move-examples/mint_nft/sources/minting.move#L143-L181).
- For more details, see the "resource account" references in [resource_account.move](https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-framework/sources/resource_account.move) and [account.move](https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-framework/sources/account.move).
Expand Down

0 comments on commit 63c9c3a

Please sign in to comment.