Skip to content

Commit

Permalink
build: 📦 update to latest dashhive libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
jojobyte committed Jul 24, 2024
1 parent 143d49b commit 8cacdd1
Show file tree
Hide file tree
Showing 7 changed files with 184 additions and 264 deletions.
38 changes: 28 additions & 10 deletions imports.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
// @ts-nocheck

import './secp.js';

import './node_modules/@dashincubator/base58check/base58check.js';
import './node_modules/@dashincubator/ripemd160/ripemd160.js';
import './node_modules/dashkeys/dashkeys.js';
import './node_modules/dashhd/dashhd.js';
import './node_modules/dashtx/dashtx.js';
import './node_modules/dashphrase/dashphrase.js';
import './node_modules/dashsight/dashsight.js';
import './node_modules/dashsight/dashsocket.js';
import './node_modules/crowdnode/dashcore-lit.js';
import './node_modules/crowdnode/dashapi.js';
import './node_modules/crowdnode/crowdnode.js';
import './node_modules/@dashincubator/secp256k1/secp256k1.js';
import './node_modules/@dashincubator/base58check/base58check.js';
import './node_modules/crypticstorage/crypticstorage.js'
import './node_modules/crypticstorage/cryptic.js';
import './node_modules/crypticstorage/storage.js';
// import './node_modules/qrcode-svg/dist/qrcode.min.js';

import * as DashKeysTypes from './node_modules/dashkeys/dashkeys.js';
import * as DashTxTypes from './node_modules/dashtx/dashtx.js';
import * as DashHDTypes from './node_modules/dashhd/dashhd.js';
import * as DashKeysTypes from './node_modules/dashkeys/dashkeys.js';
import * as DashPhraseTypes from './node_modules/dashphrase/dashphrase.js';
import * as DashSightTypes from './node_modules/dashsight/dashsight.js';
import * as DashSocketTypes from './node_modules/dashsight/dashsocket.js';
import * as DashCoreTypes from './node_modules/crowdnode/dashcore-lit.js';
import * as DashApiTypes from './node_modules/crowdnode/dashapi.js';
import * as CrowdNodeTypes from './node_modules/crowdnode/crowdnode.js';
import * as Secp256k1Types from './node_modules/@dashincubator/secp256k1/secp256k1.js'
import * as Base58CheckTypes from './node_modules/@dashincubator/base58check/base58check.js'
import * as RIPEMD160Types from './node_modules/@dashincubator/ripemd160/ripemd160.js'
import * as CrypticStorageTypes from './node_modules/crypticstorage/crypticstorage.js'
import * as Base58CheckTypes from './node_modules/@dashincubator/base58check/base58check.js'
import * as CrypticTypes from '../node_modules/crypticstorage/cryptic.js';
import * as CrypticStorageTypes from '../node_modules/crypticstorage/storage.js';
// import * as QRCodeTypes from './node_modules/qrcode-svg/dist/qrcode.min.js'

/** @type {DashTxTypes} */
export let DashTx = window?.DashTx || globalThis?.DashTx;
/** @type {DashKeysTypes} */
export let DashKeys = window?.DashKeys || globalThis?.DashKeys
/** @type {DashHDTypes} */
Expand All @@ -35,32 +44,41 @@ export let DashPhrase = window?.DashPhrase || globalThis?.DashPhrase
export let DashSight = window?.DashSight || globalThis?.DashSight
/** @type {DashSocketTypes} */
export let DashSocket = window?.DashSocket || globalThis?.DashSocket
/** @type {DashCoreTypes} */
export let DashCore = window?.DashCore || globalThis?.DashCore
/** @type {DashApiTypes} */
export let DashApi = window?.DashApi || globalThis?.DashApi
/** @type {CrowdNodeTypes} */
export let CrowdNode = window?.CrowdNode || globalThis?.CrowdNode
/** @type {Secp256k1Types} */
export let Secp256k1 = window?.nobleSecp256k1 || globalThis?.nobleSecp256k1
/** @type {Base58CheckTypes} */
export let Base58Check = window?.Base58Check || globalThis?.Base58Check
/** @type {RIPEMD160Types} */
export let RIPEMD160 = window?.RIPEMD160 || globalThis?.RIPEMD160
/** @type {CrypticTypes} */
export let Cryptic =
window?.Cryptic || globalThis?.Cryptic;
/** @type {CrypticStorageTypes} */
export let CrypticStorage = window?.CrypticStorage || globalThis?.CrypticStorage;
export let CrypticStorage =
window?.CrypticStorage || globalThis?.CrypticStorage;
// /** @type {QRCodeTypes} */
// export let QRCode = QRCodeTypes || window?.QRCode || globalThis?.QRCode

export let Secp256k1 = window?.nobleSecp256k1 || globalThis?.nobleSecp256k1 || window?.Secp256k1 || globalThis?.Secp256k1

export default {
DashTx,
DashHd,
DashPhrase,
DashKeys,
DashSight,
DashSocket,
DashCore,
DashApi,
CrowdNode,
Secp256k1,
Base58Check,
RIPEMD160,
Cryptic,
CrypticStorage,
// QRCode,
}
23 changes: 15 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -295,18 +295,25 @@ <h5>Checkout the <a target="_blank" href="https://github.com/dashhive/crowdnode-
}
})('nav a.theme')

if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register(`sw.js`)
.then(function () {
console.log("Service Worker Registered");
});
}
// if ('serviceWorker' in navigator) {
// navigator.serviceWorker
// .register(`sw.js`)
// .then(function () {
// console.log("Service Worker Registered");
// });
// }
</script>
<script src="./node_modules/@dashevo/dashcore-lib/dist/dashcore-lib.min.js"></script>
<!-- <script src="./node_modules/@dashevo/dashcore-lib/dist/dashcore-lib.min.js"></script> -->
<script src="./node_modules/@root/request/urequest.js"></script>
<script src="./node_modules/qrcode-svg/dist/qrcode.min.js"></script>
<!-- <script src="./pwa-install.js"></script> -->
<script type="importmap">
{
"imports": {
"crypto": "./webcrypto.js"
}
}
</script>
<script src="./main.js" type="module" async defer></script>
</body>
</html>
Loading

0 comments on commit 8cacdd1

Please sign in to comment.