@xyo-network/os-runtime 7.2.1 → 7.3.0
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.
- package/dist/neutral/Caller.d.ts.map +1 -1
- package/dist/neutral/DappCallerBase.d.ts +2 -2
- package/dist/neutral/OsCallerBase.d.ts +2 -2
- package/dist/neutral/RunningDappCache.d.ts.map +1 -1
- package/dist/neutral/XyOs.d.ts +4 -5
- package/dist/neutral/XyOs.d.ts.map +1 -1
- package/dist/neutral/XyOsBase.d.ts +122 -3
- package/dist/neutral/XyOsBase.d.ts.map +1 -1
- package/dist/neutral/XyOsDapp.d.ts +3 -3
- package/dist/neutral/XyOsDapp.d.ts.map +1 -1
- package/dist/neutral/access/Caller.d.ts +1 -1
- package/dist/neutral/access/Caller.d.ts.map +1 -1
- package/dist/neutral/access/RunningAccessDappCache.d.ts.map +1 -1
- package/dist/neutral/access/interfaces/registered-names/helpers/resource/AbstractXnsCaller.d.ts +1 -1
- package/dist/neutral/adapter/Base.d.ts.map +1 -1
- package/dist/neutral/classes/lib/DappCreatorParams.d.ts +3 -3
- package/dist/neutral/classes/lib/DappCreatorParams.d.ts.map +1 -1
- package/dist/neutral/classes/lib/Insertable.d.ts +1 -3
- package/dist/neutral/classes/lib/Insertable.d.ts.map +1 -1
- package/dist/neutral/classes/settings/CallerBase.d.ts +1 -1
- package/dist/neutral/classes/settings/SettingsQueries.d.ts.map +1 -1
- package/dist/neutral/dapp/context/creator/Creator.d.ts +1 -1
- package/dist/neutral/dapp/context/creator/Creator.d.ts.map +1 -1
- package/dist/neutral/dapp/context/creator/createDappContext.d.ts.map +1 -1
- package/dist/neutral/event/bus/EventBus.d.ts +1 -1
- package/dist/neutral/event/bus/EventBus.d.ts.map +1 -1
- package/dist/neutral/helpers/monitor/XyOsMonitor.d.ts +2 -2
- package/dist/neutral/helpers/monitor/XyOsMonitor.d.ts.map +1 -1
- package/dist/neutral/helpers/monitor/types.d.ts +2 -2
- package/dist/neutral/helpers/monitor/types.d.ts.map +1 -1
- package/dist/neutral/index.mjs +42 -36
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/lib/Listener.d.ts +1 -1
- package/dist/neutral/lib/Listener.d.ts.map +1 -1
- package/dist/neutral/loadOsNode.d.ts.map +1 -1
- package/dist/neutral/profileModuleEvents.d.ts +1 -3
- package/dist/neutral/profileModuleEvents.d.ts.map +1 -1
- package/dist/neutral/registration/DappRegistrationService.d.ts +3 -3
- package/dist/neutral/registration/DappRegistrationService.d.ts.map +1 -1
- package/dist/neutral/registration/DappRegistry.d.ts.map +1 -1
- package/dist/neutral/registration/ValidateDappAccessDiviner/Config.d.ts +1 -1
- package/dist/neutral/registration/ValidateDappAccessDiviner/Config.d.ts.map +1 -1
- package/dist/neutral/scripts/xyos/lib/headless.d.ts.map +1 -1
- package/dist/neutral/signer/Signers.d.ts.map +1 -1
- package/dist/neutral/stack/Manager.d.ts +2 -6
- package/dist/neutral/stack/Manager.d.ts.map +1 -1
- package/dist/neutral/system/ManageSystemDapps.d.ts +2 -2
- package/dist/neutral/system/ManageSystemDapps.d.ts.map +1 -1
- package/dist/node/Caller.d.ts.map +1 -1
- package/dist/node/DappCallerBase.d.ts +2 -2
- package/dist/node/OsCallerBase.d.ts +2 -2
- package/dist/node/RunningDappCache.d.ts.map +1 -1
- package/dist/node/XyOs.d.ts +4 -5
- package/dist/node/XyOs.d.ts.map +1 -1
- package/dist/node/XyOsBase.d.ts +122 -3
- package/dist/node/XyOsBase.d.ts.map +1 -1
- package/dist/node/XyOsDapp.d.ts +3 -3
- package/dist/node/XyOsDapp.d.ts.map +1 -1
- package/dist/node/access/Caller.d.ts +1 -1
- package/dist/node/access/Caller.d.ts.map +1 -1
- package/dist/node/access/RunningAccessDappCache.d.ts.map +1 -1
- package/dist/node/access/interfaces/registered-names/helpers/resource/AbstractXnsCaller.d.ts +1 -1
- package/dist/node/adapter/Base.d.ts.map +1 -1
- package/dist/node/classes/lib/DappCreatorParams.d.ts +3 -3
- package/dist/node/classes/lib/DappCreatorParams.d.ts.map +1 -1
- package/dist/node/classes/lib/Insertable.d.ts +1 -3
- package/dist/node/classes/lib/Insertable.d.ts.map +1 -1
- package/dist/node/classes/settings/CallerBase.d.ts +1 -1
- package/dist/node/classes/settings/SettingsQueries.d.ts.map +1 -1
- package/dist/node/dapp/context/creator/Creator.d.ts +1 -1
- package/dist/node/dapp/context/creator/Creator.d.ts.map +1 -1
- package/dist/node/dapp/context/creator/createDappContext.d.ts.map +1 -1
- package/dist/node/event/bus/EventBus.d.ts +1 -1
- package/dist/node/event/bus/EventBus.d.ts.map +1 -1
- package/dist/node/helpers/monitor/XyOsMonitor.d.ts +2 -2
- package/dist/node/helpers/monitor/XyOsMonitor.d.ts.map +1 -1
- package/dist/node/helpers/monitor/types.d.ts +2 -2
- package/dist/node/helpers/monitor/types.d.ts.map +1 -1
- package/dist/node/index.mjs +42 -36
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/lib/Listener.d.ts +1 -1
- package/dist/node/lib/Listener.d.ts.map +1 -1
- package/dist/node/loadOsNode.d.ts.map +1 -1
- package/dist/node/profileModuleEvents.d.ts +1 -3
- package/dist/node/profileModuleEvents.d.ts.map +1 -1
- package/dist/node/registration/DappRegistrationService.d.ts +3 -3
- package/dist/node/registration/DappRegistrationService.d.ts.map +1 -1
- package/dist/node/registration/DappRegistry.d.ts.map +1 -1
- package/dist/node/registration/ValidateDappAccessDiviner/Config.d.ts +1 -1
- package/dist/node/registration/ValidateDappAccessDiviner/Config.d.ts.map +1 -1
- package/dist/node/scripts/xyos/index.mjs +27 -24
- package/dist/node/scripts/xyos/index.mjs.map +1 -1
- package/dist/node/scripts/xyos/lib/headless.d.ts.map +1 -1
- package/dist/node/signer/Signers.d.ts.map +1 -1
- package/dist/node/stack/Manager.d.ts +2 -6
- package/dist/node/stack/Manager.d.ts.map +1 -1
- package/dist/node/system/ManageSystemDapps.d.ts +2 -2
- package/dist/node/system/ManageSystemDapps.d.ts.map +1 -1
- package/package.json +166 -49
- package/dist/neutral/signer/Signer.spec.d.ts +0 -2
- package/dist/neutral/signer/Signer.spec.d.ts.map +0 -1
- package/dist/neutral/spec/boot.spec.d.ts +0 -2
- package/dist/neutral/spec/boot.spec.d.ts.map +0 -1
- package/dist/node/signer/Signer.spec.d.ts +0 -2
- package/dist/node/signer/Signer.spec.d.ts.map +0 -1
- package/dist/node/spec/boot.spec.d.ts +0 -2
- package/dist/node/spec/boot.spec.d.ts.map +0 -1
- package/src/Caller.ts +0 -200
- package/src/DappCallerBase.ts +0 -55
- package/src/DefaultsQueries.ts +0 -27
- package/src/OsCallerBase.ts +0 -59
- package/src/PubSubBridgeCaller.ts +0 -33
- package/src/RunningDappCache.ts +0 -58
- package/src/XyOs.ts +0 -166
- package/src/XyOsBase.ts +0 -135
- package/src/XyOsDapp.ts +0 -106
- package/src/access/Caller.ts +0 -85
- package/src/access/Queries.ts +0 -38
- package/src/access/Resource.ts +0 -65
- package/src/access/RunningAccessDappCache.ts +0 -21
- package/src/access/index.ts +0 -4
- package/src/access/interfaces/index.ts +0 -1
- package/src/access/interfaces/registered-names/helpers/AccessNodeQueries.ts +0 -68
- package/src/access/interfaces/registered-names/helpers/index.ts +0 -2
- package/src/access/interfaces/registered-names/helpers/resource/AbstractXnsCaller.ts +0 -42
- package/src/access/interfaces/registered-names/helpers/resource/RegistrationsResource.ts +0 -52
- package/src/access/interfaces/registered-names/helpers/resource/RegistrationsResourceQueries.ts +0 -23
- package/src/access/interfaces/registered-names/helpers/resource/index.ts +0 -3
- package/src/access/interfaces/registered-names/index.ts +0 -1
- package/src/adapter/Base.ts +0 -106
- package/src/adapter/Network.ts +0 -31
- package/src/adapter/Settings.ts +0 -30
- package/src/adapter/index.ts +0 -2
- package/src/adapters/OsPubSubBridgeNetwork.ts +0 -10
- package/src/adapters/OsSettings.ts +0 -7
- package/src/adapters/OsXyoPublicNetwork.ts +0 -9
- package/src/adapters/index.ts +0 -3
- package/src/classes/dapp/DefaultsResource.ts +0 -67
- package/src/classes/dapp/index.ts +0 -1
- package/src/classes/index.ts +0 -4
- package/src/classes/lib/DappCreatorParams.ts +0 -18
- package/src/classes/lib/Insertable.ts +0 -10
- package/src/classes/lib/index.ts +0 -2
- package/src/classes/menu/Caller.ts +0 -76
- package/src/classes/menu/Queries.ts +0 -60
- package/src/classes/menu/Resource.ts +0 -105
- package/src/classes/menu/index.ts +0 -2
- package/src/classes/settings/Caller.ts +0 -78
- package/src/classes/settings/CallerBase.ts +0 -27
- package/src/classes/settings/Resource.ts +0 -81
- package/src/classes/settings/SettingsQueries.ts +0 -56
- package/src/classes/settings/badge/Caller.ts +0 -30
- package/src/classes/settings/badge/Queries.ts +0 -19
- package/src/classes/settings/badge/Resource.ts +0 -50
- package/src/classes/settings/badge/index.ts +0 -2
- package/src/classes/settings/index.ts +0 -5
- package/src/dapp/context/creator/Creator.ts +0 -122
- package/src/dapp/context/creator/DefaultPayloads/DappAccessPayloads.ts +0 -20
- package/src/dapp/context/creator/DefaultPayloads/DefaultPayloads.ts +0 -40
- package/src/dapp/context/creator/DefaultPayloads/NodeInfoPayload.ts +0 -33
- package/src/dapp/context/creator/DefaultPayloads/index.ts +0 -1
- package/src/dapp/context/creator/ExternalModulePermissions/ExternalModulePermissions.ts +0 -59
- package/src/dapp/context/creator/ExternalModulePermissions/index.ts +0 -1
- package/src/dapp/context/creator/createDappContext.ts +0 -61
- package/src/dapp/context/creator/index.ts +0 -3
- package/src/dapp/context/index.ts +0 -1
- package/src/dapp/index.ts +0 -1
- package/src/event/bus/Connection.ts +0 -31
- package/src/event/bus/EventBus.ts +0 -160
- package/src/event/bus/PubSubConnection.ts +0 -28
- package/src/event/bus/index.ts +0 -3
- package/src/event/connections/DappAccessRequest.ts +0 -11
- package/src/event/connections/DappsReady.ts +0 -9
- package/src/event/connections/ExposeDappRequest.ts +0 -11
- package/src/event/connections/OsPubSubNetworkReady.ts +0 -12
- package/src/event/connections/OsSettingsReady.ts +0 -12
- package/src/event/connections/OsXyoPublicReady.ts +0 -12
- package/src/event/connections/index.ts +0 -6
- package/src/event/index.ts +0 -2
- package/src/helpers/index.ts +0 -1
- package/src/helpers/monitor/XyOsMonitor.ts +0 -52
- package/src/helpers/monitor/index.ts +0 -2
- package/src/helpers/monitor/types.ts +0 -8
- package/src/index.ts +0 -29
- package/src/initializer/DappInitializer.ts +0 -57
- package/src/initializer/index.ts +0 -1
- package/src/intent/Caller.ts +0 -74
- package/src/intent/Resource.ts +0 -66
- package/src/intent/index.ts +0 -2
- package/src/lib/ExternalStore.ts +0 -7
- package/src/lib/Listener.ts +0 -1
- package/src/lib/ModuleAccountPaths.ts +0 -23
- package/src/lib/ModuleNames.ts +0 -3
- package/src/lib/NameTransforms.ts +0 -34
- package/src/lib/PayloadStore.ts +0 -105
- package/src/lib/ResourceStores.ts +0 -7
- package/src/lib/index.ts +0 -11
- package/src/lib/initializeXns.ts +0 -16
- package/src/lib/isEqual.ts +0 -42
- package/src/lib/isPayload.ts +0 -24
- package/src/lib/tokenPlacesSplit.ts +0 -17
- package/src/loadOsNode.ts +0 -44
- package/src/manifest/index.ts +0 -2
- package/src/manifest/manifestReplacementTokens.ts +0 -6
- package/src/manifest/os-node.manifest.json +0 -132
- package/src/manifests/dapp-window.manifest.json +0 -36
- package/src/manifests/index.ts +0 -1
- package/src/models/access/ValidDappAccessInterfaces.ts +0 -6
- package/src/models/access/index.ts +0 -1
- package/src/models/index.ts +0 -1
- package/src/profileModuleEvents.ts +0 -43
- package/src/registration/DappRegistrationService.ts +0 -180
- package/src/registration/DappRegistry.ts +0 -129
- package/src/registration/ValidateDappAccessDiviner/Config.ts +0 -24
- package/src/registration/ValidateDappAccessDiviner/Diviner.ts +0 -133
- package/src/registration/ValidateDappAccessDiviner/index.ts +0 -2
- package/src/registration/index.ts +0 -2
- package/src/scripts/xyos/command/config.ts +0 -19
- package/src/scripts/xyos/command/create.ts +0 -22
- package/src/scripts/xyos/command/index.ts +0 -7
- package/src/scripts/xyos/command/manifest.ts +0 -19
- package/src/scripts/xyos/command/start.ts +0 -35
- package/src/scripts/xyos/index.ts +0 -31
- package/src/scripts/xyos/lib/createFromTemplate.ts +0 -11
- package/src/scripts/xyos/lib/headless.ts +0 -68
- package/src/scripts/xyos/lib/index.ts +0 -2
- package/src/signer/Signer.spec.ts +0 -65
- package/src/signer/Signers.ts +0 -74
- package/src/signer/index.ts +0 -1
- package/src/spec/boot.spec.ts +0 -89
- package/src/stack/Base.ts +0 -165
- package/src/stack/Manager.ts +0 -51
- package/src/stack/Map.ts +0 -22
- package/src/stack/OsPubSubNetworkStack.ts +0 -70
- package/src/stack/OsSettingsStack.ts +0 -24
- package/src/stack/XyoPublicNetworkStack.ts +0 -32
- package/src/stack/index.ts +0 -6
- package/src/system/ManageSystemDapps.ts +0 -148
- package/src/system/Queries.ts +0 -69
- package/src/system/index.ts +0 -1
- package/src/types/global.d.ts +0 -9
- package/src/types/images.d.ts +0 -5
- package/src/utils/buildWalletSeedPhrasePayload.ts +0 -51
- package/src/utils/getApiDomain.ts +0 -14
- package/src/utils/index.ts +0 -3
- package/src/utils/renameObjKey.ts +0 -22
- package/src/wallet/DappSeedPhraseRepository.ts +0 -99
- package/src/wallet/SeedPhraseRepository.ts +0 -31
- package/src/wallet/index.ts +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { MonitorEventConfig } from './types.ts';
|
|
2
|
-
export
|
|
2
|
+
export interface Connection {
|
|
3
3
|
downlink: number;
|
|
4
4
|
effectiveType: string;
|
|
5
5
|
rtt: number;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
export declare abstract class XyOsMonitor {
|
|
8
8
|
static trackEvent: (event: string, properties?: Record<string, unknown>) => void;
|
|
9
9
|
private performanceTimers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XyOsMonitor.d.ts","sourceRoot":"","sources":["../../../../src/helpers/monitor/XyOsMonitor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAGpD,MAAM,
|
|
1
|
+
{"version":3,"file":"XyOsMonitor.d.ts","sourceRoot":"","sources":["../../../../src/helpers/monitor/XyOsMonitor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAGpD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,GAAG,EAAE,MAAM,CAAA;CACZ;AAaD,8BAAsB,WAAW;IAC/B,MAAM,CAAC,UAAU,gEAAiC;IAElD,OAAO,CAAC,iBAAiB,CAA4B;IAErD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI9B,SAAS,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI;IAmBhD,SAAS,CAAC,QAAQ,CAAC,UAAU,IAAI,UAAU,GAAG,SAAS;CACxD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JsonObject } from '@xylabs/sdk-js';
|
|
2
2
|
export type MonitorEventNames = 'Load XyOs' | 'Install System dApps' | 'Expose dApps' | 'Loading dApp';
|
|
3
|
-
export
|
|
3
|
+
export interface MonitorEventConfig {
|
|
4
4
|
additionalProperties?: JsonObject;
|
|
5
5
|
name: MonitorEventNames;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/helpers/monitor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,sBAAsB,GAAG,cAAc,GAAG,cAAc,CAAA;AAEtG,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/helpers/monitor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,sBAAsB,GAAG,cAAc,GAAG,cAAc,CAAA;AAEtG,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,CAAC,EAAE,UAAU,CAAA;IACjC,IAAI,EAAE,iBAAiB,CAAA;CACxB"}
|
package/dist/node/index.mjs
CHANGED
|
@@ -3,10 +3,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3
3
|
|
|
4
4
|
// src/access/Caller.ts
|
|
5
5
|
import { assertEx as assertEx16 } from "@xylabs/sdk-js";
|
|
6
|
-
import { ModuleFactoryLocator as ModuleFactoryLocator9 } from "@xyo-network/module-factory-locator";
|
|
7
6
|
import { asNodeInstance as asNodeInstance2 } from "@xyo-network/node-model";
|
|
8
7
|
import { isRegisteredDappAccessDappSet as isRegisteredDappAccessDappSet2 } from "@xyo-network/os-model";
|
|
9
8
|
import { PayloadBuilder as PayloadBuilder5 } from "@xyo-network/payload-builder";
|
|
9
|
+
import { ModuleFactoryLocator as ModuleFactoryLocator9 } from "@xyo-network/sdk-js";
|
|
10
10
|
|
|
11
11
|
// src/OsCallerBase.ts
|
|
12
12
|
import { assertEx } from "@xylabs/sdk-js";
|
|
@@ -68,13 +68,12 @@ import { Mutex as Mutex3 } from "async-mutex";
|
|
|
68
68
|
|
|
69
69
|
// src/dapp/context/creator/createDappContext.ts
|
|
70
70
|
import { GenericPayloadDiviner } from "@xyo-network/diviner-payload-generic";
|
|
71
|
-
import { ModuleFactoryLocator as ModuleFactoryLocator2 } from "@xyo-network/
|
|
72
|
-
import { HDWallet as HDWallet2 } from "@xyo-network/wallet";
|
|
71
|
+
import { HDWallet as HDWallet2, ModuleFactoryLocator as ModuleFactoryLocator2 } from "@xyo-network/sdk-js";
|
|
73
72
|
|
|
74
73
|
// src/wallet/DappSeedPhraseRepository.ts
|
|
75
74
|
import { PayloadDivinerQuerySchema } from "@xyo-network/diviner-payload-model";
|
|
76
75
|
import { DappWalletSeedPhraseSchema } from "@xyo-network/os-model";
|
|
77
|
-
import { HDWallet } from "@xyo-network/
|
|
76
|
+
import { HDWallet } from "@xyo-network/sdk-js";
|
|
78
77
|
import { v4 as uuid } from "uuid";
|
|
79
78
|
var DappSeedPhraseRepository = class extends OsCallerBase {
|
|
80
79
|
static {
|
|
@@ -117,7 +116,9 @@ var DappSeedPhraseRepository = class extends OsCallerBase {
|
|
|
117
116
|
throw new Error(`failed to add seed phrase: ${dappName}`);
|
|
118
117
|
} catch (e) {
|
|
119
118
|
console.error(e);
|
|
120
|
-
throw new Error(`failed to add seed phrase: ${dappName}
|
|
119
|
+
throw new Error(`failed to add seed phrase: ${dappName}`, {
|
|
120
|
+
cause: e
|
|
121
|
+
});
|
|
121
122
|
}
|
|
122
123
|
} else {
|
|
123
124
|
throw new Error(`${dappName} is not allowed to register a seed phase. NOTE: this is a safeguard till 3rd party dApps can be validated`);
|
|
@@ -167,8 +168,8 @@ var DappSeedPhraseRepository = class extends OsCallerBase {
|
|
|
167
168
|
import { assertEx as assertEx3 } from "@xylabs/sdk-js";
|
|
168
169
|
import { asArchivistInstance as asArchivistInstance3 } from "@xyo-network/archivist-model";
|
|
169
170
|
import { replaceManifestTokens } from "@xyo-network/kernel";
|
|
170
|
-
import { DappPackageManifestPayloadSchema } from "@xyo-network/
|
|
171
|
-
import { ModuleFactoryLocator } from "@xyo-network/
|
|
171
|
+
import { DappPackageManifestPayloadSchema } from "@xyo-network/os-model";
|
|
172
|
+
import { ModuleFactoryLocator } from "@xyo-network/sdk-js";
|
|
172
173
|
|
|
173
174
|
// src/DappCallerBase.ts
|
|
174
175
|
import { assertEx as assertEx2, toSafeJsonString } from "@xylabs/sdk-js";
|
|
@@ -618,7 +619,9 @@ var createDappContext = /* @__PURE__ */ __name(async (dapp, context, allowedName
|
|
|
618
619
|
const error = e;
|
|
619
620
|
console.error(`Error creating dappWindow node: ${error.message}`);
|
|
620
621
|
console.error(`Error creating dappWindow node: ${error.stack}`);
|
|
621
|
-
throw new Error(`Error creating dappWindow node: ${error.message}
|
|
622
|
+
throw new Error(`Error creating dappWindow node: ${error.message}`, {
|
|
623
|
+
cause: e
|
|
624
|
+
});
|
|
622
625
|
}
|
|
623
626
|
}, "createDappContext");
|
|
624
627
|
|
|
@@ -626,7 +629,7 @@ var createDappContext = /* @__PURE__ */ __name(async (dapp, context, allowedName
|
|
|
626
629
|
import { assertEx as assertEx14 } from "@xylabs/sdk-js";
|
|
627
630
|
import { boot } from "@xyo-network/bios";
|
|
628
631
|
import { Kernel } from "@xyo-network/kernel";
|
|
629
|
-
import { ModuleFactoryLocator as ModuleFactoryLocator8 } from "@xyo-network/
|
|
632
|
+
import { ModuleFactoryLocator as ModuleFactoryLocator8 } from "@xyo-network/sdk-js";
|
|
630
633
|
|
|
631
634
|
// src/event/bus/Connection.ts
|
|
632
635
|
import { assertEx as assertEx4, BaseEmitter } from "@xylabs/sdk-js";
|
|
@@ -653,10 +656,10 @@ var EventBusConnection = class extends BaseEmitter {
|
|
|
653
656
|
// src/event/bus/EventBus.ts
|
|
654
657
|
import { assertEx as assertEx5, findAs, forget } from "@xylabs/sdk-js";
|
|
655
658
|
import { asArchivistInstance as asArchivistInstance4 } from "@xyo-network/archivist";
|
|
656
|
-
import { MemoryArchivist, MemoryArchivistConfigSchema } from "@xyo-network/archivist-memory";
|
|
657
659
|
import { asOptionalEventBusEvent, isPubSubConnections } from "@xyo-network/os-model";
|
|
658
660
|
import { PayloadBuilder as PayloadBuilder2 } from "@xyo-network/payload-builder";
|
|
659
661
|
import { asSchema } from "@xyo-network/payload-model";
|
|
662
|
+
import { MemoryArchivist, MemoryArchivistConfigSchema } from "@xyo-network/sdk-js";
|
|
660
663
|
import { Mutex } from "async-mutex";
|
|
661
664
|
import { v4 as uuid2 } from "uuid";
|
|
662
665
|
var EventBus = class {
|
|
@@ -839,7 +842,7 @@ var osXyoPublicNetworkReadyConnection = /* @__PURE__ */ __name(() => new EventBu
|
|
|
839
842
|
|
|
840
843
|
// src/lib/initializeXns.ts
|
|
841
844
|
import { asDivinerInstance as asDivinerInstance3 } from "@xyo-network/diviner-model";
|
|
842
|
-
import { ResolveHelper } from "@xyo-network/module
|
|
845
|
+
import { ResolveHelper } from "@xyo-network/module";
|
|
843
846
|
import { NameRegistrarTransformer } from "@xyo-network/module-resolver";
|
|
844
847
|
var initializeXns = /* @__PURE__ */ __name(async (xnsNode) => {
|
|
845
848
|
if (ResolveHelper.transformers.length === 0) {
|
|
@@ -861,13 +864,15 @@ function isEqual(a, b) {
|
|
|
861
864
|
if (a === b) return true;
|
|
862
865
|
if (typeof a !== typeof b) return false;
|
|
863
866
|
if (isObject(a) && isObject(b)) {
|
|
864
|
-
const
|
|
865
|
-
const
|
|
867
|
+
const aRecord = a;
|
|
868
|
+
const bRecord = b;
|
|
869
|
+
const aKeys = Object.keys(aRecord);
|
|
870
|
+
const bKeys = Object.keys(bRecord);
|
|
866
871
|
if (aKeys.length !== bKeys.length) {
|
|
867
872
|
return false;
|
|
868
873
|
}
|
|
869
874
|
for (const key of aKeys) {
|
|
870
|
-
if (!
|
|
875
|
+
if (!Object.hasOwn(bRecord, key) || !isEqual(aRecord[key], bRecord[key])) {
|
|
871
876
|
return false;
|
|
872
877
|
}
|
|
873
878
|
}
|
|
@@ -1071,8 +1076,7 @@ var tokenPlacesSplitString = /* @__PURE__ */ __name((value, places) => {
|
|
|
1071
1076
|
// src/loadOsNode.ts
|
|
1072
1077
|
import { IndexedDbArchivist } from "@xyo-network/archivist-indexeddb";
|
|
1073
1078
|
import { IndexedDbPayloadDiviner } from "@xyo-network/diviner-payload-indexeddb";
|
|
1074
|
-
import { ManifestWrapper } from "@xyo-network/
|
|
1075
|
-
import { ModuleFactoryLocator as ModuleFactoryLocator3 } from "@xyo-network/module-factory-locator";
|
|
1079
|
+
import { ManifestWrapper, ModuleFactoryLocator as ModuleFactoryLocator3 } from "@xyo-network/sdk-js";
|
|
1076
1080
|
var OS_NODE_PATH = "1'";
|
|
1077
1081
|
var getDefaultOsNodeLocator = /* @__PURE__ */ __name(() => {
|
|
1078
1082
|
const locator = new ModuleFactoryLocator3();
|
|
@@ -1097,14 +1101,16 @@ var loadOsNode = /* @__PURE__ */ __name(async (osWallet, locator) => {
|
|
|
1097
1101
|
const error = e;
|
|
1098
1102
|
console.error(`Error creating os node: ${error.message}`);
|
|
1099
1103
|
console.error(`Error creating os node: ${error.stack}`);
|
|
1100
|
-
throw new Error(`Error creating os node: ${error.message}
|
|
1104
|
+
throw new Error(`Error creating os node: ${error.message}`, {
|
|
1105
|
+
cause: e
|
|
1106
|
+
});
|
|
1101
1107
|
}
|
|
1102
1108
|
}, "loadOsNode");
|
|
1103
1109
|
|
|
1104
1110
|
// src/registration/DappRegistrationService.ts
|
|
1105
1111
|
import { forget as forget2, fulfilled, rejected } from "@xylabs/sdk-js";
|
|
1106
|
-
import { ModuleFactoryLocator as ModuleFactoryLocator7 } from "@xyo-network/module-factory-locator";
|
|
1107
1112
|
import { DappIntentTypes, DappMode as DappMode2, isRegisteredDappAccessDappSet, isRegisteredDappExposedDappSet } from "@xyo-network/os-model";
|
|
1113
|
+
import { ModuleFactoryLocator as ModuleFactoryLocator7 } from "@xyo-network/sdk-js";
|
|
1108
1114
|
|
|
1109
1115
|
// src/intent/Caller.ts
|
|
1110
1116
|
import { PayloadDivinerQuerySchema as PayloadDivinerQuerySchema2 } from "@xyo-network/diviner-payload-model";
|
|
@@ -1129,11 +1135,11 @@ var DappIntentCaller = class _DappIntentCaller extends DappCallerBase {
|
|
|
1129
1135
|
static buildIntent(sourceDappId, intent, targetDappId, targetMode = DappMode.Window, params) {
|
|
1130
1136
|
return {
|
|
1131
1137
|
intent,
|
|
1132
|
-
params: params
|
|
1138
|
+
params: params ?? "",
|
|
1133
1139
|
schema: DappIntentSchema,
|
|
1134
1140
|
sourceDappId,
|
|
1135
1141
|
targetDappId,
|
|
1136
|
-
targetMode: targetMode
|
|
1142
|
+
targetMode: targetMode ?? DappMode.Window,
|
|
1137
1143
|
timestamp: Date.now()
|
|
1138
1144
|
};
|
|
1139
1145
|
}
|
|
@@ -1414,9 +1420,8 @@ var ManageSystemDapps = class extends OsCallerBase {
|
|
|
1414
1420
|
|
|
1415
1421
|
// src/XyOsDapp.ts
|
|
1416
1422
|
import { assertEx as assertEx9 } from "@xylabs/sdk-js";
|
|
1417
|
-
import { ManifestWrapper as ManifestWrapper2 } from "@xyo-network/manifest-wrapper";
|
|
1418
|
-
import { ModuleFactoryLocator as ModuleFactoryLocator5 } from "@xyo-network/module-factory-locator";
|
|
1419
1423
|
import { DappPackageManifestPayloadSchema as DappPackageManifestPayloadSchema2 } from "@xyo-network/os-model";
|
|
1424
|
+
import { ManifestWrapper as ManifestWrapper2, ModuleFactoryLocator as ModuleFactoryLocator5 } from "@xyo-network/sdk-js";
|
|
1420
1425
|
|
|
1421
1426
|
// src/manifests/dapp-window.manifest.json
|
|
1422
1427
|
var dapp_window_manifest_default = {
|
|
@@ -1458,7 +1463,7 @@ var dapp_window_manifest_default = {
|
|
|
1458
1463
|
|
|
1459
1464
|
// src/XyOsBase.ts
|
|
1460
1465
|
import { assertEx as assertEx8, BaseEmitter as BaseEmitter2 } from "@xylabs/sdk-js";
|
|
1461
|
-
import { ModuleFactoryLocator as ModuleFactoryLocator4 } from "@xyo-network/
|
|
1466
|
+
import { ModuleFactoryLocator as ModuleFactoryLocator4 } from "@xyo-network/sdk-js";
|
|
1462
1467
|
import { Mutex as Mutex2 } from "async-mutex";
|
|
1463
1468
|
var XyOsContextBase = class extends BaseEmitter2 {
|
|
1464
1469
|
static {
|
|
@@ -1620,7 +1625,7 @@ var XyOsDapp = class extends XyOsContextBase {
|
|
|
1620
1625
|
|
|
1621
1626
|
// src/registration/DappRegistry.ts
|
|
1622
1627
|
import { DappRegisteredSchema, DappRegisteredState, isRegisteredDappAccess } from "@xyo-network/os-model";
|
|
1623
|
-
import { HDWallet as HDWallet4 } from "@xyo-network/
|
|
1628
|
+
import { HDWallet as HDWallet4 } from "@xyo-network/sdk-js";
|
|
1624
1629
|
|
|
1625
1630
|
// src/registration/ValidateDappAccessDiviner/Config.ts
|
|
1626
1631
|
import { asSchema as asSchema2, isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
@@ -1630,10 +1635,8 @@ var ValidateDappAccessDivinerConfigSchema = asSchema2("network.xyo.os.dapp.acces
|
|
|
1630
1635
|
|
|
1631
1636
|
// src/registration/ValidateDappAccessDiviner/Diviner.ts
|
|
1632
1637
|
import { AbstractDiviner } from "@xyo-network/diviner-abstract";
|
|
1633
|
-
import { ManifestWrapper as ManifestWrapper3, PackageManifestPayloadSchema } from "@xyo-network/manifest";
|
|
1634
|
-
import { ModuleFactoryLocator as ModuleFactoryLocator6 } from "@xyo-network/module-factory-locator";
|
|
1635
1638
|
import { isDappPackageManifestPayload, isUnregisteredDappAccess, RegisteredDappAccessSchema } from "@xyo-network/os-model";
|
|
1636
|
-
import { HDWallet as HDWallet3 } from "@xyo-network/
|
|
1639
|
+
import { HDWallet as HDWallet3, ManifestWrapper as ManifestWrapper3, ModuleFactoryLocator as ModuleFactoryLocator6, PackageManifestPayloadSchema } from "@xyo-network/sdk-js";
|
|
1637
1640
|
|
|
1638
1641
|
// src/models/access/ValidDappAccessInterfaces.ts
|
|
1639
1642
|
import { RegisteredNames, RegisteredNamesInterface } from "@xyo-network/os-model";
|
|
@@ -1650,13 +1653,13 @@ var ValidateDappAccessDiviner = class extends AbstractDiviner {
|
|
|
1650
1653
|
ValidateDappAccessDivinerConfigSchema
|
|
1651
1654
|
];
|
|
1652
1655
|
async divineHandler(payloads) {
|
|
1653
|
-
const dappManifest = payloads?.filter(isDappPackageManifestPayload);
|
|
1654
|
-
const accessors = payloads?.filter(isUnregisteredDappAccess);
|
|
1656
|
+
const dappManifest = payloads?.filter(isDappPackageManifestPayload) ?? [];
|
|
1657
|
+
const accessors = payloads?.filter(isUnregisteredDappAccess) ?? [];
|
|
1655
1658
|
const dappParams = this.params.dappParams;
|
|
1656
1659
|
if (dappManifest.length > 1) {
|
|
1657
1660
|
throw new Error("Only one dapp manifest payload is allowed");
|
|
1658
1661
|
}
|
|
1659
|
-
if (
|
|
1662
|
+
if (dappManifest.length === 0 || accessors.length === 0) {
|
|
1660
1663
|
return [];
|
|
1661
1664
|
}
|
|
1662
1665
|
const registeredAccessors = [];
|
|
@@ -1900,7 +1903,10 @@ var DappRegistrationService = class {
|
|
|
1900
1903
|
forget2(forgetHandlers());
|
|
1901
1904
|
return result;
|
|
1902
1905
|
}));
|
|
1903
|
-
const failed = results.filter(rejected).map((result) =>
|
|
1906
|
+
const failed = results.filter(rejected).map((result) => {
|
|
1907
|
+
const reason = result.reason;
|
|
1908
|
+
return reason instanceof Error ? reason.message : String(reason);
|
|
1909
|
+
});
|
|
1904
1910
|
const succeeded = results.filter(fulfilled).map((result) => result.value);
|
|
1905
1911
|
for (const registeredDapp of succeeded) this.registeredDappSets.add(registeredDapp);
|
|
1906
1912
|
return {
|
|
@@ -1943,7 +1949,7 @@ var DappRegistrationService = class {
|
|
|
1943
1949
|
|
|
1944
1950
|
// src/signer/Signers.ts
|
|
1945
1951
|
import { assertEx as assertEx10 } from "@xylabs/sdk-js";
|
|
1946
|
-
import { HDWallet as HDWallet5 } from "@xyo-network/
|
|
1952
|
+
import { HDWallet as HDWallet5 } from "@xyo-network/sdk-js";
|
|
1947
1953
|
var Signers = class {
|
|
1948
1954
|
static {
|
|
1949
1955
|
__name(this, "Signers");
|
|
@@ -2665,7 +2671,7 @@ var AccessNodeQueries = class {
|
|
|
2665
2671
|
return payloads;
|
|
2666
2672
|
}
|
|
2667
2673
|
async getArchivistFromDappNode() {
|
|
2668
|
-
const archivistPath = this.accessRequest?.destinationArchivist
|
|
2674
|
+
const archivistPath = this.accessRequest?.destinationArchivist ?? "DappArchivist";
|
|
2669
2675
|
const mod = assertEx17(await this.xyOsContext.root.resolve(archivistPath), () => `Unable to find archivist at ${archivistPath}`);
|
|
2670
2676
|
return asArchivistInstance6(mod, () => `Module at ${archivistPath} is not an archivist`, {
|
|
2671
2677
|
required: true
|
|
@@ -3571,13 +3577,13 @@ var OsSettingsQueries = {
|
|
|
3571
3577
|
if (wallet) return [
|
|
3572
3578
|
wallet
|
|
3573
3579
|
];
|
|
3574
|
-
const legacyWallet = results.find((payload) => payload.$meta
|
|
3580
|
+
const legacyWallet = results.find((payload) => payload.$meta?.label === "userWallet");
|
|
3575
3581
|
if (legacyWallet && archivist) {
|
|
3576
3582
|
const legacyMeta = legacyWallet.$meta;
|
|
3577
3583
|
const newWalletPayloadFields = {
|
|
3578
3584
|
mnemonic: legacyWallet.mnemonic,
|
|
3579
|
-
$label: legacyMeta
|
|
3580
|
-
$timestamp: legacyMeta
|
|
3585
|
+
$label: legacyMeta?.label,
|
|
3586
|
+
$timestamp: legacyMeta?.$timestamp
|
|
3581
3587
|
};
|
|
3582
3588
|
const payload = new PayloadBuilder9({
|
|
3583
3589
|
schema: WalletSeedPhraseSchema2
|