Adjust bundle builds (crypto now working) (#1055)

This commit is contained in:
Jaco
2021-07-09 09:59:16 +02:00
committed by GitHub
parent 81811510f4
commit 4a9f0326e7
19 changed files with 213 additions and 237 deletions
+44
View File
@@ -0,0 +1,44 @@
<!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>