@xyo-network/os-runtime 7.0.1 → 7.1.1
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/DappCallerBase.d.ts.map +1 -1
- package/dist/neutral/OsCallerBase.d.ts.map +1 -1
- package/dist/neutral/PubSubBridgeCaller.d.ts.map +1 -1
- package/dist/neutral/XyOs.d.ts +2 -3
- package/dist/neutral/XyOs.d.ts.map +1 -1
- package/dist/neutral/XyOsBase.d.ts +2 -1
- package/dist/neutral/XyOsBase.d.ts.map +1 -1
- package/dist/neutral/XyOsDapp.d.ts +2 -1
- package/dist/neutral/XyOsDapp.d.ts.map +1 -1
- package/dist/neutral/access/Caller.d.ts +3 -3
- package/dist/neutral/access/Caller.d.ts.map +1 -1
- package/dist/neutral/access/interfaces/registered-names/helpers/AccessNodeQueries.d.ts.map +1 -1
- package/dist/neutral/access/interfaces/registered-names/helpers/resource/AbstractXnsCaller.d.ts.map +1 -1
- package/dist/neutral/access/interfaces/registered-names/helpers/resource/RegistrationsResource.d.ts +2 -2
- package/dist/neutral/access/interfaces/registered-names/helpers/resource/RegistrationsResource.d.ts.map +1 -1
- package/dist/neutral/adapter/Base.d.ts +2 -2
- package/dist/neutral/adapter/Base.d.ts.map +1 -1
- package/dist/neutral/classes/settings/CallerBase.d.ts.map +1 -1
- package/dist/neutral/dapp/context/creator/Creator.d.ts +5 -5
- package/dist/neutral/dapp/context/creator/Creator.d.ts.map +1 -1
- package/dist/neutral/dapp/context/creator/DefaultPayloads/DappAccessPayloads.d.ts.map +1 -1
- package/dist/neutral/dapp/context/creator/DefaultPayloads/DefaultPayloads.d.ts +1 -1
- package/dist/neutral/dapp/context/creator/DefaultPayloads/DefaultPayloads.d.ts.map +1 -1
- package/dist/neutral/dapp/context/creator/DefaultPayloads/NodeInfoPayload.d.ts +1 -1
- package/dist/neutral/dapp/context/creator/DefaultPayloads/NodeInfoPayload.d.ts.map +1 -1
- package/dist/neutral/dapp/context/creator/ExternalModulePermissions/ExternalModulePermissions.d.ts +2 -2
- package/dist/neutral/dapp/context/creator/ExternalModulePermissions/ExternalModulePermissions.d.ts.map +1 -1
- package/dist/neutral/index.mjs +81 -37
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/lib/NameTransforms.d.ts.map +1 -1
- package/dist/neutral/lib/PayloadStore.d.ts +1 -1
- package/dist/neutral/lib/PayloadStore.d.ts.map +1 -1
- package/dist/neutral/registration/DappRegistrationService.d.ts +6 -6
- package/dist/neutral/registration/DappRegistrationService.d.ts.map +1 -1
- package/dist/neutral/registration/DappRegistry.d.ts +1 -1
- package/dist/neutral/registration/DappRegistry.d.ts.map +1 -1
- package/dist/neutral/system/ManageSystemDapps.d.ts +5 -5
- package/dist/neutral/system/ManageSystemDapps.d.ts.map +1 -1
- package/dist/neutral/wallet/DappSeedPhraseRepository.d.ts.map +1 -1
- package/dist/node/DappCallerBase.d.ts.map +1 -1
- package/dist/node/OsCallerBase.d.ts.map +1 -1
- package/dist/node/PubSubBridgeCaller.d.ts.map +1 -1
- package/dist/node/XyOs.d.ts +2 -3
- package/dist/node/XyOs.d.ts.map +1 -1
- package/dist/node/XyOsBase.d.ts +2 -1
- package/dist/node/XyOsBase.d.ts.map +1 -1
- package/dist/node/XyOsDapp.d.ts +2 -1
- package/dist/node/XyOsDapp.d.ts.map +1 -1
- package/dist/node/access/Caller.d.ts +3 -3
- package/dist/node/access/Caller.d.ts.map +1 -1
- package/dist/node/access/interfaces/registered-names/helpers/AccessNodeQueries.d.ts.map +1 -1
- package/dist/node/access/interfaces/registered-names/helpers/resource/AbstractXnsCaller.d.ts.map +1 -1
- package/dist/node/access/interfaces/registered-names/helpers/resource/RegistrationsResource.d.ts +2 -2
- package/dist/node/access/interfaces/registered-names/helpers/resource/RegistrationsResource.d.ts.map +1 -1
- package/dist/node/adapter/Base.d.ts +2 -2
- package/dist/node/adapter/Base.d.ts.map +1 -1
- package/dist/node/classes/settings/CallerBase.d.ts.map +1 -1
- package/dist/node/dapp/context/creator/Creator.d.ts +5 -5
- package/dist/node/dapp/context/creator/Creator.d.ts.map +1 -1
- package/dist/node/dapp/context/creator/DefaultPayloads/DappAccessPayloads.d.ts.map +1 -1
- package/dist/node/dapp/context/creator/DefaultPayloads/DefaultPayloads.d.ts +1 -1
- package/dist/node/dapp/context/creator/DefaultPayloads/DefaultPayloads.d.ts.map +1 -1
- package/dist/node/dapp/context/creator/DefaultPayloads/NodeInfoPayload.d.ts +1 -1
- package/dist/node/dapp/context/creator/DefaultPayloads/NodeInfoPayload.d.ts.map +1 -1
- package/dist/node/dapp/context/creator/ExternalModulePermissions/ExternalModulePermissions.d.ts +2 -2
- package/dist/node/dapp/context/creator/ExternalModulePermissions/ExternalModulePermissions.d.ts.map +1 -1
- package/dist/node/index.mjs +81 -37
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/lib/NameTransforms.d.ts.map +1 -1
- package/dist/node/lib/PayloadStore.d.ts +1 -1
- package/dist/node/lib/PayloadStore.d.ts.map +1 -1
- package/dist/node/registration/DappRegistrationService.d.ts +6 -6
- package/dist/node/registration/DappRegistrationService.d.ts.map +1 -1
- package/dist/node/registration/DappRegistry.d.ts +1 -1
- package/dist/node/registration/DappRegistry.d.ts.map +1 -1
- package/dist/node/scripts/xyos/index.mjs +44 -28
- package/dist/node/scripts/xyos/index.mjs.map +1 -1
- package/dist/node/system/ManageSystemDapps.d.ts +5 -5
- package/dist/node/system/ManageSystemDapps.d.ts.map +1 -1
- package/dist/node/wallet/DappSeedPhraseRepository.d.ts.map +1 -1
- package/package.json +49 -49
- package/src/DappCallerBase.ts +5 -1
- package/src/OsCallerBase.ts +5 -1
- package/src/PubSubBridgeCaller.ts +4 -1
- package/src/XyOs.ts +1 -1
- package/src/XyOsBase.ts +2 -1
- package/src/XyOsDapp.ts +2 -1
- package/src/access/Caller.ts +17 -5
- package/src/access/interfaces/registered-names/helpers/AccessNodeQueries.ts +12 -4
- package/src/access/interfaces/registered-names/helpers/resource/AbstractXnsCaller.ts +5 -1
- package/src/access/interfaces/registered-names/helpers/resource/RegistrationsResource.ts +3 -1
- package/src/adapter/Base.ts +6 -2
- package/src/classes/menu/Queries.ts +1 -1
- package/src/classes/settings/CallerBase.ts +4 -1
- package/src/dapp/context/creator/Creator.ts +21 -7
- package/src/dapp/context/creator/DefaultPayloads/DappAccessPayloads.ts +5 -2
- package/src/dapp/context/creator/DefaultPayloads/DefaultPayloads.ts +12 -4
- package/src/dapp/context/creator/DefaultPayloads/NodeInfoPayload.ts +5 -2
- package/src/dapp/context/creator/ExternalModulePermissions/ExternalModulePermissions.ts +15 -5
- package/src/lib/NameTransforms.ts +4 -1
- package/src/lib/PayloadStore.ts +4 -1
- package/src/registration/DappRegistrationService.ts +20 -6
- package/src/registration/DappRegistry.ts +4 -1
- package/src/system/ManageSystemDapps.ts +17 -5
- package/src/wallet/DappSeedPhraseRepository.ts +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NameTransforms.d.ts","sourceRoot":"","sources":["../../../src/lib/NameTransforms.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"NameTransforms.d.ts","sourceRoot":"","sources":["../../../src/lib/NameTransforms.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAQ;gBACT,KAAK,EAAE,MAAM;IAIzB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM;IAQ3B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM;IAI/B,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;IAIzB,MAAM;IAIN,UAAU;IAIV,IAAI;CAGL"}
|
|
@@ -8,8 +8,8 @@ export interface PayloadStoreConfig<T extends Payload = Payload> {
|
|
|
8
8
|
idFunction: (schema: Payload) => boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare class PayloadStore<T extends Payload = Payload> implements ExternalStore {
|
|
11
|
-
private archivist;
|
|
12
11
|
latest: T[];
|
|
12
|
+
private archivist;
|
|
13
13
|
private deleteListeners;
|
|
14
14
|
private insertListeners;
|
|
15
15
|
private listeners;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayloadStore.d.ts","sourceRoot":"","sources":["../../../src/lib/PayloadStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAA4B,MAAM,wBAAwB,CAAA;AACzF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IAC7D,SAAS,EAAE,iBAAiB,CAAA;IAC5B,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IAC7B,UAAU,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAA;CACzC;AAED,qBAAa,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,CAAE,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"PayloadStore.d.ts","sourceRoot":"","sources":["../../../src/lib/PayloadStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAA4B,MAAM,wBAAwB,CAAA;AACzF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IAC7D,SAAS,EAAE,iBAAiB,CAAA;IAC5B,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IAC7B,UAAU,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAA;CACzC;AAED,qBAAa,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,CAAE,YAAW,aAAa;IAC7E,MAAM,EAAE,CAAC,EAAE,CAAK;IAChB,OAAO,CAAC,SAAS,CAAmB;IACpC,OAAO,CAAC,eAAe,CAAqE;IAC5F,OAAO,CAAC,eAAe,CAAsE;IAC7F,OAAO,CAAC,SAAS,CAAiB;IAElC,OAAO;IAIP;;OAEG;WACU,MAAM,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,EAC/C,SAAS,EAAE,SAAS,EAAE,UAAU,GACjC,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAkCxB;;OAEG;IACH,gBAAgB;IAOhB;;OAEG;IACH,WAAW,IAAI,CAAC,EAAE;IAIlB;;;;OAIG;IACH,SAAS,CAAC,aAAa,EAAE,QAAQ;IAOjC,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,eAAe;CAMxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ModuleFactoryLocatorInstance } from '@xyo-network/module-model';
|
|
2
2
|
import type { DappPackageManifestPayload, DappParams, DappRegistrationResults, PayloadWithVersion, RegisteredDappSetResult, XyOsContext, XyOsDappContext } from '@xyo-network/os-model';
|
|
3
3
|
import { ManageSystemDapps } from '../system/index.ts';
|
|
4
4
|
import { DappSeedPhraseRepository } from '../wallet/index.ts';
|
|
@@ -9,10 +9,6 @@ export interface DappRegistrationServiceParams {
|
|
|
9
9
|
dappPayloads: PayloadWithVersion[];
|
|
10
10
|
}
|
|
11
11
|
export declare class DappRegistrationService {
|
|
12
|
-
private context;
|
|
13
|
-
private params;
|
|
14
|
-
private locator;
|
|
15
|
-
private developmentMode?;
|
|
16
12
|
builtDapps: Record<string, XyOsDappContext>;
|
|
17
13
|
dappRegistry: DappRegistry;
|
|
18
14
|
dappSeedPhraseRepository: DappSeedPhraseRepository;
|
|
@@ -20,9 +16,13 @@ export declare class DappRegistrationService {
|
|
|
20
16
|
registeredAccessDappSets: Set<RegisteredDappSetResult>;
|
|
21
17
|
registeredDappSets: Set<RegisteredDappSetResult>;
|
|
22
18
|
registeredExposedDappSets: Set<RegisteredDappSetResult>;
|
|
19
|
+
private context;
|
|
23
20
|
private dappAccessRequestConnection;
|
|
21
|
+
private developmentMode?;
|
|
24
22
|
private exposeDappRequestConnection;
|
|
25
|
-
|
|
23
|
+
private locator;
|
|
24
|
+
private params;
|
|
25
|
+
constructor(context: XyOsContext, params?: DappRegistrationServiceParams, locator?: ModuleFactoryLocatorInstance, developmentMode?: boolean);
|
|
26
26
|
buildDapp(manifest: DappPackageManifestPayload, dappId?: string, name?: string): Promise<XyOsDappContext>;
|
|
27
27
|
getParamsForRegisteredDapp(dappId: string): DappParams;
|
|
28
28
|
start(): Promise<DappRegistrationResults>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DappRegistrationService.d.ts","sourceRoot":"","sources":["../../../src/registration/DappRegistrationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DappRegistrationService.d.ts","sourceRoot":"","sources":["../../../src/registration/DappRegistrationService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,EACV,0BAA0B,EAC1B,UAAU,EACV,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,EACX,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAa9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACtC,YAAY,EAAE,kBAAkB,EAAE,CAAA;CACnC;AAED,qBAAa,uBAAuB;IAElC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAK;IAEhD,YAAY,EAAE,YAAY,CAAA;IAC1B,wBAAwB,EAAE,wBAAwB,CAAA;IAClD,iBAAiB,EAAE,iBAAiB,CAAA;IAGpC,wBAAwB,EAAE,GAAG,CAAC,uBAAuB,CAAC,CAAY;IAGlE,kBAAkB,EAAE,GAAG,CAAC,uBAAuB,CAAC,CAAY;IAG5D,yBAAyB,EAAE,GAAG,CAAC,uBAAuB,CAAC,CAAY;IAEnE,OAAO,CAAC,OAAO,CAAa;IAE5B,OAAO,CAAC,2BAA2B,CAAgC;IACnE,OAAO,CAAC,eAAe,CAAC,CAAS;IAEjC,OAAO,CAAC,2BAA2B,CAAgC;IAEnE,OAAO,CAAC,OAAO,CAA8B;IAE7C,OAAO,CAAC,MAAM,CAA+B;gBAG3C,OAAO,EAAE,WAAW,EACpB,MAAM,CAAC,EAAE,6BAA6B,EACtC,OAAO,GAAE,4BAAyD,EAClE,eAAe,CAAC,EAAE,OAAO;IAuBrB,SAAS,CACb,QAAQ,EAAE,0BAA0B,EACpC,MAAM,SAAsD,EAC5D,IAAI,SAA4D,GAC/D,OAAO,CAAC,eAAe,CAAC;IAY3B,0BAA0B,CAAC,MAAM,EAAE,MAAM;IAInC,KAAK,IAAI,OAAO,CAAC,uBAAuB,CAAC;IA8B/C,OAAO,CAAC,qBAAqB;IAK7B;;;OAGG;IACH,OAAO,CAAC,OAAO;YAID,wBAAwB;CAuBvC"}
|
|
@@ -6,8 +6,8 @@ export type DappRegisteredId = string;
|
|
|
6
6
|
* Manage Dapp Registration
|
|
7
7
|
*/
|
|
8
8
|
export declare class DappRegistry {
|
|
9
|
-
private dappSeedPhraseRepository;
|
|
10
9
|
private dappRegistry;
|
|
10
|
+
private dappSeedPhraseRepository;
|
|
11
11
|
constructor(dappSeedPhraseRepository: DappSeedPhraseRepository);
|
|
12
12
|
/**
|
|
13
13
|
* Register a Dapp with window manager and if successful, return its id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DappRegistry.d.ts","sourceRoot":"","sources":["../../../src/registration/DappRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAGV,cAAc,EAEd,gBAAgB,EAEjB,MAAM,uBAAuB,CAAA;AAQ9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAQlE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAErC;;GAEG;AACH,qBAAa,YAAY;
|
|
1
|
+
{"version":3,"file":"DappRegistry.d.ts","sourceRoot":"","sources":["../../../src/registration/DappRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAGV,cAAc,EAEd,gBAAgB,EAEjB,MAAM,uBAAuB,CAAA;AAQ9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAQlE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAErC;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,YAAY,CAAmD;IACvE,OAAO,CAAC,wBAAwB,CAA0B;gBAE9C,wBAAwB,EAAE,wBAAwB;IAI9D;;;;;QAKI;IACE,YAAY,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAiD3E;;;;OAIG;IACH,cAAc,CAAC,MAAM,EAAE,IAAI;IAI3B,OAAO,CAAC,qBAAqB;YAaf,0BAA0B;CAgBzC"}
|
|
@@ -234,6 +234,7 @@ var initializeXns = async (xnsNode) => {
|
|
|
234
234
|
|
|
235
235
|
// src/lib/NameTransforms.ts
|
|
236
236
|
var NameTransforms = class _NameTransforms {
|
|
237
|
+
value;
|
|
237
238
|
constructor(value) {
|
|
238
239
|
this.value = value;
|
|
239
240
|
}
|
|
@@ -445,6 +446,7 @@ var IntentArchivistModuleName = "IntentArchivist";
|
|
|
445
446
|
var IntentArchivistPayloadDivinerModuleName = "IntentArchivistPayloadDiviner";
|
|
446
447
|
var DappArchivistPayloadDivinerModuleName = "DappArchivistPayloadDiviner";
|
|
447
448
|
var DappCallerBase = class {
|
|
449
|
+
context;
|
|
448
450
|
constructor(context) {
|
|
449
451
|
this.context = context;
|
|
450
452
|
}
|
|
@@ -554,6 +556,7 @@ var DappsArchivistPayloadDivinerModuleName = "DappsArchivistPayloadDiviner";
|
|
|
554
556
|
var DappsArchivistPayloadDevelopmentDivinerModuleName = `${DappsArchivistPayloadDivinerModuleName}Development`;
|
|
555
557
|
var RegisteredDappInterfacesArchivistModuleName = "RegisteredDappInterfacesArchivist";
|
|
556
558
|
var OsCallerBase = class {
|
|
559
|
+
context;
|
|
557
560
|
constructor(context) {
|
|
558
561
|
this.context = context;
|
|
559
562
|
}
|
|
@@ -658,6 +661,12 @@ var SystemDappQueries = {
|
|
|
658
661
|
|
|
659
662
|
// src/system/ManageSystemDapps.ts
|
|
660
663
|
var ManageSystemDapps = class extends OsCallerBase {
|
|
664
|
+
defaultSystemDappParams;
|
|
665
|
+
defaultSystemDapps;
|
|
666
|
+
defaultSystemNames;
|
|
667
|
+
developmentMode;
|
|
668
|
+
locator;
|
|
669
|
+
onErrorCallbacks = [];
|
|
661
670
|
constructor(context, defaultSystemNames, defaultSystemDapps, defaultSystemDappParams, locator, developmentMode) {
|
|
662
671
|
super(context);
|
|
663
672
|
this.defaultSystemNames = defaultSystemNames;
|
|
@@ -666,7 +675,6 @@ var ManageSystemDapps = class extends OsCallerBase {
|
|
|
666
675
|
this.locator = locator;
|
|
667
676
|
this.developmentMode = developmentMode;
|
|
668
677
|
}
|
|
669
|
-
onErrorCallbacks = [];
|
|
670
678
|
/**
|
|
671
679
|
* Add a callback to listen for errors throwing during system dapp registration
|
|
672
680
|
* @param {ErrorListener} errorListener
|
|
@@ -761,14 +769,15 @@ import { DappWalletSeedPhraseSchema } from "@xyo-network/os-model";
|
|
|
761
769
|
import { HDWallet } from "@xyo-network/wallet";
|
|
762
770
|
import { v4 as uuid2 } from "uuid";
|
|
763
771
|
var DappSeedPhraseRepository = class extends OsCallerBase {
|
|
764
|
-
|
|
765
|
-
super(xyOs);
|
|
766
|
-
this.allowedNames = allowedNames;
|
|
767
|
-
}
|
|
772
|
+
allowedNames;
|
|
768
773
|
// record of all dapps that have requested a seed phrase with the OS
|
|
769
774
|
dappIdRepository = /* @__PURE__ */ new Map();
|
|
770
775
|
// record of all walletIds that have been issued to registered dapps
|
|
771
776
|
walletIdRepository = /* @__PURE__ */ new Map();
|
|
777
|
+
constructor(xyOs, allowedNames) {
|
|
778
|
+
super(xyOs);
|
|
779
|
+
this.allowedNames = allowedNames;
|
|
780
|
+
}
|
|
772
781
|
async add(dappId) {
|
|
773
782
|
const archivist = await this.getDappsArchivist();
|
|
774
783
|
const seedPhrase = this.newPhrase();
|
|
@@ -1145,10 +1154,11 @@ var getNodeToTest = async (manifestToTest, dappParams) => {
|
|
|
1145
1154
|
|
|
1146
1155
|
// src/registration/DappRegistry.ts
|
|
1147
1156
|
var DappRegistry = class {
|
|
1157
|
+
dappRegistry = /* @__PURE__ */ new Map();
|
|
1158
|
+
dappSeedPhraseRepository;
|
|
1148
1159
|
constructor(dappSeedPhraseRepository) {
|
|
1149
1160
|
this.dappSeedPhraseRepository = dappSeedPhraseRepository;
|
|
1150
1161
|
}
|
|
1151
|
-
dappRegistry = /* @__PURE__ */ new Map();
|
|
1152
1162
|
/**
|
|
1153
1163
|
* Register a Dapp with window manager and if successful, return its id
|
|
1154
1164
|
*
|
|
@@ -1250,13 +1260,30 @@ var DappRegistry = class {
|
|
|
1250
1260
|
|
|
1251
1261
|
// src/registration/DappRegistrationService.ts
|
|
1252
1262
|
var DappRegistrationService = class {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1263
|
+
// Dapps that have been built with their own context
|
|
1264
|
+
builtDapps = {};
|
|
1265
|
+
dappRegistry;
|
|
1266
|
+
dappSeedPhraseRepository;
|
|
1267
|
+
manageSystemDapps;
|
|
1268
|
+
// Dapps that have been registered with dappAccessRequests
|
|
1269
|
+
registeredAccessDappSets = /* @__PURE__ */ new Set();
|
|
1270
|
+
// Dapps that have been registered with the dapp registry
|
|
1271
|
+
registeredDappSets = /* @__PURE__ */ new Set();
|
|
1272
|
+
// Dapps that have been registered with exposeDappRequests
|
|
1273
|
+
registeredExposedDappSets = /* @__PURE__ */ new Set();
|
|
1274
|
+
context;
|
|
1275
|
+
dappAccessRequestConnection = dappAccessRequestConnection();
|
|
1276
|
+
developmentMode;
|
|
1277
|
+
exposeDappRequestConnection = exposeDappRequestConnection();
|
|
1278
|
+
locator;
|
|
1279
|
+
params;
|
|
1280
|
+
constructor(context, params, locator = new ModuleFactoryLocator5(), developmentMode) {
|
|
1258
1281
|
this.context = context;
|
|
1259
|
-
this.params = params
|
|
1282
|
+
this.params = params ?? {
|
|
1283
|
+
dappNames: [],
|
|
1284
|
+
dappParams: {},
|
|
1285
|
+
dappPayloads: []
|
|
1286
|
+
};
|
|
1260
1287
|
this.locator = locator;
|
|
1261
1288
|
this.developmentMode = developmentMode;
|
|
1262
1289
|
this.manageSystemDapps = new ManageSystemDapps(
|
|
@@ -1271,19 +1298,6 @@ var DappRegistrationService = class {
|
|
|
1271
1298
|
this.dappRegistry = new DappRegistry(this.dappSeedPhraseRepository);
|
|
1272
1299
|
this.addConnectionRequests();
|
|
1273
1300
|
}
|
|
1274
|
-
// Dapps that have been built with their own context
|
|
1275
|
-
builtDapps = {};
|
|
1276
|
-
dappRegistry;
|
|
1277
|
-
dappSeedPhraseRepository;
|
|
1278
|
-
manageSystemDapps;
|
|
1279
|
-
// Dapps that have been registered with dappAccessRequests
|
|
1280
|
-
registeredAccessDappSets = /* @__PURE__ */ new Set();
|
|
1281
|
-
// Dapps that have been registered with the dapp registry
|
|
1282
|
-
registeredDappSets = /* @__PURE__ */ new Set();
|
|
1283
|
-
// Dapps that have been registered with exposeDappRequests
|
|
1284
|
-
registeredExposedDappSets = /* @__PURE__ */ new Set();
|
|
1285
|
-
dappAccessRequestConnection = dappAccessRequestConnection();
|
|
1286
|
-
exposeDappRequestConnection = exposeDappRequestConnection();
|
|
1287
1301
|
async buildDapp(manifest, dappId = NameTransforms.slug(manifest.nodes[0]?.config.name), name = NameTransforms.moduleName(manifest.nodes[0]?.config.name)) {
|
|
1288
1302
|
const dapp = new XyOsDapp({
|
|
1289
1303
|
dapp: { id: dappId, name },
|
|
@@ -1561,14 +1575,16 @@ import { asArchivistInstance as asArchivistInstance4 } from "@xyo-network/archiv
|
|
|
1561
1575
|
import { asAttachableNodeInstance as asAttachableNodeInstance2 } from "@xyo-network/node-model";
|
|
1562
1576
|
import { v4 as uuid3 } from "uuid";
|
|
1563
1577
|
var NodeAdapterBase = class extends BaseEmitter4 {
|
|
1578
|
+
initialized = false;
|
|
1579
|
+
_id = "";
|
|
1580
|
+
driverName;
|
|
1581
|
+
kernel;
|
|
1564
1582
|
constructor(kernel, driverName) {
|
|
1565
1583
|
super({});
|
|
1584
|
+
this._id = uuid3();
|
|
1566
1585
|
this.kernel = kernel;
|
|
1567
1586
|
this.driverName = driverName;
|
|
1568
|
-
this._id = uuid3();
|
|
1569
1587
|
}
|
|
1570
|
-
initialized = false;
|
|
1571
|
-
_id = "";
|
|
1572
1588
|
get id() {
|
|
1573
1589
|
return assertEx9(this._id, () => "NodeAdapterBase id not initialized");
|
|
1574
1590
|
}
|