-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest.html
28 lines (25 loc) · 959 Bytes
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/keystore_wdc@0.4.20-beta/contract-dist/bundle.js"></script>
<script src="./local/coin.abi.js"></script>
<script>
window.onload = function () {
const t = keystore_wdc_contract
console.log(t.BN)
const sk = 'f0d55ae8a79186e8595514fe23dec8716a191d2bb525998298371693dc69a926'
const addr = t.publicKeyHash2Address(t.publicKey2Hash(t.privateKey2PublicKey(sk)))
console.log(addr)
// const rpc = new t.RPC('8.210.39.91', 19585)
// const c = new t.Contract('1HnbSn23tVpa1dcchnSrzsTd7aCzaSC2NY', coinABI)
// rpc.viewContract(c, 'balanceOf', addr)
// .then(console.log)
}
</script>
</body>
</html>