Use x-global inside x-randomvalues (#1354)

* Use x-global inside x-randomvalues

* CHANGELOG
This commit is contained in:
Jaco
2022-01-04 11:05:03 +02:00
committed by GitHub
parent 6fa855b6fc
commit e38562e8dc
3 changed files with 15 additions and 5 deletions
+7 -3
View File
@@ -55,11 +55,15 @@
log('polkadotKeyring');
const { Keyring } = polkadotKeyring;
const { cryptoWaitReady } = polkadotUtilCrypto;
const keyring = new Keyring({ type: sr25519 });
const alice = keyring.addFromUri('//Alice');
cryptoWaitReady().then(() => {
const keyring = new Keyring({ type: 'sr25519' });
const alice = keyring.addFromUri('//Alice');
log('alice.address', alice.address);
log('alice.address', alice.address);
log('signature', u8aToHex(alice.sign('hello world')));
});
</script>
</body>
</html>