Skip to content

Commit

Permalink
worker build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Jun 28, 2023
1 parent b027b9a commit a3920ee
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { HDWallet } from '@xyo-network/account'
import { generateMnemonic, wordlists } from '@xyo-network/bip39'
import { Logger } from '@xyo-network/core'
import { ManifestPayload, ManifestWrapper } from '@xyo-network/manifest'
import { NodeModule } from '@xyo-network/node'
Expand All @@ -20,7 +22,8 @@ export class WorkerNodeHost {
constructor(protected node: NodeModule, protected logger?: Logger) {}

static async create(config: ManifestPayload) {
const manifest = new ManifestWrapper(config)
const mnemonic = generateMnemonic(wordlists.english, 256)
const manifest = new ManifestWrapper(config, await HDWallet.fromMnemonic(mnemonic))
const [node] = await manifest.loadDapps()
const worker = new this(node)
worker.attachNode(node)
Expand Down
90 changes: 52 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ __metadata:
version: 6
cacheKey: 8

"@aashutoshrathi/word-wrap@npm:^1.2.3":
version: 1.2.6
resolution: "@aashutoshrathi/word-wrap@npm:1.2.6"
checksum: ada901b9e7c680d190f1d012c84217ce0063d8f5c5a7725bb91ec3c5ed99bb7572680eb2d2938a531ccbaec39a95422fcd8a6b4a13110c7d98dd75402f66a0cd
languageName: node
linkType: hard

"@ampproject/remapping@npm:^2.2.0":
version: 2.2.1
resolution: "@ampproject/remapping@npm:2.2.1"
Expand Down Expand Up @@ -4919,7 +4926,21 @@ __metadata:
languageName: node
linkType: hard

"@uniswap/sdk-core@npm:^3.0.1, @uniswap/sdk-core@npm:^3.2.6":
"@uniswap/sdk-core@npm:^3.0.1":
version: 3.2.3
resolution: "@uniswap/sdk-core@npm:3.2.3"
dependencies:
"@ethersproject/address": ^5.0.2
big.js: ^5.2.2
decimal.js-light: ^2.5.0
jsbi: ^3.1.4
tiny-invariant: ^1.1.0
toformat: ^2.0.0
checksum: a19367c7e1d7b391b1664f59b808836cbaed9a12880bdf6b9a31e6c3b63f2edce2966bdda65144a3003e4c3cd96085b86129c174971330a9766194c404263346
languageName: node
linkType: hard

"@uniswap/sdk-core@npm:^3.2.6":
version: 3.2.6
resolution: "@uniswap/sdk-core@npm:3.2.6"
dependencies:
Expand Down Expand Up @@ -10135,9 +10156,9 @@ __metadata:
linkType: hard

"caniuse-lite@npm:^1.0.30001503":
version: 1.0.30001508
resolution: "caniuse-lite@npm:1.0.30001508"
checksum: 0a083ed92194d87e608fc35cac65830a27900249729eb8a68e270f866f2c4f83396c2e54eb47b0ef71360682174dd74e2e68eac0b8d407d125611c7bc12488eb
version: 1.0.30001509
resolution: "caniuse-lite@npm:1.0.30001509"
checksum: b08a98bf884182741d015569173162e5dfb804da22a14cb18c052be6b5f04e32312ff849b31f787b85091d1b1dfd58b128d9878c96e3bb632a1a0a8761548407
languageName: node
linkType: hard

Expand Down Expand Up @@ -11446,9 +11467,9 @@ __metadata:
linkType: hard

"electron-to-chromium@npm:^1.4.431":
version: 1.4.441
resolution: "electron-to-chromium@npm:1.4.441"
checksum: 807a3659daf9ac376c3b7a2d19965e186a8c8a4b2498a911c96bc80f43701ec6e9268c382b4e3155ce0def4c9e35071de6a0506dd69b822bd9592ad8de71bc91
version: 1.4.442
resolution: "electron-to-chromium@npm:1.4.442"
checksum: 2905d01dc9b888ec2b3687801d130e868e951052d856727843e1ed22377e7887d472fd67854392c3944ea329865581a634e1e32e9c077dac63e1542fbc9847d2
languageName: node
linkType: hard

Expand Down Expand Up @@ -13213,17 +13234,17 @@ __metadata:
linkType: hard

"glob@npm:^10.2.2, glob@npm:^10.2.5, glob@npm:^10.2.7":
version: 10.3.0
resolution: "glob@npm:10.3.0"
version: 10.3.1
resolution: "glob@npm:10.3.1"
dependencies:
foreground-child: ^3.1.0
jackspeak: ^2.0.3
minimatch: ^9.0.1
minipass: ^5.0.0 || ^6.0.2
path-scurry: ^1.7.0
path-scurry: ^1.10.0
bin:
glob: dist/cjs/src/bin.js
checksum: 6fa4ac0a86ffec1c5715a2e6fbdd63e1e7f1c2c8f5db08cc3256cdfcb81093678e7c80a3d100b502a1b9d141369ecf87bc24fe2bcb72acec7b14626d358a4eb0
checksum: 19c8c2805658b1002fecf0722cd609a33153d756a0d5260676bd0e9c5e6ef889ec9cce6d3dac0411aa90bce8de3d14f25b6f5589a3292582cccbfeddd0e98cc4
languageName: node
linkType: hard

Expand Down Expand Up @@ -16141,7 +16162,7 @@ __metadata:
languageName: node
linkType: hard

"lru-cache@npm:^10.0.0":
"lru-cache@npm:^10.0.0, lru-cache@npm:^9.1.1 || ^10.0.0":
version: 10.0.0
resolution: "lru-cache@npm:10.0.0"
checksum: 18f101675fe283bc09cda0ef1e3cc83781aeb8373b439f086f758d1d91b28730950db785999cd060d3c825a8571c03073e8c14512b6655af2188d623031baf50
Expand Down Expand Up @@ -16173,13 +16194,6 @@ __metadata:
languageName: node
linkType: hard

"lru-cache@npm:^9.1.1":
version: 9.1.2
resolution: "lru-cache@npm:9.1.2"
checksum: d3415634be3908909081fc4c56371a8d562d9081eba70543d86871b978702fffd0e9e362b83921b27a29ae2b37b90f55675aad770a54ac83bb3e4de5049d4b15
languageName: node
linkType: hard

"lru-cache@npm:~2.2.1":
version: 2.2.4
resolution: "lru-cache@npm:2.2.4"
Expand Down Expand Up @@ -18125,16 +18139,16 @@ __metadata:
linkType: hard

"optionator@npm:^0.9.1":
version: 0.9.1
resolution: "optionator@npm:0.9.1"
version: 0.9.3
resolution: "optionator@npm:0.9.3"
dependencies:
"@aashutoshrathi/word-wrap": ^1.2.3
deep-is: ^0.1.3
fast-levenshtein: ^2.0.6
levn: ^0.4.1
prelude-ls: ^1.2.1
type-check: ^0.4.0
word-wrap: ^1.2.3
checksum: dbc6fa065604b24ea57d734261914e697bd73b69eff7f18e967e8912aa2a40a19a9f599a507fa805be6c13c24c4eae8c71306c239d517d42d4c041c942f508a0
checksum: 09281999441f2fe9c33a5eeab76700795365a061563d66b098923eb719251a42bdbe432790d35064d0816ead9296dbeb1ad51a733edf4167c96bd5d0882e428a
languageName: node
linkType: hard

Expand Down Expand Up @@ -18632,13 +18646,13 @@ __metadata:
languageName: node
linkType: hard

"path-scurry@npm:^1.6.1, path-scurry@npm:^1.7.0":
version: 1.9.2
resolution: "path-scurry@npm:1.9.2"
"path-scurry@npm:^1.10.0, path-scurry@npm:^1.6.1":
version: 1.10.0
resolution: "path-scurry@npm:1.10.0"
dependencies:
lru-cache: ^9.1.1
lru-cache: ^9.1.1 || ^10.0.0
minipass: ^5.0.0 || ^6.0.2
checksum: 92888dfb68e285043c6d3291c8e971d5d2bc2f5082f4d7b5392896f34be47024c9d0a8b688dd7ae6d125acc424699195474927cb4f00049a9b1ec7c4256fa8e0
checksum: 3b66a4a6ab66e45755b577c966ecf0da92d3e068b3c992d8f69aa2cc908ef4eda9358253e9b4f86cad43d3ad810ec445be164105975f5cb3fdab68459c59dc6e
languageName: node
linkType: hard

Expand Down Expand Up @@ -22216,9 +22230,9 @@ __metadata:
linkType: hard

"supports-color@npm:^9.3.1":
version: 9.3.1
resolution: "supports-color@npm:9.3.1"
checksum: 00c4d1082a7ba0ee21cba1d4e4a466642635412e40476777b530aa5110d035e99a420cd048e1fb6811f2254c0946095fbb87a1eccf1af1d1ca45ab0a4535db93
version: 9.4.0
resolution: "supports-color@npm:9.4.0"
checksum: cb8ff8daeaf1db642156f69a9aa545b6c01dd9c4def4f90a49f46cbf24be0c245d392fcf37acd119cd1819b99dad2cc9b7e3260813f64bcfd7f5b18b5a1eefb8
languageName: node
linkType: hard

Expand Down Expand Up @@ -22975,22 +22989,22 @@ __metadata:
linkType: hard

"typescript@npm:^5.1.3":
version: 5.1.3
resolution: "typescript@npm:5.1.3"
version: 5.1.5
resolution: "typescript@npm:5.1.5"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: d9d51862d98efa46534f2800a1071a613751b1585dc78884807d0c179bcd93d6e9d4012a508e276742f5f33c480adefc52ffcafaf9e0e00ab641a14cde9a31c7
checksum: 0eef8699e05ae767096924dbed633c340b4d36e953bb8ed87fb12e9dd9dcea5055ceac7182c614a556dbd346a8a82df799d330e1e286ae66e17c84e1710f6a6f
languageName: node
linkType: hard

"typescript@patch:typescript@^5.1.3#~builtin<compat/typescript>":
version: 5.1.3
resolution: "typescript@patch:typescript@npm%3A5.1.3#~builtin<compat/typescript>::version=5.1.3&hash=77c9e2"
version: 5.1.5
resolution: "typescript@patch:typescript@npm%3A5.1.5#~builtin<compat/typescript>::version=5.1.5&hash=77c9e2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 32a25b2e128a4616f999d4ee502aabb1525d5647bc8955e6edf05d7fbc53af8aa98252e2f6ba80bcedfc0260c982b885f3c09cfac8bb65d2924f3133ad1e1e62
checksum: 33020c886b1aa2e948b557aad4986cf6448b30c58915b12cac873bd35dc2260d93f71af8a661d2c9f352b5d099d9df13a59688e222e79276099b9c5d86d847be
languageName: node
linkType: hard

Expand Down Expand Up @@ -23988,7 +24002,7 @@ __metadata:
languageName: node
linkType: hard

"word-wrap@npm:^1.2.3, word-wrap@npm:~1.2.3":
"word-wrap@npm:~1.2.3":
version: 1.2.3
resolution: "word-wrap@npm:1.2.3"
checksum: 30b48f91fcf12106ed3186ae4fa86a6a1842416df425be7b60485de14bec665a54a68e4b5156647dec3a70f25e84d270ca8bc8cd23182ed095f5c7206a938c1f
Expand Down

0 comments on commit a3920ee

Please sign in to comment.