diff --git a/docs/2.develop/lock.md b/docs/2.develop/lock.md index ed5899d2392..a08bb12a06a 100644 --- a/docs/2.develop/lock.md +++ b/docs/2.develop/lock.md @@ -3,17 +3,47 @@ id: lock title: Locking Accounts --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + Removing all [full access keys](../4.tools/cli.md#near-delete-key-near-delete-key) from an account will effectively **lock it**. When an account is locked nobody can perform transactions in the account's name (e.g. update the code or transfer money). #### How to Lock an Account + + + ```bash near keys # result: [access_key: {"nonce": ..., "public_key": ''}] near delete-key '' ``` + + + +```bash +near account list-keys network-config testnet now +# result: + ++---+------------+-------+-------------+ +| # | Public Key | Nonce | Permissions | ++---+------------+-------+-------------+ + .. '' ... ... ++---+------------+-------+-------------+ + +near account delete-key '' network-config testnet sign-with-keychain send + +``` + + + + + + + + #### Why Locking an Account Locking an account brings more reassurance to end-users, since they know no external actor will be able to manipulate the account's