Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Commit f879c75

Browse files
committed
update examples
1 parent df13cda commit f879c75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/webpack/html/load-keystore-demo.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ async function test() {
22
const zilliqa = new Zilliqa.Zilliqa('https://dev-api.zilliqa.com');
33
const keystore = `{"address":"0x3591c6b333776a5b6c885Ada53b4462dEe8c67B6","crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"1b23d4a09fa241b9cbe176fbc7d9567f"},"ciphertext":"40cce0a0b4eee4e4258341e18d880ff4b12ed25887252b90b7de4b6be86da5d5","kdf":"scrypt","kdfparams":{"salt":"4997f389a370424072967f6faeb709c238ff3cc3606a4101fc3dcbdd74b67108","n":8192,"c":262144,"r":8,"p":1,"dklen":32},"mac":"97f0677a9f0ad0c6052896e1b5ae94f86025047b9fe2617c1fce220af0db0e82"},"id":"39626239-3338-4138-b662-363663333030","version":3}`;
44
const keystoreAddress = await zilliqa.wallet.addByKeystore(keystore, "strong_password");
5+
const exportedKeystore = await zilliqa.wallet.export("0x3591c6b333776a5b6c885Ada53b4462dEe8c67B6", "strong_password", 'scrypt');
6+
57
console.log("keystore loaded - address: %o", keystoreAddress);
8+
console.log("exported keystore: %o", exportedKeystore);
69
}
710

811
test();

0 commit comments

Comments
 (0)