-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
42 lines (34 loc) · 1.2 KB
/
index.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<!-- <script src="http://unpkg.com/jmes/dist/jmes.min.js" />-->
<script src="./dist/jmes.min.js"></script>
<script>
const Client = jmes.Client;
const Mnemonic = jmes.Mnemonic;
const client = new Client();
const mnemonic = new Mnemonic(
"shrimp various silver merge kidney kitten winter pluck smooth kidney enemy bulb script plug private margin leader repair enact clever duck woman luxury muscle"
);
window.sendTransaction = async () => {
const wallet = await client.createWallet(mnemonic, "http://87.98.243.34:1888") ;
const account = await wallet.getAccount();
console.log('account', account);
const res = await account.sendTransaction(
{
recipientAddress: "jmes1jg4hs0qnytzl873zme2hp378na64z2e75v8xn7",
recipientAmount: 200,
},
"http://87.98.243.34:1888"
);
console.log({ res });
return res;
};
// sendTransaction();
</script>
</head>
<body>
</body>
</html>