diff --git a/packages/cli/examples/helpers.ts b/packages/cli/examples/helpers.ts index 18ade78e..9d36fee2 100644 --- a/packages/cli/examples/helpers.ts +++ b/packages/cli/examples/helpers.ts @@ -86,3 +86,9 @@ const executeContract = async (execClient: RestClient, execPen: Secp256k1Pen, co return execLogs; } +const randomAddress = async (): Promise => { + const mnemonic = Bip39.encode(Random.getBytes(16)).toString(); + const randomPen = await Secp256k1Pen.fromMnemonic(mnemonic); + const pubkey = encodeSecp256k1Pubkey(randomPen.pubkey); + return encodeAddress(pubkey, "cosmos"); +}