Create toBech32 and fromBech32 in @cosmjs/encoding (#1058)
* Create toBech32 and fromBech32 * Add changes to CHANGELOG.md * Fix linting * Update packages/encoding/src/bech32.ts Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Update packages/encoding/src/bech32.ts Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> * Update bech32.ts Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
This commit is contained in:
co-authored by
Simon Warta
parent
9b80dff493
commit
4c8b278c1d
@@ -1,5 +1,5 @@
|
||||
import { Random } from "@cosmjs/crypto";
|
||||
import { Bech32 } from "@cosmjs/encoding";
|
||||
import { toBech32 } from "@cosmjs/encoding";
|
||||
import { makeCosmoshubPath, StargateClient } from "@cosmjs/stargate";
|
||||
import { assert } from "@cosmjs/utils";
|
||||
|
||||
@@ -18,7 +18,7 @@ const defaultTokenConfig: TokenConfiguration = {
|
||||
const defaultAddressPrefix = "cosmos";
|
||||
|
||||
function makeRandomAddress(): string {
|
||||
return Bech32.encode(defaultAddressPrefix, Random.getBytes(20));
|
||||
return toBech32(defaultAddressPrefix, Random.getBytes(20));
|
||||
}
|
||||
|
||||
const faucetMnemonic =
|
||||
|
||||
Reference in New Issue
Block a user