@continuumdao/ctm-mpc-defi 0.2.58 → 0.2.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
var viem = require('viem');
|
|
4
4
|
var continuumNodeSdk = require('@continuumdao/continuum-node-sdk');
|
|
5
5
|
var sharedModels = require('@railgun-community/shared-models');
|
|
6
|
-
var module$1 = require('module');
|
|
7
|
-
var path = require('path');
|
|
8
6
|
|
|
9
7
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
10
8
|
// src/core/registry.ts
|
|
@@ -544,7 +542,8 @@ async function buildEvmMultisignBatch(args) {
|
|
|
544
542
|
}
|
|
545
543
|
return result;
|
|
546
544
|
}
|
|
547
|
-
|
|
545
|
+
|
|
546
|
+
// src/protocols/evm/railgun/engine.ts
|
|
548
547
|
var artifacts = /* @__PURE__ */ new Map();
|
|
549
548
|
var started = false;
|
|
550
549
|
var loadedProviders = /* @__PURE__ */ new Set();
|
|
@@ -581,17 +580,26 @@ var artifactStore = {
|
|
|
581
580
|
return artifacts.has(path);
|
|
582
581
|
}
|
|
583
582
|
};
|
|
584
|
-
async function
|
|
585
|
-
if (
|
|
586
|
-
|
|
583
|
+
async function attachEngineErrorLogger() {
|
|
584
|
+
if (typeof window !== "undefined") return;
|
|
585
|
+
if (typeof process === "undefined" || !process.versions?.node) return;
|
|
586
|
+
const load = new Function("id", "return import(id)");
|
|
587
|
+
const nodeModule = await load("node:module");
|
|
588
|
+
const nodePath = await load("node:path");
|
|
589
|
+
const require2 = nodeModule.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
587
590
|
const walletEntry = require2.resolve("@railgun-community/wallet");
|
|
588
|
-
const { setLoggers } = require2(
|
|
591
|
+
const { setLoggers } = require2(nodePath.join(nodePath.dirname(walletEntry), "utils/logger.js"));
|
|
589
592
|
setLoggers(
|
|
590
593
|
() => void 0,
|
|
591
594
|
(err) => {
|
|
592
595
|
lastEngineError = errorChain(err);
|
|
593
596
|
}
|
|
594
597
|
);
|
|
598
|
+
}
|
|
599
|
+
async function ensureRailgunEngine() {
|
|
600
|
+
if (started) return;
|
|
601
|
+
const wallet = await walletModule();
|
|
602
|
+
await attachEngineErrorLogger();
|
|
595
603
|
const memdown = (await import('memdown')).default;
|
|
596
604
|
const store = new wallet.ArtifactStore(
|
|
597
605
|
(path) => artifactStore.get(path),
|