Spaces:
Running
Running
add this
Browse filesimport { Xumm } from '../dist/index.js';
console.log('MJS version');
const xumm1 = new Xumm('apikey', 'apisecret');
console.log('ping', await xumm1.ping())
const xumm2 = new Xumm('somejwt');
console.log('account', await xumm2.user?.account);
console.log('jwt', await xumm2.environment.jwt)
console.log('ping', await xumm2.ping())
- cubes.html +1 -0
- index.html +1 -0
- xumm.html +2 -2
- xumm2.html +2 -2
- xumm3.html +27 -0
cubes.html
CHANGED
|
@@ -88,6 +88,7 @@ tailwind.config = {
|
|
| 88 |
<a href="cubes.html" class="bg-gray-800 text-white px-3 py-2 rounded-md text-sm font-medium">Cubes</a>
|
| 89 |
<a href="xumm.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet</a>
|
| 90 |
<a href="xumm2.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet 2</a>
|
|
|
|
| 91 |
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Profile</a>
|
| 92 |
</div>
|
| 93 |
</div>
|
|
|
|
| 88 |
<a href="cubes.html" class="bg-gray-800 text-white px-3 py-2 rounded-md text-sm font-medium">Cubes</a>
|
| 89 |
<a href="xumm.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet</a>
|
| 90 |
<a href="xumm2.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet 2</a>
|
| 91 |
+
<a href="xumm3.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet 3</a>
|
| 92 |
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Profile</a>
|
| 93 |
</div>
|
| 94 |
</div>
|
index.html
CHANGED
|
@@ -57,6 +57,7 @@
|
|
| 57 |
<a href="cubes.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Cubes</a>
|
| 58 |
<a href="xumm.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet</a>
|
| 59 |
<a href="xumm2.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet 2</a>
|
|
|
|
| 60 |
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Profile</a>
|
| 61 |
</div>
|
| 62 |
</div>
|
|
|
|
| 57 |
<a href="cubes.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Cubes</a>
|
| 58 |
<a href="xumm.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet</a>
|
| 59 |
<a href="xumm2.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet 2</a>
|
| 60 |
+
<a href="xumm3.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Wallet 3</a>
|
| 61 |
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Profile</a>
|
| 62 |
</div>
|
| 63 |
</div>
|
xumm.html
CHANGED
|
@@ -14,8 +14,8 @@
|
|
| 14 |
<button id="signinbutton" class="btn btn-primary" onclick="xumm.authorize()">Login</button>
|
| 15 |
<button id="logoutbutton" class="btn btn-secondary" onclick="xumm.logout()">Logout</button>
|
| 16 |
<button id="payloadbutton" class="btn btn-success">Payload</button>
|
| 17 |
-
|
| 18 |
-
|
| 19 |
<h3>Profile</h3>
|
| 20 |
<pre id="profile" class="bg-light p-3 rounded"></pre>
|
| 21 |
</div>
|
|
|
|
| 14 |
<button id="signinbutton" class="btn btn-primary" onclick="xumm.authorize()">Login</button>
|
| 15 |
<button id="logoutbutton" class="btn btn-secondary" onclick="xumm.logout()">Logout</button>
|
| 16 |
<button id="payloadbutton" class="btn btn-success">Payload</button>
|
| 17 |
+
<a href="xumm3.html" class="btn btn-info">Wallet 3</a>
|
| 18 |
+
<div class="mt-4">
|
| 19 |
<h3>Profile</h3>
|
| 20 |
<pre id="profile" class="bg-light p-3 rounded"></pre>
|
| 21 |
</div>
|
xumm2.html
CHANGED
|
@@ -30,8 +30,8 @@
|
|
| 30 |
<button id="signinbutton" class="btn btn-primary" onclick="xumm.authorize()">Login</button>
|
| 31 |
<button id="logoutbutton" class="btn btn-secondary" onclick="xumm.logout()">Logout</button>
|
| 32 |
<button id="payloadbutton" class="btn btn-success">Payload</button>
|
| 33 |
-
|
| 34 |
-
|
| 35 |
<h3>Profile</h3>
|
| 36 |
<pre id="profile" class="bg-light p-3 rounded"></pre>
|
| 37 |
</div>
|
|
|
|
| 30 |
<button id="signinbutton" class="btn btn-primary" onclick="xumm.authorize()">Login</button>
|
| 31 |
<button id="logoutbutton" class="btn btn-secondary" onclick="xumm.logout()">Logout</button>
|
| 32 |
<button id="payloadbutton" class="btn btn-success">Payload</button>
|
| 33 |
+
<a href="xumm3.html" class="btn btn-info">Wallet 3</a>
|
| 34 |
+
<div class="mt-4">
|
| 35 |
<h3>Profile</h3>
|
| 36 |
<pre id="profile" class="bg-light p-3 rounded"></pre>
|
| 37 |
</div>
|
xumm3.html
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Xumm API Test</title>
|
| 7 |
+
<script type="module">
|
| 8 |
+
import { Xumm } from '../dist/index.js';
|
| 9 |
+
|
| 10 |
+
console.log('MJS version');
|
| 11 |
+
|
| 12 |
+
document.addEventListener('DOMContentLoaded', async () => {
|
| 13 |
+
const xumm1 = new Xumm('apikey', 'apisecret');
|
| 14 |
+
console.log('ping', await xumm1.ping())
|
| 15 |
+
|
| 16 |
+
const xumm2 = new Xumm('somejwt');
|
| 17 |
+
console.log('account', await xumm2.user?.account);
|
| 18 |
+
console.log('jwt', await xumm2.environment.jwt)
|
| 19 |
+
console.log('ping', await xumm2.ping())
|
| 20 |
+
});
|
| 21 |
+
</script>
|
| 22 |
+
</head>
|
| 23 |
+
<body>
|
| 24 |
+
<h1>Xumm API Test</h1>
|
| 25 |
+
<p>Check browser console for output</p>
|
| 26 |
+
</body>
|
| 27 |
+
</html>
|