Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docs for key birthdays #397

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions packages/docs/pages/users/shielded-accounts/masp-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,30 @@ WARNING: Keep your mnemonic and passphrase safe.
Loss of either can result in you being locked out of your accounts with no chance of recovering your funds.
</Callout>

#### Birthdays

When generating a spending key, you can optionally specify a birthday, like so:
```bash copy
namadaw gen --shielded --alias $SPENDING_KEY_ALIAS --birthday $BIRTHDAY
```

The birthday of a key is a block height before the key was created. Ideally, it should be as close to the current block
height as possible. Recall that the current block height can be queried via:
```bash copy
namadac block
```

The purpose of giving your keys a birthday is to let the wallet know that when scanning the ledger for MASP transactions
belonging to this key, there is no need to search blocks prior than the specified birthday. This can provide a lot of
time savings when performing [shielded sync](shielded-sync.mdx).

If no birthday is provided for a spending key, the birthday is set to the genesis block by default. Furthermore, any
viewing key derived from the spending key inherits its birthday.

Birthdays can also be provided when adding or deriving keys. By re-adding an existing key with a new birthday, you can
update a key's birthday in the wallet. Keys passed to shielded-sync directly (as opposed to being stored in the wallet),
can also be passed in with birthdays. This is done simply by by appending `<<{BIRTHDAY}` to the end of the key.

#### Displaying your spending key and viewing key
You can display your viewing key with:
```bash copy
Expand Down
Loading