45 lines
1.5 KiB
HTML
45 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title></title>
|
|
<style></style>
|
|
</head>
|
|
<body>
|
|
Executing bundle tests, see the dev console for output ...
|
|
<script>
|
|
function log (label, result) {
|
|
label.startsWith('*')
|
|
? console.log(label)
|
|
: console.log(label.padStart(24), '=', result);
|
|
}
|
|
</script>
|
|
<script src="packages/util/build/bundle-polkadot-util.js"></script>
|
|
<script>
|
|
log('*** polkadotUtil');
|
|
log('u8aToHex', polkadotUtil.u8aToHex(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8])));
|
|
log('bnToBn', polkadotUtil.bnToBn(123).addn(1).toString());
|
|
</script>
|
|
<script src="packages/networks/build/bundle-polkadot-networks.js"></script>
|
|
<script>
|
|
log('*** polkadotNetworks');
|
|
log('available', polkadotNetworks.available.map(({ displayName }) => displayName).join('; '));
|
|
</script>
|
|
<script src="packages/util-crypto/build/bundle-polkadot-util-crypto.js"></script>
|
|
<script>
|
|
log('*** polkadotUtilCrypto');
|
|
log('blake2AsHex', polkadotUtilCrypto.blake2AsHex(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8])));
|
|
log('blake2AsHex (js)', polkadotUtilCrypto.blake2AsHex(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]), 256, null, true));
|
|
</script>
|
|
<script src="packages/keyring/build/bundle-polkadot-keyring.js"></script>
|
|
<script>
|
|
log('*** polkadotKeyring');
|
|
|
|
const keyring = new polkadotKeyring.Keyring();
|
|
const alice = keyring.addFromUri('//Alice');
|
|
|
|
log('alice.address', alice.address);
|
|
</script>
|
|
</body>
|
|
</html>
|