solana/web3.js/examples/account.html

25 lines
610 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Create a new account</title>
</head>
<body>
<b>Account Public Key:</b>
<div id="accountPublicKey">?</div>
<script src="../lib/index.iife.js"></script>
<!--
<script src="https://github.com/solana-labs/solana-web3.js/releases/download/v0.11.10/solanaWeb3.min.js"></script>
-->
<script>
// Create a new account
const account = new solanaWeb3.Account();
// Display the account's public key
const accountPublicKey = document.getElementById('accountPublicKey');
accountPublicKey.innerHTML = account.publicKey;
</script>
</body>
</html>