Add some code snippets

This commit is contained in:
Simon Warta
2020-02-06 17:46:47 +01:00
parent cf083e3fb0
commit bc87f8e87a
5 changed files with 92 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
const defaultHttpUrl = "http://localhost:1317";
const defaultNetworkId = "testing";
const defaultFee: types.StdFee = {
amount: [
{
amount: "5000",
denom: "ucosm",
},
],
gas: "890000",
};
const faucetMnemonic =
"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone";
const faucetPath = HdPaths.cosmos(0);
const faucetAddress = "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6";
const wallet = Secp256k1HdWallet.fromMnemonic(faucetMnemonic);
const signer = await wallet.createIdentity("unused_value" as ChainId, faucetPath);
const client = new RestClient(defaultHttpUrl);