Skip to content

Commit 261810c

Browse files
committed
Document how to convert between hex and bech32
1 parent bdd4719 commit 261810c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/reference/shelley-genesis.md

+13
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,19 @@ And if we compare this with the `initialFunds` from the generated file we see
502502
This means we'll start with 0 lovelace in a special genesis UTxO at that
503503
address.
504504

505+
Side note: The above addresses are in hex. It is possible to translate them
506+
into [bech32](https://hackage.haskell.org/package/bech32) and back again like this:
507+
508+
```bash
509+
$ echo 600547e1d85598a728f577497a122c98f42a56d7411e23e97ed4d3956c | bech32 addr_test
510+
addr_test1vqz50cwc2kv2w284wayh5y3vnr6z54khgy0z86t76nfe2mqgj2dvn
511+
$ echo addr_test1vqz50cwc2kv2w284wayh5y3vnr6z54khgy0z86t76nfe2mqgj2dvn | bech32
512+
600547e1d85598a728f577497a122c98f42a56d7411e23e97ed4d3956c
513+
```
514+
515+
Note, the suffix will need to be `addr` or `addr_test` depending on whether the address
516+
is for `mainnet` or a testnet.
517+
505518
Ok, so zero lovelace is not that useful. We can however edit the
506519
`genesis.spec.json` and set the `maxLovelaceSupply` there, or we specify the
507520
initial supply when we re-generate the genesis file. Either way, it will be

0 commit comments

Comments
 (0)