Skip to content

Commit

Permalink
Add comments in example
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinullrich committed Nov 6, 2023
1 parent 0759e0c commit 504d58a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions example/polyseed_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,24 @@ void main() {
print('seed2: ${seed2.encode(lang, PolyseedCoin.POLYSEED_MONERO)}');

seed.crypt("CakeWallet");
print(seed.isEncrypted);
print('seedEnc: ${seed.encode(lang, PolyseedCoin.POLYSEED_MONERO)}');
print(seed.isEncrypted); // true
print('encrypted: ${seed.encode(lang, PolyseedCoin.POLYSEED_MONERO)}');

seed.crypt("CakeWallet");
print(seed.isEncrypted);
print('seedEnc: ${seed.encode(lang, PolyseedCoin.POLYSEED_MONERO)}');
print(seed.isEncrypted); // false
print('decrypted: ${seed.encode(lang, PolyseedCoin.POLYSEED_MONERO)}');

var seedFeatherStr =
"unaware yard donate shallow slot sing oil oxygen loyal bench near hill surround forum execute lamp";
var seedFeather =
Polyseed.decode(seedFeatherStr, lang, PolyseedCoin.POLYSEED_MONERO);

var key = seedFeather.generateKey(PolyseedCoin.POLYSEED_MONERO, 32);
print(seedFeather.birthday);
print(keyToHexString(key));
print(base64.encode(seedFeather.save()));
print(seedFeather.birthday); // 1693622412
print(keyToHexString(
key)); // cbbd142d38347773d44aa830f5f01442aa6d0d3bb48571884479531248e6fa1c
print(base64.encode(
seedFeather.save())); //UE9MWVNFRUQWAP7QTFMwyWZ55hIVJOa7aluTxzP/Y3c=

var seedLoaded = Polyseed.load(
base64.decode("UE9MWVNFRUQWAP7QTFMwyWZ55hIVJOa7aluTxzP/Y3c="));
Expand Down

0 comments on commit 504d58a

Please sign in to comment.