@xyo-network/react-standard-node 2.64.0-rc.6 → 2.64.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/browser/components/ActiveStandardNode.cjs +85 -0
- package/dist/browser/components/ActiveStandardNode.cjs.map +1 -0
- package/dist/browser/components/ActiveStandardNode.d.cts +7 -0
- package/dist/browser/components/ActiveStandardNode.d.cts.map +1 -0
- package/dist/browser/components/index.cjs +87 -0
- package/dist/browser/components/index.cjs.map +1 -0
- package/dist/browser/components/index.d.cts +2 -0
- package/dist/browser/components/index.d.cts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/Context.cjs +28 -0
- package/dist/{node/contexts/StandardRemoteNodes/Context.mjs.map → browser/contexts/StandardRemoteNodes/Context.cjs.map} +1 -1
- package/dist/browser/contexts/StandardRemoteNodes/Context.d.cts +4 -0
- package/dist/browser/contexts/StandardRemoteNodes/Context.d.cts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/Providers.cjs +308 -0
- package/dist/browser/contexts/StandardRemoteNodes/Providers.cjs.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/Providers.d.cts +11 -0
- package/dist/browser/contexts/StandardRemoteNodes/Providers.d.cts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/State.cjs +19 -0
- package/dist/browser/contexts/StandardRemoteNodes/State.cjs.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/State.d.cts +7 -0
- package/dist/browser/contexts/StandardRemoteNodes/State.d.cts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/index.cjs +316 -0
- package/dist/browser/contexts/StandardRemoteNodes/index.cjs.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/index.d.cts +5 -0
- package/dist/browser/contexts/StandardRemoteNodes/index.d.cts.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/use.cjs +34 -0
- package/dist/browser/contexts/StandardRemoteNodes/use.cjs.map +1 -0
- package/dist/browser/contexts/StandardRemoteNodes/use.d.cts +2 -0
- package/dist/browser/contexts/StandardRemoteNodes/use.d.cts.map +1 -0
- package/dist/browser/contexts/index.cjs +316 -0
- package/dist/browser/contexts/index.cjs.map +1 -0
- package/dist/browser/contexts/index.d.cts +2 -0
- package/dist/browser/contexts/index.d.cts.map +1 -0
- package/dist/browser/hooks/index.cjs +50 -0
- package/dist/browser/hooks/index.cjs.map +1 -0
- package/dist/browser/hooks/index.d.cts +2 -0
- package/dist/browser/hooks/index.d.cts.map +1 -0
- package/dist/browser/hooks/useActiveNodeAddress.cjs +48 -0
- package/dist/browser/hooks/useActiveNodeAddress.cjs.map +1 -0
- package/dist/browser/hooks/useActiveNodeAddress.d.cts +2 -0
- package/dist/browser/hooks/useActiveNodeAddress.d.cts.map +1 -0
- package/dist/browser/index.cjs +382 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +5 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/lib/Builders/MemoryNodeBuilder.cjs +194 -0
- package/dist/browser/lib/Builders/MemoryNodeBuilder.cjs.map +1 -0
- package/dist/browser/lib/Builders/MemoryNodeBuilder.d.cts +166 -0
- package/dist/browser/lib/Builders/MemoryNodeBuilder.d.cts.map +1 -0
- package/dist/browser/lib/Builders/SentinelBuilder.cjs +54 -0
- package/dist/{node/lib/Builders/SentinelBuilder.mjs.map → browser/lib/Builders/SentinelBuilder.cjs.map} +1 -1
- package/dist/browser/lib/Builders/SentinelBuilder.d.cts +205 -0
- package/dist/browser/lib/Builders/SentinelBuilder.d.cts.map +1 -0
- package/dist/browser/lib/Builders/StorageArchivistBuilder.cjs +76 -0
- package/dist/{node/lib/Builders/StorageArchivistBuilder.mjs.map → browser/lib/Builders/StorageArchivistBuilder.cjs.map} +1 -1
- package/dist/browser/lib/Builders/StorageArchivistBuilder.d.cts +221 -0
- package/dist/browser/lib/Builders/StorageArchivistBuilder.d.cts.map +1 -0
- package/dist/browser/lib/Builders/index.cjs +198 -0
- package/dist/browser/lib/Builders/index.cjs.map +1 -0
- package/dist/browser/lib/Builders/index.d.cts +4 -0
- package/dist/browser/lib/Builders/index.d.cts.map +1 -0
- package/dist/browser/lib/ModuleAccountPaths.cjs +53 -0
- package/dist/browser/lib/ModuleAccountPaths.cjs.map +1 -0
- package/dist/browser/lib/ModuleAccountPaths.d.cts +4 -0
- package/dist/browser/lib/ModuleAccountPaths.d.cts.map +1 -0
- package/dist/browser/lib/ModuleNames.cjs +29 -0
- package/dist/{node/lib/ModuleNames.mjs.map → browser/lib/ModuleNames.cjs.map} +1 -1
- package/dist/browser/lib/ModuleNames.d.cts +3 -0
- package/dist/browser/lib/ModuleNames.d.cts.map +1 -0
- package/dist/browser/lib/buildNodes.cjs +257 -0
- package/dist/browser/lib/buildNodes.cjs.map +1 -0
- package/dist/browser/lib/buildNodes.d.cts +4 -0
- package/dist/browser/lib/buildNodes.d.cts.map +1 -0
- package/dist/browser/lib/index.cjs +269 -0
- package/dist/browser/lib/index.cjs.map +1 -0
- package/dist/browser/lib/index.d.cts +5 -0
- package/dist/browser/lib/index.d.cts.map +1 -0
- package/dist/docs.json +6100 -0
- package/dist/node/components/ActiveStandardNode.cjs +90 -0
- package/dist/node/components/ActiveStandardNode.cjs.map +1 -0
- package/dist/node/components/ActiveStandardNode.d.cts +7 -0
- package/dist/node/components/ActiveStandardNode.d.cts.map +1 -0
- package/dist/node/components/ActiveStandardNode.js +43 -43
- package/dist/node/components/ActiveStandardNode.js.map +1 -1
- package/dist/node/components/index.cjs +92 -0
- package/dist/node/components/index.cjs.map +1 -0
- package/dist/node/components/index.d.cts +2 -0
- package/dist/node/components/index.d.cts.map +1 -0
- package/dist/node/components/index.js +63 -21
- package/dist/node/components/index.js.map +1 -1
- package/dist/node/contexts/StandardRemoteNodes/Context.cjs +32 -0
- package/dist/node/contexts/StandardRemoteNodes/Context.cjs.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/Context.d.cts +4 -0
- package/dist/node/contexts/StandardRemoteNodes/Context.d.cts.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/Context.js +5 -28
- package/dist/node/contexts/StandardRemoteNodes/Context.js.map +1 -1
- package/dist/node/contexts/StandardRemoteNodes/Providers.cjs +319 -0
- package/dist/node/contexts/StandardRemoteNodes/Providers.cjs.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/Providers.d.cts +11 -0
- package/dist/node/contexts/StandardRemoteNodes/Providers.d.cts.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/Providers.js +263 -44
- package/dist/node/contexts/StandardRemoteNodes/Providers.js.map +1 -1
- package/dist/node/contexts/StandardRemoteNodes/State.cjs +19 -0
- package/dist/node/contexts/StandardRemoteNodes/State.cjs.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/State.d.cts +7 -0
- package/dist/node/contexts/StandardRemoteNodes/State.d.cts.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/State.js +0 -16
- package/dist/node/contexts/StandardRemoteNodes/State.js.map +1 -1
- package/dist/node/contexts/StandardRemoteNodes/index.cjs +329 -0
- package/dist/node/contexts/StandardRemoteNodes/index.cjs.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/index.d.cts +5 -0
- package/dist/node/contexts/StandardRemoteNodes/index.d.cts.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/index.js +298 -28
- package/dist/node/contexts/StandardRemoteNodes/index.js.map +1 -1
- package/dist/node/contexts/StandardRemoteNodes/use.cjs +38 -0
- package/dist/node/contexts/StandardRemoteNodes/use.cjs.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/use.d.cts +2 -0
- package/dist/node/contexts/StandardRemoteNodes/use.d.cts.map +1 -0
- package/dist/node/contexts/StandardRemoteNodes/use.js +11 -29
- package/dist/node/contexts/StandardRemoteNodes/use.js.map +1 -1
- package/dist/node/contexts/index.cjs +329 -0
- package/dist/node/contexts/index.cjs.map +1 -0
- package/dist/node/contexts/index.d.cts +2 -0
- package/dist/node/contexts/index.d.cts.map +1 -0
- package/dist/node/contexts/index.js +298 -22
- package/dist/node/contexts/index.js.map +1 -1
- package/dist/node/hooks/index.cjs +54 -0
- package/dist/node/hooks/index.cjs.map +1 -0
- package/dist/node/hooks/index.d.cts +2 -0
- package/dist/node/hooks/index.d.cts.map +1 -0
- package/dist/node/hooks/index.js +25 -21
- package/dist/node/hooks/index.js.map +1 -1
- package/dist/node/hooks/useActiveNodeAddress.cjs +52 -0
- package/dist/node/hooks/useActiveNodeAddress.cjs.map +1 -0
- package/dist/node/hooks/useActiveNodeAddress.d.cts +2 -0
- package/dist/node/hooks/useActiveNodeAddress.d.cts.map +1 -0
- package/dist/node/hooks/useActiveNodeAddress.js +19 -33
- package/dist/node/hooks/useActiveNodeAddress.js.map +1 -1
- package/dist/node/index.cjs +407 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +5 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +365 -28
- package/dist/node/index.js.map +1 -1
- package/dist/node/lib/Builders/MemoryNodeBuilder.cjs +201 -0
- package/dist/node/lib/Builders/MemoryNodeBuilder.cjs.map +1 -0
- package/dist/node/lib/Builders/MemoryNodeBuilder.d.cts +166 -0
- package/dist/node/lib/Builders/MemoryNodeBuilder.d.cts.map +1 -0
- package/dist/node/lib/Builders/MemoryNodeBuilder.js +108 -46
- package/dist/node/lib/Builders/MemoryNodeBuilder.js.map +1 -1
- package/dist/node/lib/Builders/SentinelBuilder.cjs +58 -0
- package/dist/node/lib/Builders/SentinelBuilder.cjs.map +1 -0
- package/dist/node/lib/Builders/SentinelBuilder.d.cts +205 -0
- package/dist/node/lib/Builders/SentinelBuilder.d.cts.map +1 -0
- package/dist/node/lib/Builders/SentinelBuilder.js +10 -33
- package/dist/node/lib/Builders/SentinelBuilder.js.map +1 -1
- package/dist/node/lib/Builders/StorageArchivistBuilder.cjs +82 -0
- package/dist/node/lib/Builders/StorageArchivistBuilder.cjs.map +1 -0
- package/dist/node/lib/Builders/StorageArchivistBuilder.d.cts +221 -0
- package/dist/node/lib/Builders/StorageArchivistBuilder.d.cts.map +1 -0
- package/dist/node/lib/Builders/StorageArchivistBuilder.js +18 -39
- package/dist/node/lib/Builders/StorageArchivistBuilder.js.map +1 -1
- package/dist/node/lib/Builders/index.cjs +207 -0
- package/dist/node/lib/Builders/index.cjs.map +1 -0
- package/dist/node/lib/Builders/index.d.cts +4 -0
- package/dist/node/lib/Builders/index.d.cts.map +1 -0
- package/dist/node/lib/Builders/index.js +176 -25
- package/dist/node/lib/Builders/index.js.map +1 -1
- package/dist/node/lib/ModuleAccountPaths.cjs +59 -0
- package/dist/node/lib/ModuleAccountPaths.cjs.map +1 -0
- package/dist/node/lib/ModuleAccountPaths.d.cts +4 -0
- package/dist/node/lib/ModuleAccountPaths.d.cts.map +1 -0
- package/dist/node/lib/ModuleAccountPaths.js +12 -35
- package/dist/node/lib/ModuleAccountPaths.js.map +1 -1
- package/dist/node/lib/ModuleNames.cjs +34 -0
- package/dist/node/lib/ModuleNames.cjs.map +1 -0
- package/dist/node/lib/ModuleNames.d.cts +3 -0
- package/dist/node/lib/ModuleNames.d.cts.map +1 -0
- package/dist/node/lib/ModuleNames.js +5 -29
- package/dist/node/lib/ModuleNames.js.map +1 -1
- package/dist/node/lib/buildNodes.cjs +266 -0
- package/dist/node/lib/buildNodes.cjs.map +1 -0
- package/dist/node/lib/buildNodes.d.cts +4 -0
- package/dist/node/lib/buildNodes.d.cts.map +1 -0
- package/dist/node/lib/buildNodes.js +217 -42
- package/dist/node/lib/buildNodes.js.map +1 -1
- package/dist/node/lib/index.cjs +286 -0
- package/dist/node/lib/index.cjs.map +1 -0
- package/dist/node/lib/index.d.cts +5 -0
- package/dist/node/lib/index.d.cts.map +1 -0
- package/dist/node/lib/index.js +250 -28
- package/dist/node/lib/index.js.map +1 -1
- package/package.json +30 -30
- package/dist/node/components/ActiveStandardNode.mjs +0 -41
- package/dist/node/components/ActiveStandardNode.mjs.map +0 -1
- package/dist/node/components/index.mjs +0 -2
- package/dist/node/components/index.mjs.map +0 -1
- package/dist/node/contexts/StandardRemoteNodes/Context.mjs +0 -6
- package/dist/node/contexts/StandardRemoteNodes/Providers.mjs +0 -49
- package/dist/node/contexts/StandardRemoteNodes/Providers.mjs.map +0 -1
- package/dist/node/contexts/StandardRemoteNodes/State.mjs +0 -1
- package/dist/node/contexts/StandardRemoteNodes/State.mjs.map +0 -1
- package/dist/node/contexts/StandardRemoteNodes/index.mjs +0 -5
- package/dist/node/contexts/StandardRemoteNodes/index.mjs.map +0 -1
- package/dist/node/contexts/StandardRemoteNodes/use.mjs +0 -7
- package/dist/node/contexts/StandardRemoteNodes/use.mjs.map +0 -1
- package/dist/node/contexts/index.mjs +0 -2
- package/dist/node/contexts/index.mjs.map +0 -1
- package/dist/node/hooks/index.mjs +0 -2
- package/dist/node/hooks/index.mjs.map +0 -1
- package/dist/node/hooks/useActiveNodeAddress.mjs +0 -17
- package/dist/node/hooks/useActiveNodeAddress.mjs.map +0 -1
- package/dist/node/index.mjs +0 -5
- package/dist/node/index.mjs.map +0 -1
- package/dist/node/lib/Builders/MemoryNodeBuilder.mjs +0 -90
- package/dist/node/lib/Builders/MemoryNodeBuilder.mjs.map +0 -1
- package/dist/node/lib/Builders/SentinelBuilder.mjs +0 -32
- package/dist/node/lib/Builders/StorageArchivistBuilder.mjs +0 -54
- package/dist/node/lib/Builders/index.mjs +0 -4
- package/dist/node/lib/Builders/index.mjs.map +0 -1
- package/dist/node/lib/ModuleAccountPaths.mjs +0 -27
- package/dist/node/lib/ModuleAccountPaths.mjs.map +0 -1
- package/dist/node/lib/ModuleNames.mjs +0 -7
- package/dist/node/lib/buildNodes.mjs +0 -42
- package/dist/node/lib/buildNodes.mjs.map +0 -1
- package/dist/node/lib/index.mjs +0 -5
- package/dist/node/lib/index.mjs.map +0 -1
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { AccountInstance } from '@xyo-network/account-model';
|
|
2
|
+
import { MemorySentinel, SentinelConfig } from '@xyo-network/sentinel';
|
|
3
|
+
export declare class SentinelBuilder {
|
|
4
|
+
private config;
|
|
5
|
+
private account;
|
|
6
|
+
private _sentinel;
|
|
7
|
+
protected constructor(config: SentinelConfig, account: AccountInstance);
|
|
8
|
+
get sentinel(): MemorySentinel<import("@xyo-network/core").BaseParamsFields & {
|
|
9
|
+
account?: AccountInstance | "random" | undefined;
|
|
10
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
11
|
+
accountDerivationPath?: string | undefined;
|
|
12
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
13
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
14
|
+
readonly name?: string | undefined;
|
|
15
|
+
readonly paging?: Record<string, {
|
|
16
|
+
size?: number | undefined;
|
|
17
|
+
}> | undefined;
|
|
18
|
+
readonly security?: {
|
|
19
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
20
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
21
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
readonly sign?: boolean | undefined;
|
|
24
|
+
readonly storeQueries?: boolean | undefined;
|
|
25
|
+
readonly timestamp?: boolean | undefined;
|
|
26
|
+
} & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
27
|
+
accountDerivationPath?: string | undefined;
|
|
28
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
29
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
30
|
+
readonly name?: string | undefined;
|
|
31
|
+
readonly paging?: Record<string, {
|
|
32
|
+
size?: number | undefined;
|
|
33
|
+
}> | undefined;
|
|
34
|
+
readonly security?: {
|
|
35
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
36
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
37
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
38
|
+
} | undefined;
|
|
39
|
+
readonly sign?: boolean | undefined;
|
|
40
|
+
readonly storeQueries?: boolean | undefined;
|
|
41
|
+
readonly timestamp?: boolean | undefined;
|
|
42
|
+
} & {
|
|
43
|
+
archivists?: string[] | undefined;
|
|
44
|
+
schema: string;
|
|
45
|
+
} & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
46
|
+
schema: "network.xyo.module.config";
|
|
47
|
+
}, "schema"> & {
|
|
48
|
+
schema: "network.xyo.module.config";
|
|
49
|
+
} & {
|
|
50
|
+
witnesses?: string[] | undefined;
|
|
51
|
+
}, "schema"> & {
|
|
52
|
+
schema: "network.xyo.sentinel.config";
|
|
53
|
+
};
|
|
54
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
55
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
56
|
+
}, import("@xyo-network/sentinel").SentinelModuleEventData<import("@xyo-network/sentinel").SentinelInstance<import("@xyo-network/core").BaseParamsFields & {
|
|
57
|
+
account?: AccountInstance | "random" | undefined;
|
|
58
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
59
|
+
accountDerivationPath?: string | undefined;
|
|
60
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
61
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
62
|
+
readonly name?: string | undefined;
|
|
63
|
+
readonly paging?: Record<string, {
|
|
64
|
+
size?: number | undefined;
|
|
65
|
+
}> | undefined;
|
|
66
|
+
readonly security?: {
|
|
67
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
68
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
69
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
readonly sign?: boolean | undefined;
|
|
72
|
+
readonly storeQueries?: boolean | undefined;
|
|
73
|
+
readonly timestamp?: boolean | undefined;
|
|
74
|
+
} & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
75
|
+
accountDerivationPath?: string | undefined;
|
|
76
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
77
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
78
|
+
readonly name?: string | undefined;
|
|
79
|
+
readonly paging?: Record<string, {
|
|
80
|
+
size?: number | undefined;
|
|
81
|
+
}> | undefined;
|
|
82
|
+
readonly security?: {
|
|
83
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
84
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
85
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
readonly sign?: boolean | undefined;
|
|
88
|
+
readonly storeQueries?: boolean | undefined;
|
|
89
|
+
readonly timestamp?: boolean | undefined;
|
|
90
|
+
} & {
|
|
91
|
+
archivists?: string[] | undefined;
|
|
92
|
+
schema: string;
|
|
93
|
+
} & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
94
|
+
schema: "network.xyo.module.config";
|
|
95
|
+
}, "schema"> & {
|
|
96
|
+
schema: "network.xyo.module.config";
|
|
97
|
+
} & {
|
|
98
|
+
witnesses?: string[] | undefined;
|
|
99
|
+
}, "schema"> & {
|
|
100
|
+
schema: "network.xyo.sentinel.config";
|
|
101
|
+
};
|
|
102
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
103
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
104
|
+
}>>>;
|
|
105
|
+
static create(config: SentinelConfig, account: AccountInstance): Promise<SentinelBuilder>;
|
|
106
|
+
buildSentinel(): Promise<MemorySentinel<import("@xyo-network/core").BaseParamsFields & {
|
|
107
|
+
account?: AccountInstance | "random" | undefined;
|
|
108
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
109
|
+
accountDerivationPath?: string | undefined;
|
|
110
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
111
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
112
|
+
readonly name?: string | undefined;
|
|
113
|
+
readonly paging?: Record<string, {
|
|
114
|
+
size?: number | undefined;
|
|
115
|
+
}> | undefined;
|
|
116
|
+
readonly security?: {
|
|
117
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
118
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
119
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
120
|
+
} | undefined;
|
|
121
|
+
readonly sign?: boolean | undefined;
|
|
122
|
+
readonly storeQueries?: boolean | undefined;
|
|
123
|
+
readonly timestamp?: boolean | undefined;
|
|
124
|
+
} & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
125
|
+
accountDerivationPath?: string | undefined;
|
|
126
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
127
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
128
|
+
readonly name?: string | undefined;
|
|
129
|
+
readonly paging?: Record<string, {
|
|
130
|
+
size?: number | undefined;
|
|
131
|
+
}> | undefined;
|
|
132
|
+
readonly security?: {
|
|
133
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
134
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
135
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
136
|
+
} | undefined;
|
|
137
|
+
readonly sign?: boolean | undefined;
|
|
138
|
+
readonly storeQueries?: boolean | undefined;
|
|
139
|
+
readonly timestamp?: boolean | undefined;
|
|
140
|
+
} & {
|
|
141
|
+
archivists?: string[] | undefined;
|
|
142
|
+
schema: string;
|
|
143
|
+
} & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
144
|
+
schema: "network.xyo.module.config";
|
|
145
|
+
}, "schema"> & {
|
|
146
|
+
schema: "network.xyo.module.config";
|
|
147
|
+
} & {
|
|
148
|
+
witnesses?: string[] | undefined;
|
|
149
|
+
}, "schema"> & {
|
|
150
|
+
schema: "network.xyo.sentinel.config";
|
|
151
|
+
};
|
|
152
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
153
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
154
|
+
}, import("@xyo-network/sentinel").SentinelModuleEventData<import("@xyo-network/sentinel").SentinelInstance<import("@xyo-network/core").BaseParamsFields & {
|
|
155
|
+
account?: AccountInstance | "random" | undefined;
|
|
156
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
157
|
+
accountDerivationPath?: string | undefined;
|
|
158
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
159
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
160
|
+
readonly name?: string | undefined;
|
|
161
|
+
readonly paging?: Record<string, {
|
|
162
|
+
size?: number | undefined;
|
|
163
|
+
}> | undefined;
|
|
164
|
+
readonly security?: {
|
|
165
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
166
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
167
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
168
|
+
} | undefined;
|
|
169
|
+
readonly sign?: boolean | undefined;
|
|
170
|
+
readonly storeQueries?: boolean | undefined;
|
|
171
|
+
readonly timestamp?: boolean | undefined;
|
|
172
|
+
} & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
173
|
+
accountDerivationPath?: string | undefined;
|
|
174
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
175
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
176
|
+
readonly name?: string | undefined;
|
|
177
|
+
readonly paging?: Record<string, {
|
|
178
|
+
size?: number | undefined;
|
|
179
|
+
}> | undefined;
|
|
180
|
+
readonly security?: {
|
|
181
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
182
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
183
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
184
|
+
} | undefined;
|
|
185
|
+
readonly sign?: boolean | undefined;
|
|
186
|
+
readonly storeQueries?: boolean | undefined;
|
|
187
|
+
readonly timestamp?: boolean | undefined;
|
|
188
|
+
} & {
|
|
189
|
+
archivists?: string[] | undefined;
|
|
190
|
+
schema: string;
|
|
191
|
+
} & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
192
|
+
schema: "network.xyo.module.config";
|
|
193
|
+
}, "schema"> & {
|
|
194
|
+
schema: "network.xyo.module.config";
|
|
195
|
+
} & {
|
|
196
|
+
witnesses?: string[] | undefined;
|
|
197
|
+
}, "schema"> & {
|
|
198
|
+
schema: "network.xyo.sentinel.config";
|
|
199
|
+
};
|
|
200
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
201
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
202
|
+
}>>>>;
|
|
203
|
+
private buildParams;
|
|
204
|
+
}
|
|
205
|
+
//# 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,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,cAAc,EAAwB,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE5F,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAEX;WAEY,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAMzF,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKnB,OAAO,CAAC,WAAW;CAMpB"}
|
|
@@ -1,37 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var SentinelBuilder_exports = {};
|
|
20
|
-
__export(SentinelBuilder_exports, {
|
|
21
|
-
SentinelBuilder: () => SentinelBuilder
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(SentinelBuilder_exports);
|
|
24
|
-
var import_react_shared = require("@xyo-network/react-shared");
|
|
25
|
-
var import_sentinel = require("@xyo-network/sentinel");
|
|
26
|
-
class SentinelBuilder {
|
|
1
|
+
// src/lib/Builders/SentinelBuilder.ts
|
|
2
|
+
import { assertDefinedEx } from "@xyo-network/react-shared";
|
|
3
|
+
import { MemorySentinel } from "@xyo-network/sentinel";
|
|
4
|
+
var SentinelBuilder = class {
|
|
27
5
|
constructor(config, account) {
|
|
28
6
|
this.config = config;
|
|
29
7
|
this.account = account;
|
|
30
|
-
|
|
8
|
+
assertDefinedEx(config, "config was not defined");
|
|
31
9
|
}
|
|
32
10
|
_sentinel;
|
|
33
11
|
get sentinel() {
|
|
34
|
-
return
|
|
12
|
+
return assertDefinedEx(this._sentinel, "this._sentinel not defined upon create");
|
|
35
13
|
}
|
|
36
14
|
static async create(config, account) {
|
|
37
15
|
const instance = new this(config, account);
|
|
@@ -40,7 +18,7 @@ class SentinelBuilder {
|
|
|
40
18
|
}
|
|
41
19
|
async buildSentinel() {
|
|
42
20
|
const params = this.buildParams();
|
|
43
|
-
return await
|
|
21
|
+
return await MemorySentinel.create(params);
|
|
44
22
|
}
|
|
45
23
|
buildParams() {
|
|
46
24
|
return {
|
|
@@ -48,9 +26,8 @@ class SentinelBuilder {
|
|
|
48
26
|
config: this.config
|
|
49
27
|
};
|
|
50
28
|
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
0 && (module.exports = {
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
54
31
|
SentinelBuilder
|
|
55
|
-
}
|
|
32
|
+
};
|
|
56
33
|
//# sourceMappingURL=SentinelBuilder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/Builders/SentinelBuilder.ts"],"sourcesContent":["import { AccountInstance } from '@xyo-network/account-model'\nimport { assertDefinedEx } from '@xyo-network/react-shared'\nimport { MemorySentinel, MemorySentinelParams, SentinelConfig } from '@xyo-network/sentinel'\n\nexport class SentinelBuilder {\n private _sentinel: MemorySentinel | undefined\n\n protected constructor(\n private config: SentinelConfig,\n private account: AccountInstance,\n ) {\n assertDefinedEx(config, 'config was not defined')\n }\n\n get sentinel() {\n return assertDefinedEx(this._sentinel, 'this._sentinel not defined upon create')\n }\n\n static async create(config: SentinelConfig, account: AccountInstance): Promise<SentinelBuilder> {\n const instance = new this(config, account)\n instance._sentinel = await instance.buildSentinel()\n return instance\n }\n\n async buildSentinel() {\n const params = this.buildParams()\n return (await MemorySentinel.create(params)) as MemorySentinel\n }\n\n private buildParams(): MemorySentinelParams {\n return {\n account: this.account,\n config: this.config,\n }\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/Builders/SentinelBuilder.ts"],"sourcesContent":["import { AccountInstance } from '@xyo-network/account-model'\nimport { assertDefinedEx } from '@xyo-network/react-shared'\nimport { MemorySentinel, MemorySentinelParams, SentinelConfig } from '@xyo-network/sentinel'\n\nexport class SentinelBuilder {\n private _sentinel: MemorySentinel | undefined\n\n protected constructor(\n private config: SentinelConfig,\n private account: AccountInstance,\n ) {\n assertDefinedEx(config, 'config was not defined')\n }\n\n get sentinel() {\n return assertDefinedEx(this._sentinel, 'this._sentinel not defined upon create')\n }\n\n static async create(config: SentinelConfig, account: AccountInstance): Promise<SentinelBuilder> {\n const instance = new this(config, account)\n instance._sentinel = await instance.buildSentinel()\n return instance\n }\n\n async buildSentinel() {\n const params = this.buildParams()\n return (await MemorySentinel.create(params)) as MemorySentinel\n }\n\n private buildParams(): MemorySentinelParams {\n return {\n account: this.account,\n config: this.config,\n }\n }\n}\n"],"mappings":";AACA,SAAS,uBAAuB;AAChC,SAAS,sBAA4D;AAE9D,IAAM,kBAAN,MAAsB;AAAA,EAGjB,YACA,QACA,SACR;AAFQ;AACA;AAER,oBAAgB,QAAQ,wBAAwB;AAAA,EAClD;AAAA,EAPQ;AAAA,EASR,IAAI,WAAW;AACb,WAAO,gBAAgB,KAAK,WAAW,wCAAwC;AAAA,EACjF;AAAA,EAEA,aAAa,OAAO,QAAwB,SAAoD;AAC9F,UAAM,WAAW,IAAI,KAAK,QAAQ,OAAO;AACzC,aAAS,YAAY,MAAM,SAAS,cAAc;AAClD,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,gBAAgB;AACpB,UAAM,SAAS,KAAK,YAAY;AAChC,WAAQ,MAAM,eAAe,OAAO,MAAM;AAAA,EAC5C;AAAA,EAEQ,cAAoC;AAC1C,WAAO;AAAA,MACL,SAAS,KAAK;AAAA,MACd,QAAQ,KAAK;AAAA,IACf;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/lib/Builders/StorageArchivistBuilder.ts
|
|
21
|
+
var StorageArchivistBuilder_exports = {};
|
|
22
|
+
__export(StorageArchivistBuilder_exports, {
|
|
23
|
+
StorageArchivistBuilder: () => StorageArchivistBuilder
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(StorageArchivistBuilder_exports);
|
|
26
|
+
var import_archivist = require("@xyo-network/archivist");
|
|
27
|
+
var import_node_model = require("@xyo-network/node-model");
|
|
28
|
+
var import_react_shared = require("@xyo-network/react-shared");
|
|
29
|
+
var StorageArchivistBuilder = class {
|
|
30
|
+
constructor(config, account, node) {
|
|
31
|
+
this.config = config;
|
|
32
|
+
this.account = account;
|
|
33
|
+
this.node = node;
|
|
34
|
+
}
|
|
35
|
+
_archivist;
|
|
36
|
+
remoteArchivist;
|
|
37
|
+
get archivist() {
|
|
38
|
+
return (0, import_react_shared.assertDefinedEx)(this._archivist, "archivist was not defined upon create");
|
|
39
|
+
}
|
|
40
|
+
static async create(config, account, node) {
|
|
41
|
+
const instance = new this(config, account, node);
|
|
42
|
+
instance.remoteArchivist = await instance.findParentArchivist();
|
|
43
|
+
instance._archivist = await instance.buildArchivist();
|
|
44
|
+
return instance;
|
|
45
|
+
}
|
|
46
|
+
async buildArchivist() {
|
|
47
|
+
const config = this.buildConfig();
|
|
48
|
+
return await import_archivist.StorageArchivist.create({ account: this.account, config });
|
|
49
|
+
}
|
|
50
|
+
buildConfig() {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
return {
|
|
53
|
+
name: this.config.name,
|
|
54
|
+
namespace: this.config.namespace,
|
|
55
|
+
parents: {
|
|
56
|
+
commit: this.remoteArchivist ? [(_a = this.remoteArchivist) == null ? void 0 : _a.address] : void 0,
|
|
57
|
+
read: this.remoteArchivist ? [(_b = this.remoteArchivist) == null ? void 0 : _b.address] : void 0
|
|
58
|
+
},
|
|
59
|
+
schema: import_archivist.StorageArchivistConfigSchema,
|
|
60
|
+
storeParentReads: true,
|
|
61
|
+
type: "local"
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
async findParentArchivist() {
|
|
65
|
+
var _a;
|
|
66
|
+
const node = (0, import_node_model.asNodeInstance)(this.node, "node not defined");
|
|
67
|
+
const [bridge] = await node.resolve({ name: ["RemoteNodeBridge"] }) ?? [];
|
|
68
|
+
if (bridge) {
|
|
69
|
+
try {
|
|
70
|
+
const [archivist] = await bridge.resolve({ name: ["Archivist"] }) ?? [];
|
|
71
|
+
return (0, import_archivist.asArchivistInstance)(archivist);
|
|
72
|
+
} catch (e) {
|
|
73
|
+
console.error("Error Resolving Parent Archivist", (_a = this.node) == null ? void 0 : _a.config.name, this.config);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
+
0 && (module.exports = {
|
|
80
|
+
StorageArchivistBuilder
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=StorageArchivistBuilder.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/Builders/StorageArchivistBuilder.ts"],"sourcesContent":["import { AccountInstance } from '@xyo-network/account-model'\nimport { ArchivistModule, asArchivistInstance, StorageArchivist, StorageArchivistConfig, StorageArchivistConfigSchema } from '@xyo-network/archivist'\nimport { MemoryNode } from '@xyo-network/node-memory'\nimport { asNodeInstance } from '@xyo-network/node-model'\nimport { assertDefinedEx } from '@xyo-network/react-shared'\n\nexport interface ArchivistBuilderConfig {\n name?: string\n namespace?: string\n}\nexport class StorageArchivistBuilder {\n private _archivist: StorageArchivist | undefined\n private remoteArchivist: ArchivistModule | undefined\n\n protected constructor(\n private config: ArchivistBuilderConfig,\n private account: AccountInstance,\n private node?: MemoryNode,\n ) {}\n\n get archivist() {\n return assertDefinedEx(this._archivist, 'archivist was not defined upon create')\n }\n\n static async create(config: ArchivistBuilderConfig, account: AccountInstance, node: MemoryNode): Promise<StorageArchivistBuilder> {\n const instance = new this(config, account, node)\n instance.remoteArchivist = await instance.findParentArchivist()\n instance._archivist = await instance.buildArchivist()\n return instance\n }\n\n async buildArchivist() {\n const config = this.buildConfig()\n return (await StorageArchivist.create({ account: this.account, config })) as StorageArchivist\n }\n\n buildConfig(): StorageArchivistConfig {\n return {\n name: this.config.name,\n namespace: this.config.namespace,\n parents: {\n commit: this.remoteArchivist ? [this.remoteArchivist?.address] : undefined,\n read: this.remoteArchivist ? [this.remoteArchivist?.address] : undefined,\n },\n schema: StorageArchivistConfigSchema,\n storeParentReads: true,\n type: 'local',\n }\n }\n\n async findParentArchivist() {\n const node = asNodeInstance(this.node, 'node not defined')\n const [bridge] = (await node.resolve({ name: ['RemoteNodeBridge'] })) ?? []\n if (bridge) {\n try {\n const [archivist] = (await bridge.resolve({ name: ['Archivist'] })) ?? []\n return asArchivistInstance(archivist)\n } catch (e) {\n console.error('Error Resolving Parent Archivist', this.node?.config.name, this.config)\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAA6H;AAE7H,wBAA+B;AAC/B,0BAAgC;AAMzB,IAAM,0BAAN,MAA8B;AAAA,EAIzB,YACA,QACA,SACA,MACR;AAHQ;AACA;AACA;AAAA,EACP;AAAA,EAPK;AAAA,EACA;AAAA,EAQR,IAAI,YAAY;AACd,eAAO,qCAAgB,KAAK,YAAY,uCAAuC;AAAA,EACjF;AAAA,EAEA,aAAa,OAAO,QAAgC,SAA0B,MAAoD;AAChI,UAAM,WAAW,IAAI,KAAK,QAAQ,SAAS,IAAI;AAC/C,aAAS,kBAAkB,MAAM,SAAS,oBAAoB;AAC9D,aAAS,aAAa,MAAM,SAAS,eAAe;AACpD,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,iBAAiB;AACrB,UAAM,SAAS,KAAK,YAAY;AAChC,WAAQ,MAAM,kCAAiB,OAAO,EAAE,SAAS,KAAK,SAAS,OAAO,CAAC;AAAA,EACzE;AAAA,EAEA,cAAsC;AApCxC;AAqCI,WAAO;AAAA,MACL,MAAM,KAAK,OAAO;AAAA,MAClB,WAAW,KAAK,OAAO;AAAA,MACvB,SAAS;AAAA,QACP,QAAQ,KAAK,kBAAkB,EAAC,UAAK,oBAAL,mBAAsB,OAAO,IAAI;AAAA,QACjE,MAAM,KAAK,kBAAkB,EAAC,UAAK,oBAAL,mBAAsB,OAAO,IAAI;AAAA,MACjE;AAAA,MACA,QAAQ;AAAA,MACR,kBAAkB;AAAA,MAClB,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,MAAM,sBAAsB;AAlD9B;AAmDI,UAAM,WAAO,kCAAe,KAAK,MAAM,kBAAkB;AACzD,UAAM,CAAC,MAAM,IAAK,MAAM,KAAK,QAAQ,EAAE,MAAM,CAAC,kBAAkB,EAAE,CAAC,KAAM,CAAC;AAC1E,QAAI,QAAQ;AACV,UAAI;AACF,cAAM,CAAC,SAAS,IAAK,MAAM,OAAO,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,KAAM,CAAC;AACxE,mBAAO,sCAAoB,SAAS;AAAA,MACtC,SAAS,GAAG;AACV,gBAAQ,MAAM,qCAAoC,UAAK,SAAL,mBAAW,OAAO,MAAM,KAAK,MAAM;AAAA,MACvF;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { AccountInstance } from '@xyo-network/account-model';
|
|
2
|
+
import { StorageArchivist, StorageArchivistConfig } from '@xyo-network/archivist';
|
|
3
|
+
import { MemoryNode } from '@xyo-network/node-memory';
|
|
4
|
+
export interface ArchivistBuilderConfig {
|
|
5
|
+
name?: string;
|
|
6
|
+
namespace?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class StorageArchivistBuilder {
|
|
9
|
+
private config;
|
|
10
|
+
private account;
|
|
11
|
+
private node?;
|
|
12
|
+
private _archivist;
|
|
13
|
+
private remoteArchivist;
|
|
14
|
+
protected constructor(config: ArchivistBuilderConfig, account: AccountInstance, node?: MemoryNode<import("@xyo-network/core").BaseParamsFields & {
|
|
15
|
+
account?: AccountInstance | "random" | undefined;
|
|
16
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
17
|
+
accountDerivationPath?: string | undefined;
|
|
18
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
19
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
20
|
+
readonly name?: string | undefined;
|
|
21
|
+
readonly paging?: Record<string, {
|
|
22
|
+
size?: number | undefined;
|
|
23
|
+
}> | undefined;
|
|
24
|
+
readonly security?: {
|
|
25
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
26
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
27
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
readonly sign?: boolean | undefined;
|
|
30
|
+
readonly storeQueries?: boolean | undefined;
|
|
31
|
+
readonly timestamp?: boolean | undefined;
|
|
32
|
+
} & Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
33
|
+
accountDerivationPath?: string | undefined;
|
|
34
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
35
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
36
|
+
readonly name?: string | undefined;
|
|
37
|
+
readonly paging?: Record<string, {
|
|
38
|
+
size?: number | undefined;
|
|
39
|
+
}> | undefined;
|
|
40
|
+
readonly security?: {
|
|
41
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
42
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
43
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
readonly sign?: boolean | undefined;
|
|
46
|
+
readonly storeQueries?: boolean | undefined;
|
|
47
|
+
readonly timestamp?: boolean | undefined;
|
|
48
|
+
} & {
|
|
49
|
+
archivist?: string | undefined;
|
|
50
|
+
} & {
|
|
51
|
+
schema: "network.xyo.node.config";
|
|
52
|
+
}, "schema"> & {
|
|
53
|
+
schema: string;
|
|
54
|
+
}, "schema"> & {
|
|
55
|
+
schema: string;
|
|
56
|
+
};
|
|
57
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
58
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
59
|
+
}, import("@xyo-network/node-model").NodeModuleEventData> | undefined);
|
|
60
|
+
get archivist(): StorageArchivist<import("@xyo-network/core").BaseParamsFields & {
|
|
61
|
+
account?: AccountInstance | "random" | undefined;
|
|
62
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
63
|
+
accountDerivationPath?: string | undefined;
|
|
64
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
65
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
66
|
+
readonly name?: string | undefined;
|
|
67
|
+
readonly paging?: Record<string, {
|
|
68
|
+
size?: number | undefined;
|
|
69
|
+
}> | undefined;
|
|
70
|
+
readonly security?: {
|
|
71
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
72
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
73
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
74
|
+
} | undefined;
|
|
75
|
+
readonly sign?: boolean | undefined;
|
|
76
|
+
readonly storeQueries?: boolean | undefined;
|
|
77
|
+
readonly timestamp?: boolean | undefined;
|
|
78
|
+
} & Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
79
|
+
accountDerivationPath?: string | undefined;
|
|
80
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
81
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
82
|
+
readonly name?: string | undefined;
|
|
83
|
+
readonly paging?: Record<string, {
|
|
84
|
+
size?: number | undefined;
|
|
85
|
+
}> | undefined;
|
|
86
|
+
readonly security?: {
|
|
87
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
88
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
89
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
readonly sign?: boolean | undefined;
|
|
92
|
+
readonly storeQueries?: boolean | undefined;
|
|
93
|
+
readonly timestamp?: boolean | undefined;
|
|
94
|
+
} & {
|
|
95
|
+
maxEntries?: number | undefined;
|
|
96
|
+
maxEntrySize?: number | undefined;
|
|
97
|
+
namespace?: string | undefined;
|
|
98
|
+
persistAccount?: boolean | undefined;
|
|
99
|
+
schema: "network.xyo.archivist.storage.config";
|
|
100
|
+
type?: "local" | "session" | "page" | undefined;
|
|
101
|
+
} & {
|
|
102
|
+
parents?: import("@xyo-network/archivist").ArchivistParents | undefined;
|
|
103
|
+
requireAllParents?: boolean | undefined;
|
|
104
|
+
storeParentReads?: boolean | undefined;
|
|
105
|
+
}, "schema"> & {
|
|
106
|
+
schema: "network.xyo.archivist.storage.config";
|
|
107
|
+
}, "schema"> & {
|
|
108
|
+
schema: string;
|
|
109
|
+
}, "schema"> & {
|
|
110
|
+
schema: string;
|
|
111
|
+
};
|
|
112
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
113
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
114
|
+
}, import("@xyo-network/archivist").ArchivistModuleEventData>;
|
|
115
|
+
static create(config: ArchivistBuilderConfig, account: AccountInstance, node: MemoryNode): Promise<StorageArchivistBuilder>;
|
|
116
|
+
buildArchivist(): Promise<StorageArchivist<import("@xyo-network/core").BaseParamsFields & {
|
|
117
|
+
account?: AccountInstance | "random" | undefined;
|
|
118
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
119
|
+
accountDerivationPath?: string | undefined;
|
|
120
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
121
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
122
|
+
readonly name?: string | undefined;
|
|
123
|
+
readonly paging?: Record<string, {
|
|
124
|
+
size?: number | undefined;
|
|
125
|
+
}> | undefined;
|
|
126
|
+
readonly security?: {
|
|
127
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
128
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
129
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
130
|
+
} | undefined;
|
|
131
|
+
readonly sign?: boolean | undefined;
|
|
132
|
+
readonly storeQueries?: boolean | undefined;
|
|
133
|
+
readonly timestamp?: boolean | undefined;
|
|
134
|
+
} & Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
135
|
+
accountDerivationPath?: string | undefined;
|
|
136
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
137
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
138
|
+
readonly name?: string | undefined;
|
|
139
|
+
readonly paging?: Record<string, {
|
|
140
|
+
size?: number | undefined;
|
|
141
|
+
}> | undefined;
|
|
142
|
+
readonly security?: {
|
|
143
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
144
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
145
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
readonly sign?: boolean | undefined;
|
|
148
|
+
readonly storeQueries?: boolean | undefined;
|
|
149
|
+
readonly timestamp?: boolean | undefined;
|
|
150
|
+
} & {
|
|
151
|
+
maxEntries?: number | undefined;
|
|
152
|
+
maxEntrySize?: number | undefined;
|
|
153
|
+
namespace?: string | undefined;
|
|
154
|
+
persistAccount?: boolean | undefined;
|
|
155
|
+
schema: "network.xyo.archivist.storage.config";
|
|
156
|
+
type?: "local" | "session" | "page" | undefined;
|
|
157
|
+
} & {
|
|
158
|
+
parents?: import("@xyo-network/archivist").ArchivistParents | undefined;
|
|
159
|
+
requireAllParents?: boolean | undefined;
|
|
160
|
+
storeParentReads?: boolean | undefined;
|
|
161
|
+
}, "schema"> & {
|
|
162
|
+
schema: "network.xyo.archivist.storage.config";
|
|
163
|
+
}, "schema"> & {
|
|
164
|
+
schema: string;
|
|
165
|
+
}, "schema"> & {
|
|
166
|
+
schema: string;
|
|
167
|
+
};
|
|
168
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
169
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
170
|
+
}, import("@xyo-network/archivist").ArchivistModuleEventData>>;
|
|
171
|
+
buildConfig(): StorageArchivistConfig;
|
|
172
|
+
findParentArchivist(): Promise<import("@xyo-network/archivist").ArchivistInstance<import("@xyo-network/core").BaseParamsFields & {
|
|
173
|
+
account?: AccountInstance | "random" | undefined;
|
|
174
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
175
|
+
accountDerivationPath?: string | undefined;
|
|
176
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
177
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
178
|
+
readonly name?: string | undefined;
|
|
179
|
+
readonly paging?: Record<string, {
|
|
180
|
+
size?: number | undefined;
|
|
181
|
+
}> | undefined;
|
|
182
|
+
readonly security?: {
|
|
183
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
184
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
185
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
186
|
+
} | undefined;
|
|
187
|
+
readonly sign?: boolean | undefined;
|
|
188
|
+
readonly storeQueries?: boolean | undefined;
|
|
189
|
+
readonly timestamp?: boolean | undefined;
|
|
190
|
+
} & Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
191
|
+
accountDerivationPath?: string | undefined;
|
|
192
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
193
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
194
|
+
readonly name?: string | undefined;
|
|
195
|
+
readonly paging?: Record<string, {
|
|
196
|
+
size?: number | undefined;
|
|
197
|
+
}> | undefined;
|
|
198
|
+
readonly security?: {
|
|
199
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
200
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
201
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
202
|
+
} | undefined;
|
|
203
|
+
readonly sign?: boolean | undefined;
|
|
204
|
+
readonly storeQueries?: boolean | undefined;
|
|
205
|
+
readonly timestamp?: boolean | undefined;
|
|
206
|
+
} & {
|
|
207
|
+
parents?: import("@xyo-network/archivist").ArchivistParents | undefined;
|
|
208
|
+
requireAllParents?: boolean | undefined;
|
|
209
|
+
storeParentReads?: boolean | undefined;
|
|
210
|
+
} & {
|
|
211
|
+
schema: "network.xyo.archivist.config";
|
|
212
|
+
}, "schema"> & {
|
|
213
|
+
schema: string;
|
|
214
|
+
}, "schema"> & {
|
|
215
|
+
schema: string;
|
|
216
|
+
};
|
|
217
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
218
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
219
|
+
}, import("@xyo-network/archivist").ArchivistModuleEventData> | undefined>;
|
|
220
|
+
}
|
|
221
|
+
//# 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,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAwC,gBAAgB,EAAE,sBAAsB,EAAgC,MAAM,wBAAwB,CAAA;AACrJ,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAIrD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yEAAY;IAG3B,IAAI,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kEAEZ;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAY1B"}
|