launchpad-ledger: Add demo html/css

This commit is contained in:
willclarktech
2020-09-15 10:47:01 +02:00
parent 33a7824215
commit 59c5ae5c8b
2 changed files with 78 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
div {
display: flex;
align-items: center;
justify-content: center;
margin: auto;
padding: 0.5em;
}
button {
padding: 1em;
}
label {
margin-right: 1em;
}
input {
width: 32em;
}
textarea {
width: 32em;
height: 14em;
}
@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ledger Demo</title>
<link rel="stylesheet" href="ledger-demo.css"></style>
<script src="dist/demo/ledger.js"></script>
</head>
<body>
<div>
<h1>Ledger Demo</h1>
</div>
<div>
<ol>
<li>Connect the Ledger device via USB</li>
<li>Open the Cosmos app on the Ledger device</li>
<li>Click the buttons below</li>
</ol>
</div>
<div>
<button onclick="getAccounts()">
Get Accounts
</button>
</div>
<div id="accounts"></div>
<div>
<label>Address</label>
<input id="address" type="text" value=""></input>
</div>
<div>
<label>Message</label>
<textarea id="message">
{
"account_number": 0,
"chain_id": "testing",
"fee": {
"amount": [{ "amount": 100, "denom": "ucosm" }],
"gas": 250
},
"memo": "Some memo",
"msgs": [],
"sequence": 0
}
</textarea>
</div>
<div>
<button onclick="sign()">
Sign Message
</button>
</div>
<div id="signature"></div>
</body>
</html>