@xyo-network/react-standard-node 3.0.1 → 3.0.3
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/browser/components/ActiveStandardNode.d.ts +7 -0
- package/dist/browser/components/ActiveStandardNode.d.ts.map +1 -0
- package/dist/browser/components/index.d.ts +2 -0
- package/dist/browser/components/index.d.ts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/Context.d.ts +3 -0
- package/dist/browser/contexts/StandardRemoteNodes/Context.d.ts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/Providers.d.ts +11 -0
- package/dist/browser/contexts/StandardRemoteNodes/Providers.d.ts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/State.d.ts +8 -0
- package/dist/browser/contexts/StandardRemoteNodes/State.d.ts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/index.d.ts +5 -0
- package/dist/browser/contexts/StandardRemoteNodes/index.d.ts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/use.d.ts +2 -0
- package/dist/browser/contexts/StandardRemoteNodes/use.d.ts.map +1 -0
- package/dist/browser/contexts/index.d.ts +2 -0
- package/dist/browser/contexts/index.d.ts.map +1 -0
- package/dist/browser/hooks/index.d.ts +2 -0
- package/dist/browser/hooks/index.d.ts.map +1 -0
- package/dist/browser/hooks/useActiveNodeAddress.d.ts +2 -0
- package/dist/browser/hooks/useActiveNodeAddress.d.ts.map +1 -0
- package/dist/browser/index.d.ts +5 -331
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/lib/Builders/MemoryNodeBuilder.d.ts +86 -0
- package/dist/browser/lib/Builders/MemoryNodeBuilder.d.ts.map +1 -0
- package/dist/browser/lib/Builders/SentinelBuilder.d.ts +110 -0
- package/dist/browser/lib/Builders/SentinelBuilder.d.ts.map +1 -0
- package/dist/browser/lib/Builders/StorageArchivistBuilder.d.ts +90 -0
- package/dist/browser/lib/Builders/StorageArchivistBuilder.d.ts.map +1 -0
- package/dist/browser/lib/Builders/index.d.ts +4 -0
- package/dist/browser/lib/Builders/index.d.ts.map +1 -0
- package/dist/browser/lib/ModuleAccountPaths.d.ts +4 -0
- package/dist/browser/lib/ModuleAccountPaths.d.ts.map +1 -0
- package/dist/browser/lib/ModuleNames.d.ts +3 -0
- package/dist/browser/lib/ModuleNames.d.ts.map +1 -0
- package/dist/browser/lib/buildNodes.d.ts +4 -0
- package/dist/browser/lib/buildNodes.d.ts.map +1 -0
- package/dist/browser/lib/index.d.ts +5 -0
- package/dist/browser/lib/index.d.ts.map +1 -0
- package/package.json +67 -61
- package/src/components/ActiveStandardNode.tsx +1 -1
- package/src/contexts/StandardRemoteNodes/Context.ts +1 -1
- package/src/contexts/StandardRemoteNodes/Providers.tsx +14 -8
- package/src/contexts/StandardRemoteNodes/State.ts +3 -3
- package/src/lib/Builders/MemoryNodeBuilder.ts +14 -8
- package/src/lib/Builders/SentinelBuilder.ts +4 -3
- package/src/lib/Builders/StorageArchivistBuilder.ts +6 -4
- package/src/lib/buildNodes.ts +2 -2
- package/xy.config.ts +2 -4
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { AccountInstance } from '@xyo-network/account-model';
|
|
2
|
+
import type { AttachableModuleInstance } from '@xyo-network/module-model';
|
|
3
|
+
import { MemoryNode } from '@xyo-network/node-memory';
|
|
4
|
+
import type { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin';
|
|
5
|
+
import type { SentinelConfig } from '@xyo-network/sentinel-model';
|
|
6
|
+
import type { AttachableWitnessInstance } from '@xyo-network/witness-model';
|
|
7
|
+
export interface MemoryNodeBuilderConfig {
|
|
8
|
+
name?: string;
|
|
9
|
+
node?: MemoryNode;
|
|
10
|
+
}
|
|
11
|
+
export declare class MemoryNodeBuilder {
|
|
12
|
+
private _node;
|
|
13
|
+
get node(): MemoryNode<import("@xylabs/object").BaseParamsFields & {
|
|
14
|
+
account?: AccountInstance | "random";
|
|
15
|
+
addToResolvers?: boolean;
|
|
16
|
+
additionalSigners?: AccountInstance[];
|
|
17
|
+
allowNameResolution?: boolean;
|
|
18
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
19
|
+
archivist?: string;
|
|
20
|
+
} & {
|
|
21
|
+
schema: "network.xyo.node.config";
|
|
22
|
+
}, "schema"> & {
|
|
23
|
+
schema: string;
|
|
24
|
+
};
|
|
25
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
26
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
27
|
+
}, import("@xyo-network/node-model").NodeModuleEventData>;
|
|
28
|
+
static create({ name, node }: MemoryNodeBuilderConfig, account?: AccountInstance): Promise<MemoryNodeBuilder>;
|
|
29
|
+
addArchivist(account: AccountInstance, moduleName?: string, namespace?: string): Promise<void>;
|
|
30
|
+
addArchivistMemory(moduleName?: string, account?: AccountInstance): Promise<void>;
|
|
31
|
+
addArchivistStorage(account: AccountInstance, moduleName?: string, namespace?: string): Promise<void>;
|
|
32
|
+
addBridge(apiDomain: string, moduleName?: string, account?: AccountInstance): Promise<void>;
|
|
33
|
+
addSentinel(config: SentinelConfig, account: AccountInstance): Promise<import("@xyo-network/sentinel-memory").MemorySentinel<import("@xylabs/object").BaseParamsFields & {
|
|
34
|
+
account?: AccountInstance | "random";
|
|
35
|
+
addToResolvers?: boolean;
|
|
36
|
+
additionalSigners?: AccountInstance[];
|
|
37
|
+
allowNameResolution?: boolean;
|
|
38
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
39
|
+
automations?: import("@xyo-network/sentinel-model").SentinelAutomationPayload[];
|
|
40
|
+
schema: "network.xyo.sentinel.config";
|
|
41
|
+
synchronous?: boolean;
|
|
42
|
+
tasks: import("@xyo-network/sentinel-model").Task[];
|
|
43
|
+
throwErrors?: boolean;
|
|
44
|
+
}, "schema"> & {
|
|
45
|
+
schema: "network.xyo.sentinel.config";
|
|
46
|
+
}, "schema"> & {
|
|
47
|
+
schema: string;
|
|
48
|
+
};
|
|
49
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
50
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
51
|
+
}, import("@xyo-network/sentinel-model").SentinelModuleEventData<import("@xyo-network/sentinel-model").SentinelInstance<import("@xylabs/object").BaseParamsFields & {
|
|
52
|
+
account?: AccountInstance | "random";
|
|
53
|
+
addToResolvers?: boolean;
|
|
54
|
+
additionalSigners?: AccountInstance[];
|
|
55
|
+
allowNameResolution?: boolean;
|
|
56
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
57
|
+
automations?: import("@xyo-network/sentinel-model").SentinelAutomationPayload[];
|
|
58
|
+
schema: "network.xyo.sentinel.config";
|
|
59
|
+
synchronous?: boolean;
|
|
60
|
+
tasks: import("@xyo-network/sentinel-model").Task[];
|
|
61
|
+
throwErrors?: boolean;
|
|
62
|
+
}, "schema"> & {
|
|
63
|
+
schema: "network.xyo.sentinel.config";
|
|
64
|
+
}, "schema"> & {
|
|
65
|
+
schema: string;
|
|
66
|
+
};
|
|
67
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
68
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
69
|
+
}, import("@xyo-network/sentinel-model").SentinelModuleEventData<import("@xyo-network/module-model").Module<import("@xylabs/object").BaseParamsFields & {
|
|
70
|
+
account?: AccountInstance | "random";
|
|
71
|
+
addToResolvers?: boolean;
|
|
72
|
+
additionalSigners?: AccountInstance[];
|
|
73
|
+
allowNameResolution?: boolean;
|
|
74
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
75
|
+
schema: "network.xyo.module.config";
|
|
76
|
+
}, "schema"> & {
|
|
77
|
+
schema: string;
|
|
78
|
+
};
|
|
79
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
80
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
81
|
+
}, import("@xyo-network/module-model").ModuleEventData<object>>>>>>>;
|
|
82
|
+
addWitnesses(pluginSetResolver: PayloadSetPluginResolver, witnesses?: (() => Promise<AttachableWitnessInstance>)[]): Promise<void>;
|
|
83
|
+
attach(mod: AttachableModuleInstance, external?: boolean, safeAttach?: boolean): Promise<void>;
|
|
84
|
+
private witnessCleanup;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=MemoryNodeBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoryNodeBuilder.d.ts","sourceRoot":"","sources":["../../../../src/lib/Builders/MemoryNodeBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAIjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AAE9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAiB,MAAM,4BAA4B,CAAA;AAK1F,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,KAAK,CAAwB;IAErC,IAAI,IAAI;;;;;;;;;;;;;;8DAEP;WAEY,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAY7G,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAI9E,kBAAkB,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe;IAOjE,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAOrF,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,SAAqB,EAAE,OAAO,CAAC,EAAE,eAAe;IAcvF,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM5D,YAAY,CAAC,iBAAiB,EAAE,wBAAwB,EAAE,SAAS,GAAE,CAAC,MAAM,OAAO,CAAC,yBAAyB,CAAC,CAAC,EAAO;IAkBtH,MAAM,CAAC,GAAG,EAAE,wBAAwB,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO;YAgBtE,cAAc;CAM7B"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { AccountInstance } from '@xyo-network/account-model';
|
|
2
|
+
import { MemorySentinel } from '@xyo-network/sentinel-memory';
|
|
3
|
+
import type { SentinelConfig } from '@xyo-network/sentinel-model';
|
|
4
|
+
export declare class SentinelBuilder {
|
|
5
|
+
private config;
|
|
6
|
+
private account;
|
|
7
|
+
private _sentinel;
|
|
8
|
+
protected constructor(config: SentinelConfig, account: AccountInstance);
|
|
9
|
+
get sentinel(): MemorySentinel<import("@xylabs/object").BaseParamsFields & {
|
|
10
|
+
account?: AccountInstance | "random";
|
|
11
|
+
addToResolvers?: boolean;
|
|
12
|
+
additionalSigners?: AccountInstance[];
|
|
13
|
+
allowNameResolution?: boolean;
|
|
14
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
15
|
+
automations?: import("@xyo-network/sentinel-model").SentinelAutomationPayload[];
|
|
16
|
+
schema: "network.xyo.sentinel.config";
|
|
17
|
+
synchronous?: boolean;
|
|
18
|
+
tasks: import("@xyo-network/sentinel-model").Task[];
|
|
19
|
+
throwErrors?: boolean;
|
|
20
|
+
}, "schema"> & {
|
|
21
|
+
schema: "network.xyo.sentinel.config";
|
|
22
|
+
}, "schema"> & {
|
|
23
|
+
schema: string;
|
|
24
|
+
};
|
|
25
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
26
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
27
|
+
}, import("@xyo-network/sentinel-model").SentinelModuleEventData<import("@xyo-network/sentinel-model").SentinelInstance<import("@xylabs/object").BaseParamsFields & {
|
|
28
|
+
account?: AccountInstance | "random";
|
|
29
|
+
addToResolvers?: boolean;
|
|
30
|
+
additionalSigners?: AccountInstance[];
|
|
31
|
+
allowNameResolution?: boolean;
|
|
32
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
33
|
+
automations?: import("@xyo-network/sentinel-model").SentinelAutomationPayload[];
|
|
34
|
+
schema: "network.xyo.sentinel.config";
|
|
35
|
+
synchronous?: boolean;
|
|
36
|
+
tasks: import("@xyo-network/sentinel-model").Task[];
|
|
37
|
+
throwErrors?: boolean;
|
|
38
|
+
}, "schema"> & {
|
|
39
|
+
schema: "network.xyo.sentinel.config";
|
|
40
|
+
}, "schema"> & {
|
|
41
|
+
schema: string;
|
|
42
|
+
};
|
|
43
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
44
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
45
|
+
}, import("@xyo-network/sentinel-model").SentinelModuleEventData<import("@xyo-network/module-model").Module<import("@xylabs/object").BaseParamsFields & {
|
|
46
|
+
account?: AccountInstance | "random";
|
|
47
|
+
addToResolvers?: boolean;
|
|
48
|
+
additionalSigners?: AccountInstance[];
|
|
49
|
+
allowNameResolution?: boolean;
|
|
50
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
51
|
+
schema: "network.xyo.module.config";
|
|
52
|
+
}, "schema"> & {
|
|
53
|
+
schema: string;
|
|
54
|
+
};
|
|
55
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
56
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
57
|
+
}, import("@xyo-network/module-model").ModuleEventData<object>>>>>>;
|
|
58
|
+
static create(config: SentinelConfig, account: AccountInstance): Promise<SentinelBuilder>;
|
|
59
|
+
buildSentinel(): Promise<MemorySentinel<import("@xylabs/object").BaseParamsFields & {
|
|
60
|
+
account?: AccountInstance | "random";
|
|
61
|
+
addToResolvers?: boolean;
|
|
62
|
+
additionalSigners?: AccountInstance[];
|
|
63
|
+
allowNameResolution?: boolean;
|
|
64
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
65
|
+
automations?: import("@xyo-network/sentinel-model").SentinelAutomationPayload[];
|
|
66
|
+
schema: "network.xyo.sentinel.config";
|
|
67
|
+
synchronous?: boolean;
|
|
68
|
+
tasks: import("@xyo-network/sentinel-model").Task[];
|
|
69
|
+
throwErrors?: boolean;
|
|
70
|
+
}, "schema"> & {
|
|
71
|
+
schema: "network.xyo.sentinel.config";
|
|
72
|
+
}, "schema"> & {
|
|
73
|
+
schema: string;
|
|
74
|
+
};
|
|
75
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
76
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
77
|
+
}, import("@xyo-network/sentinel-model").SentinelModuleEventData<import("@xyo-network/sentinel-model").SentinelInstance<import("@xylabs/object").BaseParamsFields & {
|
|
78
|
+
account?: AccountInstance | "random";
|
|
79
|
+
addToResolvers?: boolean;
|
|
80
|
+
additionalSigners?: AccountInstance[];
|
|
81
|
+
allowNameResolution?: boolean;
|
|
82
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
83
|
+
automations?: import("@xyo-network/sentinel-model").SentinelAutomationPayload[];
|
|
84
|
+
schema: "network.xyo.sentinel.config";
|
|
85
|
+
synchronous?: boolean;
|
|
86
|
+
tasks: import("@xyo-network/sentinel-model").Task[];
|
|
87
|
+
throwErrors?: boolean;
|
|
88
|
+
}, "schema"> & {
|
|
89
|
+
schema: "network.xyo.sentinel.config";
|
|
90
|
+
}, "schema"> & {
|
|
91
|
+
schema: string;
|
|
92
|
+
};
|
|
93
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
94
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
95
|
+
}, import("@xyo-network/sentinel-model").SentinelModuleEventData<import("@xyo-network/module-model").Module<import("@xylabs/object").BaseParamsFields & {
|
|
96
|
+
account?: AccountInstance | "random";
|
|
97
|
+
addToResolvers?: boolean;
|
|
98
|
+
additionalSigners?: AccountInstance[];
|
|
99
|
+
allowNameResolution?: boolean;
|
|
100
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
101
|
+
schema: "network.xyo.module.config";
|
|
102
|
+
}, "schema"> & {
|
|
103
|
+
schema: string;
|
|
104
|
+
};
|
|
105
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
106
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
107
|
+
}, import("@xyo-network/module-model").ModuleEventData<object>>>>>>>;
|
|
108
|
+
private buildParams;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=SentinelBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SentinelBuilder.d.ts","sourceRoot":"","sources":["../../../../src/lib/Builders/SentinelBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAEjE,qBAAa,eAAe;IAIxB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IAJjB,OAAO,CAAC,SAAS,CAA4B;IAE7C,SAAS,aACC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,eAAe;IAKlC,IAAI,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEAEX;WAEY,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAMzF,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKnB,OAAO,CAAC,WAAW;CAMpB"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { AccountInstance } from '@xyo-network/account-model';
|
|
2
|
+
import type { StorageArchivistConfig } from '@xyo-network/archivist-storage';
|
|
3
|
+
import { StorageArchivist, StorageArchivistConfigSchema } from '@xyo-network/archivist-storage';
|
|
4
|
+
import type { MemoryNode } from '@xyo-network/node-memory';
|
|
5
|
+
export interface ArchivistBuilderConfig {
|
|
6
|
+
name?: string;
|
|
7
|
+
namespace?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class StorageArchivistBuilder {
|
|
10
|
+
private config;
|
|
11
|
+
private account;
|
|
12
|
+
private node?;
|
|
13
|
+
private _archivist;
|
|
14
|
+
private remoteArchivist;
|
|
15
|
+
protected constructor(config: ArchivistBuilderConfig, account: AccountInstance, node?: MemoryNode | undefined);
|
|
16
|
+
get archivist(): StorageArchivist<import("@xylabs/object").BaseParamsFields & {
|
|
17
|
+
account?: AccountInstance | "random";
|
|
18
|
+
addToResolvers?: boolean;
|
|
19
|
+
additionalSigners?: AccountInstance[];
|
|
20
|
+
allowNameResolution?: boolean;
|
|
21
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
22
|
+
parents?: import("@xyo-network/archivist-model").ArchivistParents;
|
|
23
|
+
requireAllParents?: boolean;
|
|
24
|
+
schema: "network.xyo.archivist.storage.config";
|
|
25
|
+
storage?: import("@xyo-network/archivist-model").ArchivistStorage;
|
|
26
|
+
storeParentReads?: boolean;
|
|
27
|
+
} & {
|
|
28
|
+
maxEntries?: number;
|
|
29
|
+
maxEntrySize?: number;
|
|
30
|
+
namespace?: string;
|
|
31
|
+
schema: StorageArchivistConfigSchema;
|
|
32
|
+
type?: "local" | "session" | "page";
|
|
33
|
+
}, "schema"> & {
|
|
34
|
+
schema: "network.xyo.archivist.storage.config";
|
|
35
|
+
}, "schema"> & {
|
|
36
|
+
schema: string;
|
|
37
|
+
};
|
|
38
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
39
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
40
|
+
}, import("@xyo-network/archivist-model").ArchivistModuleEventData>;
|
|
41
|
+
static create(config: ArchivistBuilderConfig, account: AccountInstance, node: MemoryNode): Promise<StorageArchivistBuilder>;
|
|
42
|
+
buildArchivist(): Promise<StorageArchivist<import("@xylabs/object").BaseParamsFields & {
|
|
43
|
+
account?: AccountInstance | "random";
|
|
44
|
+
addToResolvers?: boolean;
|
|
45
|
+
additionalSigners?: AccountInstance[];
|
|
46
|
+
allowNameResolution?: boolean;
|
|
47
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
48
|
+
parents?: import("@xyo-network/archivist-model").ArchivistParents;
|
|
49
|
+
requireAllParents?: boolean;
|
|
50
|
+
schema: "network.xyo.archivist.storage.config";
|
|
51
|
+
storage?: import("@xyo-network/archivist-model").ArchivistStorage;
|
|
52
|
+
storeParentReads?: boolean;
|
|
53
|
+
} & {
|
|
54
|
+
maxEntries?: number;
|
|
55
|
+
maxEntrySize?: number;
|
|
56
|
+
namespace?: string;
|
|
57
|
+
schema: StorageArchivistConfigSchema;
|
|
58
|
+
type?: "local" | "session" | "page";
|
|
59
|
+
}, "schema"> & {
|
|
60
|
+
schema: "network.xyo.archivist.storage.config";
|
|
61
|
+
}, "schema"> & {
|
|
62
|
+
schema: string;
|
|
63
|
+
};
|
|
64
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
65
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
66
|
+
}, import("@xyo-network/archivist-model").ArchivistModuleEventData>>;
|
|
67
|
+
buildConfig(): StorageArchivistConfig;
|
|
68
|
+
findParentArchivist(): Promise<import("@xyo-network/archivist-model").ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
|
|
69
|
+
account?: import("@xyo-network/account-model").AccountInstance | "random";
|
|
70
|
+
addToResolvers?: boolean;
|
|
71
|
+
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
72
|
+
allowNameResolution?: boolean;
|
|
73
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
|
|
74
|
+
parents?: import("@xyo-network/archivist-model").ArchivistParents;
|
|
75
|
+
requireAllParents?: boolean;
|
|
76
|
+
schema: "network.xyo.archivist.config";
|
|
77
|
+
storage?: import("@xyo-network/archivist-model").ArchivistStorage;
|
|
78
|
+
storeParentReads?: boolean;
|
|
79
|
+
}, "schema"> & {
|
|
80
|
+
schema: "network.xyo.archivist.config";
|
|
81
|
+
}, "schema"> & {
|
|
82
|
+
schema: string;
|
|
83
|
+
};
|
|
84
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
85
|
+
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
86
|
+
}, import("@xyo-network/archivist-model").ArchivistModuleEventData, {
|
|
87
|
+
schema: string;
|
|
88
|
+
} & import("@xyo-network/payload-model").PayloadFields> | undefined>;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=StorageArchivistBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageArchivistBuilder.d.ts","sourceRoot":"","sources":["../../../../src/lib/Builders/StorageArchivistBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAI1D,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AACD,qBAAa,uBAAuB;IAKhC,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,IAAI,CAAC;IANf,OAAO,CAAC,UAAU,CAA8B;IAChD,OAAO,CAAC,eAAe,CAA6B;IAEpD,SAAS,aACC,MAAM,EAAE,sBAAsB,EAC9B,OAAO,EAAE,eAAe,EACxB,IAAI,CAAC,EAAE,UAAU,YAAA;IAG3B,IAAI,SAAS;;;;;;;;;;;;;;;;;;;;;;;;wEAEZ;WAEY,MAAM,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAO3H,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;IAKpB,WAAW,IAAI,sBAAsB;IAc/B,mBAAmB;yBAamlK,4BAA4B;;mCAAmG,4BAA4B;;uBAAmF,4BAA4B,wBAAwB,4BAA4B,8BAA8B,2BAA2B,iCAAiC,2BAA2B,8BAA8B,4BAA4B,wBAAwB,4BAA4B,8BAA8B,2BAA2B,iCAAiC,2BAA2B;mBAA4C,CAAC,SAAS,8BAAa;6BAAiD,CAAC;;mBAAkF,CAAC,SAAS,8BAAa;4BAAgD,CAAC;;;;;;;8CAAsP,2BAA2B;;;;CADnyM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Builders/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModuleAccountPaths.d.ts","sourceRoot":"","sources":["../../../src/lib/ModuleAccountPaths.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,OAAO,CAAA;AAExC,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIxD,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAajF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModuleNames.d.ts","sourceRoot":"","sources":["../../../src/lib/ModuleNames.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,eAAe,CAAA;AAEtC,eAAO,MAAM,oBAAoB,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MemoryNode } from '@xyo-network/node-memory';
|
|
2
|
+
import type { WalletInstance } from '@xyo-network/wallet-model';
|
|
3
|
+
export declare const BuildStandardNodes: (wallet: WalletInstance, onNodeBuilt?: (node: MemoryNode) => void) => Promise<MemoryNode[]>;
|
|
4
|
+
//# sourceMappingURL=buildNodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildNodes.d.ts","sourceRoot":"","sources":["../../../src/lib/buildNodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAmB/D,eAAO,MAAM,kBAAkB,WAAkB,cAAc,gBAAgB,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,KAAG,OAAO,CAAC,UAAU,EAAE,CAwB/H,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,41 +1,80 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-standard-node",
|
|
3
|
+
"version": "3.0.3",
|
|
4
|
+
"description": "Common React library for all XYO projects that use React",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"xyo",
|
|
7
|
+
"utility",
|
|
8
|
+
"typescript",
|
|
9
|
+
"react"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://xyo.network",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues",
|
|
14
|
+
"email": "support@xyo.network"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "LGPL-3.0-only",
|
|
3
21
|
"author": {
|
|
4
|
-
"email": "support@xyo.network",
|
|
5
22
|
"name": "XYO Development Team",
|
|
23
|
+
"email": "support@xyo.network",
|
|
6
24
|
"url": "https://xyo.network"
|
|
7
25
|
},
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"type": "module",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./dist/browser/index.d.ts",
|
|
32
|
+
"default": "./dist/browser/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"types": "./dist/browser/index.d.ts",
|
|
35
|
+
"default": "./dist/browser/index.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./package.json": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
"module": "dist/browser/index.mjs",
|
|
40
|
+
"types": "dist/browser/index.d.ts",
|
|
41
|
+
"scripts": {
|
|
42
|
+
"license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\"",
|
|
43
|
+
"lint-pkg": "npmPkgJsonLint ."
|
|
11
44
|
},
|
|
12
45
|
"dependencies": {
|
|
13
|
-
"@xylabs/hex": "^4.0.
|
|
14
|
-
"@xylabs/react-async-effect": "^4.0.
|
|
15
|
-
"@xylabs/react-promise": "^4.0.
|
|
16
|
-
"@xylabs/react-shared": "^4.0.
|
|
17
|
-
"@xyo-network/account-model": "^3.0.
|
|
18
|
-
"@xyo-network/archivist-memory": "^3.0.
|
|
19
|
-
"@xyo-network/archivist-model": "^3.0.
|
|
20
|
-
"@xyo-network/archivist-storage": "^3.0.
|
|
21
|
-
"@xyo-network/bridge-http": "^3.0.
|
|
22
|
-
"@xyo-network/module-model": "^3.0.
|
|
23
|
-
"@xyo-network/node-memory": "^3.0.
|
|
24
|
-
"@xyo-network/node-model": "^3.0.
|
|
25
|
-
"@xyo-network/payloadset-plugin": "^3.0.
|
|
26
|
-
"@xyo-network/react-network": "^3.0.
|
|
27
|
-
"@xyo-network/react-node": "^3.0.
|
|
28
|
-
"@xyo-network/react-shared": "^3.0.
|
|
29
|
-
"@xyo-network/react-wallet": "^3.0.
|
|
30
|
-
"@xyo-network/sentinel-memory": "^3.0.
|
|
31
|
-
"@xyo-network/sentinel-model": "^3.0.
|
|
32
|
-
"@xyo-network/wallet-model": "^3.0.
|
|
33
|
-
"@xyo-network/witness-model": "^3.0.
|
|
46
|
+
"@xylabs/hex": "^4.0.5",
|
|
47
|
+
"@xylabs/react-async-effect": "^4.0.3",
|
|
48
|
+
"@xylabs/react-promise": "^4.0.3",
|
|
49
|
+
"@xylabs/react-shared": "^4.0.3",
|
|
50
|
+
"@xyo-network/account-model": "^3.0.15",
|
|
51
|
+
"@xyo-network/archivist-memory": "^3.0.15",
|
|
52
|
+
"@xyo-network/archivist-model": "^3.0.15",
|
|
53
|
+
"@xyo-network/archivist-storage": "^3.0.15",
|
|
54
|
+
"@xyo-network/bridge-http": "^3.0.15",
|
|
55
|
+
"@xyo-network/module-model": "^3.0.15",
|
|
56
|
+
"@xyo-network/node-memory": "^3.0.15",
|
|
57
|
+
"@xyo-network/node-model": "^3.0.15",
|
|
58
|
+
"@xyo-network/payloadset-plugin": "^3.0.15",
|
|
59
|
+
"@xyo-network/react-network": "^3.0.3",
|
|
60
|
+
"@xyo-network/react-node": "^3.0.3",
|
|
61
|
+
"@xyo-network/react-shared": "^3.0.3",
|
|
62
|
+
"@xyo-network/react-wallet": "^3.0.3",
|
|
63
|
+
"@xyo-network/sentinel-memory": "^3.0.15",
|
|
64
|
+
"@xyo-network/sentinel-model": "^3.0.15",
|
|
65
|
+
"@xyo-network/wallet-model": "^3.0.15",
|
|
66
|
+
"@xyo-network/witness-model": "^3.0.15"
|
|
34
67
|
},
|
|
35
68
|
"devDependencies": {
|
|
69
|
+
"@mui/icons-material": "^5.16.7",
|
|
70
|
+
"@mui/material": "^5.16.7",
|
|
71
|
+
"@mui/styles": "^5.16.7",
|
|
36
72
|
"@storybook/react": "^8.2.9",
|
|
37
|
-
"@xylabs/ts-scripts-yarn3": "^4.0.
|
|
38
|
-
"@xylabs/tsconfig-react": "^4.0.
|
|
73
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.7",
|
|
74
|
+
"@xylabs/tsconfig-react": "^4.0.7",
|
|
75
|
+
"react": "^18.3.1",
|
|
76
|
+
"react-dom": "^18.3.1",
|
|
77
|
+
"storybook": "^8.2.9",
|
|
39
78
|
"typescript": "^5.5.4"
|
|
40
79
|
},
|
|
41
80
|
"peerDependencies": {
|
|
@@ -45,41 +84,8 @@
|
|
|
45
84
|
"react": "^18",
|
|
46
85
|
"react-dom": "^18"
|
|
47
86
|
},
|
|
48
|
-
"description": "Common React library for all XYO projects that use React",
|
|
49
|
-
"docs": "dist/docs.json",
|
|
50
|
-
"exports": {
|
|
51
|
-
".": {
|
|
52
|
-
"import": {
|
|
53
|
-
"types": "./dist/browser/index.d.ts",
|
|
54
|
-
"default": "./dist/browser/index.mjs"
|
|
55
|
-
},
|
|
56
|
-
"types": "./dist/browser/index.d.ts",
|
|
57
|
-
"default": "./dist/browser/index.mjs"
|
|
58
|
-
},
|
|
59
|
-
"./package.json": "./package.json"
|
|
60
|
-
},
|
|
61
|
-
"module": "dist/browser/index.mjs",
|
|
62
|
-
"homepage": "https://xyo.network",
|
|
63
|
-
"keywords": [
|
|
64
|
-
"xyo",
|
|
65
|
-
"utility",
|
|
66
|
-
"typescript",
|
|
67
|
-
"react"
|
|
68
|
-
],
|
|
69
|
-
"license": "LGPL-3.0-only",
|
|
70
87
|
"publishConfig": {
|
|
71
88
|
"access": "public"
|
|
72
89
|
},
|
|
73
|
-
"
|
|
74
|
-
"type": "git",
|
|
75
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
|
|
76
|
-
},
|
|
77
|
-
"scripts": {
|
|
78
|
-
"lint-pkg": "npmPkgJsonLint .",
|
|
79
|
-
"license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
|
|
80
|
-
},
|
|
81
|
-
"sideEffects": false,
|
|
82
|
-
"types": "dist/browser/index.d.ts",
|
|
83
|
-
"version": "3.0.1",
|
|
84
|
-
"type": "module"
|
|
90
|
+
"docs": "dist/docs.json"
|
|
85
91
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useAsyncEffect } from '@xylabs/react-async-effect'
|
|
2
|
-
import { WithChildren } from '@xylabs/react-shared'
|
|
2
|
+
import type { WithChildren } from '@xylabs/react-shared'
|
|
3
3
|
import { useNetwork } from '@xyo-network/react-network'
|
|
4
4
|
import { useWeakNodeFromNode } from '@xyo-network/react-node'
|
|
5
5
|
import React, { useState } from 'react'
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { usePromise } from '@xylabs/react-promise'
|
|
2
|
-
import { WithChildren } from '@xylabs/react-shared'
|
|
3
|
-
import { MemoryNode } from '@xyo-network/node-memory'
|
|
2
|
+
import type { WithChildren } from '@xylabs/react-shared'
|
|
3
|
+
import type { MemoryNode } from '@xyo-network/node-memory'
|
|
4
4
|
import { assertDefinedEx } from '@xyo-network/react-shared'
|
|
5
5
|
import { useWalletContext } from '@xyo-network/react-wallet'
|
|
6
|
-
import { WalletInstance } from '@xyo-network/wallet-model'
|
|
7
|
-
import React, {
|
|
6
|
+
import type { WalletInstance } from '@xyo-network/wallet-model'
|
|
7
|
+
import React, {
|
|
8
|
+
useEffect, useMemo, useState,
|
|
9
|
+
} from 'react'
|
|
8
10
|
|
|
9
11
|
import { BuildStandardNodes } from '../../lib/index.ts'
|
|
10
12
|
import { StandardNodesContext } from './Context.ts'
|
|
11
|
-
import { StandardNodesState } from './State.ts'
|
|
13
|
+
import type { StandardNodesState } from './State.ts'
|
|
12
14
|
|
|
13
15
|
export interface StandardNodesProviderProps extends WithChildren {
|
|
14
16
|
defaultRemoteNodes?: StandardNodesState['nodes']
|
|
15
17
|
wallet?: WalletInstance | null
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
export const StandardNodesProvider: React.FC<StandardNodesProviderProps> = ({
|
|
20
|
+
export const StandardNodesProvider: React.FC<StandardNodesProviderProps> = ({
|
|
21
|
+
children, defaultRemoteNodes, wallet,
|
|
22
|
+
}) => {
|
|
19
23
|
const [nodes, setNodes] = useState<StandardNodesState['nodes']>(defaultRemoteNodes)
|
|
20
24
|
|
|
21
25
|
useEffect(() => {
|
|
@@ -40,9 +44,11 @@ export const StandardNodesProvider: React.FC<StandardNodesProviderProps> = ({ ch
|
|
|
40
44
|
return nodes?.find(node => node.config.name === validNetworkName)?.address
|
|
41
45
|
}
|
|
42
46
|
|
|
43
|
-
const value = useMemo(() => ({
|
|
47
|
+
const value = useMemo(() => ({
|
|
48
|
+
findAddressByName,
|
|
44
49
|
nodes,
|
|
45
|
-
provided: true
|
|
50
|
+
provided: true,
|
|
51
|
+
}), [findAddressByName,
|
|
46
52
|
nodes])
|
|
47
53
|
|
|
48
54
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Address } from '@xylabs/hex'
|
|
2
|
-
import { MemoryNode } from '@xyo-network/node-memory'
|
|
3
|
-
import { ContextExState } from '@xyo-network/react-shared'
|
|
1
|
+
import type { Address } from '@xylabs/hex'
|
|
2
|
+
import type { MemoryNode } from '@xyo-network/node-memory'
|
|
3
|
+
import type { ContextExState } from '@xyo-network/react-shared'
|
|
4
4
|
|
|
5
5
|
export interface StandardNodesState extends ContextExState {
|
|
6
6
|
findAddressByName?: (name?: string) => Address | undefined
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { AccountInstance } from '@xyo-network/account-model'
|
|
2
|
-
import {
|
|
1
|
+
import type { AccountInstance } from '@xyo-network/account-model'
|
|
2
|
+
import type { MemoryArchivistConfig } from '@xyo-network/archivist-memory'
|
|
3
|
+
import { MemoryArchivist, MemoryArchivistConfigSchema } from '@xyo-network/archivist-memory'
|
|
3
4
|
import { HttpBridge, HttpBridgeConfigSchema } from '@xyo-network/bridge-http'
|
|
4
|
-
import { AttachableModuleInstance } from '@xyo-network/module-model'
|
|
5
|
+
import type { AttachableModuleInstance } from '@xyo-network/module-model'
|
|
5
6
|
import { MemoryNode } from '@xyo-network/node-memory'
|
|
6
7
|
import { NodeConfigSchema } from '@xyo-network/node-model'
|
|
7
|
-
import { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin'
|
|
8
|
+
import type { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin'
|
|
8
9
|
import { assertDefinedEx } from '@xyo-network/react-shared'
|
|
9
|
-
import { SentinelConfig } from '@xyo-network/sentinel-model'
|
|
10
|
-
import { AttachableWitnessInstance, WitnessModule } from '@xyo-network/witness-model'
|
|
10
|
+
import type { SentinelConfig } from '@xyo-network/sentinel-model'
|
|
11
|
+
import type { AttachableWitnessInstance, WitnessModule } from '@xyo-network/witness-model'
|
|
11
12
|
|
|
12
13
|
import { SentinelBuilder } from './SentinelBuilder.ts'
|
|
13
14
|
import { StorageArchivistBuilder } from './StorageArchivistBuilder.ts'
|
|
@@ -27,7 +28,10 @@ export class MemoryNodeBuilder {
|
|
|
27
28
|
static async create({ name, node }: MemoryNodeBuilderConfig, account?: AccountInstance): Promise<MemoryNodeBuilder> {
|
|
28
29
|
const instance = new this()
|
|
29
30
|
|
|
30
|
-
const memoryNode: MemoryNode = node ?? (await MemoryNode.create({
|
|
31
|
+
const memoryNode: MemoryNode = node ?? (await MemoryNode.create({
|
|
32
|
+
account,
|
|
33
|
+
config: { name, schema: NodeConfigSchema },
|
|
34
|
+
}))
|
|
31
35
|
instance._node = memoryNode
|
|
32
36
|
return instance
|
|
33
37
|
}
|
|
@@ -55,7 +59,9 @@ export class MemoryNodeBuilder {
|
|
|
55
59
|
try {
|
|
56
60
|
const bridge = await HttpBridge.create({
|
|
57
61
|
account,
|
|
58
|
-
config: {
|
|
62
|
+
config: {
|
|
63
|
+
name: moduleName, nodeUrl: `${apiDomain}/node`, schema: HttpBridgeConfigSchema, security: { allowAnonymous: true },
|
|
64
|
+
},
|
|
59
65
|
})
|
|
60
66
|
await this.attach(bridge, true)
|
|
61
67
|
} catch (e) {
|