Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglescode committed Feb 21, 2025
1 parent fbbde0f commit 1b7a621
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion apps/playground/src/data/links-aiken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const linksAiken: MenuItem[] = [
metaAikenFirstScript,
metaAikenTransactions,
metaAikenContractsLib,
metaAikenCourse,
// metaAikenCourse,
];

export const metaAiken: MenuItem = {
Expand Down
38 changes: 26 additions & 12 deletions apps/playground/src/pages/apis/wallets/meshwallet/load-wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,20 @@ function Left(
with the <code>address</code> type:
</p>
<Codeblock data={code5} />

<h3>Initialize wallet</h3>
<p>
After creating the wallet, we need to initialize it. This will
initialize the cryptography library.
</p>
<Codeblock data={`await wallet.init()`} />

<p>
With the <code>wallet</code> loaded, you can sign transactions, we will
see how to do this in the next section, for now lets get the wallet's
address:
</p>
<Codeblock data={code2} />
</>
);
}
Expand Down Expand Up @@ -240,11 +254,11 @@ function Right(
words: _mnemonic,
},
});
// await _wallet.init();
await _wallet.init();
setWallet(_wallet);

const addresses = _wallet.getAddresses();
setResponseAddress(JSON.stringify(addresses, null, 2));
const changeAddress = await _wallet.getChangeAddress();
setResponseAddress(changeAddress);
}
} catch (error) {
setResponseError(`${error}`);
Expand All @@ -261,11 +275,11 @@ function Right(
bech32: privatekey,
},
});
// await _wallet.init();
await _wallet.init();
setWallet(_wallet);

const addresses = _wallet.getAddresses();
setResponseAddress(JSON.stringify(addresses, null, 2));
const changeAddress = await _wallet.getChangeAddress();
setResponseAddress(changeAddress);
} catch (error) {
setResponseError(`${error}`);
}
Expand All @@ -283,11 +297,11 @@ function Right(
stake,
},
});
// await _wallet.init();
await _wallet.init();
setWallet(_wallet);

const addresses = _wallet.getAddresses();
setResponseAddress(JSON.stringify(addresses, null, 2));
const changeAddress = await _wallet.getChangeAddress();
setResponseAddress(changeAddress);
} catch (error) {
setResponseError(`${error}`);
}
Expand All @@ -303,11 +317,11 @@ function Right(
address: walletAddress,
},
});
// await _wallet.init();
await _wallet.init();
setWallet(_wallet);

const addresses = _wallet.getAddresses();
setResponseAddress(JSON.stringify(addresses, null, 2));
const changeAddress = await _wallet.getChangeAddress();
setResponseAddress(changeAddress);
} catch (error) {
setResponseError(`${error}`);
}
Expand Down

0 comments on commit 1b7a621

Please sign in to comment.