@xyo-network/react-standard-node 6.1.3 → 6.2.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useActiveNodeAddress: (networkName?: string) =>
|
|
1
|
+
export declare const useActiveNodeAddress: (networkName?: string) => import("@xylabs/hex").Address | undefined;
|
|
2
2
|
//# sourceMappingURL=useActiveNodeAddress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveNodeAddress.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActiveNodeAddress.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"useActiveNodeAddress.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActiveNodeAddress.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,8CAWxD,CAAA"}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,126 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { MemoryNode } from '@xyo-network/node-memory';
|
|
7
|
-
import * as _xylabs_hex from '@xylabs/hex';
|
|
8
|
-
import { Address } from '@xylabs/hex';
|
|
9
|
-
import { WalletInstance } from '@xyo-network/wallet-model';
|
|
10
|
-
import * as _xyo_network_sentinel_model from '@xyo-network/sentinel-model';
|
|
11
|
-
import { SentinelConfig } from '@xyo-network/sentinel-model';
|
|
12
|
-
import * as _xyo_network_sentinel_memory from '@xyo-network/sentinel-memory';
|
|
13
|
-
import { MemorySentinel, MemorySentinelParams } from '@xyo-network/sentinel-memory';
|
|
14
|
-
import * as _xyo_network_module_model from '@xyo-network/module-model';
|
|
15
|
-
import { AttachableModuleInstance } from '@xyo-network/module-model';
|
|
16
|
-
import * as _xyo_network_node_model from '@xyo-network/node-model';
|
|
17
|
-
import { AccountInstance } from '@xyo-network/account-model';
|
|
18
|
-
import { PayloadSetPluginResolver } from '@xyo-network/payloadset-plugin';
|
|
19
|
-
import { AttachableWitnessInstance } from '@xyo-network/witness-model';
|
|
20
|
-
import * as _xyo_network_payload_model from '@xyo-network/payload-model';
|
|
21
|
-
import * as _xyo_network_archivist_model from '@xyo-network/archivist-model';
|
|
22
|
-
import * as _xyo_network_archivist_storage from '@xyo-network/archivist-storage';
|
|
23
|
-
import { StorageArchivist, StorageArchivistConfig } from '@xyo-network/archivist-storage';
|
|
24
|
-
|
|
25
|
-
interface ActiveStandardNodeProps extends PropsWithChildren {
|
|
26
|
-
nodeNameOrAddress?: string;
|
|
27
|
-
}
|
|
28
|
-
declare const ActiveStandardNode: React__default.FC<ActiveStandardNodeProps>;
|
|
29
|
-
|
|
30
|
-
declare const StandardNodesContext: React.Context<({
|
|
31
|
-
findAddressByName?: (name?: string) => _xylabs_hex.Address | undefined;
|
|
32
|
-
nodes?: _xyo_network_node_memory.MemoryNode[];
|
|
33
|
-
} & {
|
|
34
|
-
provided: true;
|
|
35
|
-
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.ProvidedContextExState<{
|
|
36
|
-
findAddressByName?: (name?: string) => _xylabs_hex.Address | undefined;
|
|
37
|
-
nodes?: _xyo_network_node_memory.MemoryNode[];
|
|
38
|
-
}>, never> & {
|
|
39
|
-
provided: false;
|
|
40
|
-
}) | (_xylabs_react_shared.FixedValues<_xylabs_react_shared.NotProvidedContextExState<{
|
|
41
|
-
findAddressByName?: (name?: string) => _xylabs_hex.Address | undefined;
|
|
42
|
-
nodes?: _xyo_network_node_memory.MemoryNode[];
|
|
43
|
-
}>, never> & {
|
|
44
|
-
provided: false;
|
|
45
|
-
})>;
|
|
46
|
-
|
|
47
|
-
type StandardNodesState = ContextExState<{
|
|
48
|
-
findAddressByName?: (name?: string) => Address | undefined;
|
|
49
|
-
nodes?: MemoryNode[];
|
|
50
|
-
}>;
|
|
51
|
-
|
|
52
|
-
type StandardNodesProviderProps = PropsWithChildren<{
|
|
53
|
-
defaultRemoteNodes?: StandardNodesState['nodes'];
|
|
54
|
-
wallet?: WalletInstance | null;
|
|
55
|
-
}>;
|
|
56
|
-
declare const StandardNodesProvider: React__default.FC<StandardNodesProviderProps>;
|
|
57
|
-
declare const StandardNodesProviderWithWallet: React__default.FC<Omit<StandardNodesProviderProps, 'wallet'>>;
|
|
58
|
-
|
|
59
|
-
declare const useStandardNodes: (required?: boolean) => Omit<{
|
|
60
|
-
findAddressByName?: (name?: string) => _xylabs_hex.Address | undefined;
|
|
61
|
-
nodes?: _xyo_network_node_memory.MemoryNode[];
|
|
62
|
-
} & {
|
|
63
|
-
provided: true;
|
|
64
|
-
}, "provided"> | Omit<_xylabs_react_shared.NotProvidedContextExState<StandardNodesState>, "provided">;
|
|
65
|
-
|
|
66
|
-
declare const useActiveNodeAddress: (networkName?: string) => Lowercase<string> | undefined;
|
|
67
|
-
|
|
68
|
-
interface MemoryNodeBuilderConfig {
|
|
69
|
-
name?: string;
|
|
70
|
-
node?: MemoryNode;
|
|
71
|
-
}
|
|
72
|
-
declare class MemoryNodeBuilder {
|
|
73
|
-
private _node;
|
|
74
|
-
get node(): MemoryNode<_xyo_network_node_memory.MemoryNodeParams, _xyo_network_node_model.NodeModuleEventData>;
|
|
75
|
-
static create({ name, node }: MemoryNodeBuilderConfig, account?: AccountInstance): Promise<MemoryNodeBuilder>;
|
|
76
|
-
/** @deprecated - call specific method that corresponds to a type of archivist (i.e. addArchivistStorage) */
|
|
77
|
-
addArchivist(account: AccountInstance, moduleName?: string, namespace?: string): Promise<void>;
|
|
78
|
-
addArchivistMemory(moduleName?: string, account?: AccountInstance): Promise<void>;
|
|
79
|
-
addArchivistStorage(account: AccountInstance, moduleName?: string, namespace?: string): Promise<void>;
|
|
80
|
-
addBridge(apiDomain: string, moduleName?: string, account?: AccountInstance): Promise<void>;
|
|
81
|
-
addSentinel(config: SentinelConfig, account: AccountInstance): Promise<_xyo_network_sentinel_memory.MemorySentinel<_xyo_network_sentinel_memory.MemorySentinelParams<_xyo_network_module_model.AnyConfigSchema<SentinelConfig>>, _xyo_network_sentinel_model.SentinelModuleEventData<_xyo_network_sentinel_model.SentinelInstance<_xyo_network_sentinel_memory.MemorySentinelParams<_xyo_network_module_model.AnyConfigSchema<SentinelConfig>>, _xyo_network_sentinel_model.SentinelModuleEventData<_xyo_network_module_model.Module<_xyo_network_module_model.ModuleParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_module_model.ModuleConfig>>, _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
|
-
|
|
87
|
-
declare class SentinelBuilder {
|
|
88
|
-
private config;
|
|
89
|
-
private account;
|
|
90
|
-
private _sentinel;
|
|
91
|
-
protected constructor(config: SentinelConfig, account: AccountInstance);
|
|
92
|
-
get sentinel(): MemorySentinel<MemorySentinelParams<_xyo_network_module_model.AnyConfigSchema<SentinelConfig>>, _xyo_network_sentinel_model.SentinelModuleEventData<_xyo_network_sentinel_model.SentinelInstance<MemorySentinelParams<_xyo_network_module_model.AnyConfigSchema<SentinelConfig>>, _xyo_network_sentinel_model.SentinelModuleEventData<_xyo_network_module_model.Module<_xyo_network_module_model.ModuleParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_module_model.ModuleConfig>>, _xyo_network_module_model.ModuleEventData<object>>>>>>;
|
|
93
|
-
static create(config: SentinelConfig, account: AccountInstance): Promise<SentinelBuilder>;
|
|
94
|
-
buildSentinel(): Promise<MemorySentinel<MemorySentinelParams<_xyo_network_module_model.AnyConfigSchema<SentinelConfig>>, _xyo_network_sentinel_model.SentinelModuleEventData<_xyo_network_sentinel_model.SentinelInstance<MemorySentinelParams<_xyo_network_module_model.AnyConfigSchema<SentinelConfig>>, _xyo_network_sentinel_model.SentinelModuleEventData<_xyo_network_module_model.Module<_xyo_network_module_model.ModuleParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_module_model.ModuleConfig>>, _xyo_network_module_model.ModuleEventData<object>>>>>>>;
|
|
95
|
-
private buildParams;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
interface ArchivistBuilderConfig {
|
|
99
|
-
name?: string;
|
|
100
|
-
namespace?: string;
|
|
101
|
-
}
|
|
102
|
-
declare class StorageArchivistBuilder {
|
|
103
|
-
private config;
|
|
104
|
-
private account;
|
|
105
|
-
private node?;
|
|
106
|
-
private _archivist;
|
|
107
|
-
private remoteArchivist;
|
|
108
|
-
protected constructor(config: ArchivistBuilderConfig, account: AccountInstance, node?: MemoryNode | undefined);
|
|
109
|
-
get archivist(): StorageArchivist<_xyo_network_archivist_storage.StorageArchivistParams, _xyo_network_archivist_model.ArchivistModuleEventData>;
|
|
110
|
-
static create(config: ArchivistBuilderConfig, account: AccountInstance, node: MemoryNode): Promise<StorageArchivistBuilder>;
|
|
111
|
-
buildArchivist(): Promise<StorageArchivist<_xyo_network_archivist_storage.StorageArchivistParams, _xyo_network_archivist_model.ArchivistModuleEventData>>;
|
|
112
|
-
buildConfig(): StorageArchivistConfig;
|
|
113
|
-
findParentArchivist(): Promise<_xyo_network_archivist_model.ArchivistInstance<_xyo_network_archivist_model.ArchivistParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_archivist_model.ArchivistConfig<void, void>>>, _xyo_network_archivist_model.ArchivistModuleEventData, _xyo_network_payload_model.Payload<void, void>> | undefined>;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
declare const BuildStandardNodes: (wallet: WalletInstance, onNodeBuilt?: (node: MemoryNode) => void) => Promise<MemoryNode[]>;
|
|
117
|
-
|
|
118
|
-
declare const GlobalNodeOffsetPath = "15";
|
|
119
|
-
declare const RemoteNodeOffsetPaths: Record<string, string>;
|
|
120
|
-
declare const RemoteNodeArchivistOffsetPaths: Record<string, Record<string, string>>;
|
|
121
|
-
|
|
122
|
-
declare const GlobalNode = "GlobalNode";
|
|
123
|
-
declare const RootStorageArchivist = "RootStorageArchivist";
|
|
124
|
-
|
|
125
|
-
export { ActiveStandardNode, BuildStandardNodes, GlobalNode, GlobalNodeOffsetPath, MemoryNodeBuilder, RemoteNodeArchivistOffsetPaths, RemoteNodeOffsetPaths, RootStorageArchivist, SentinelBuilder, StandardNodesContext, StandardNodesProvider, StandardNodesProviderWithWallet, StorageArchivistBuilder, useActiveNodeAddress, useStandardNodes };
|
|
126
|
-
export type { ActiveStandardNodeProps, ArchivistBuilderConfig, MemoryNodeBuilderConfig, StandardNodesProviderProps, StandardNodesState };
|
|
1
|
+
export * from './components/index.ts';
|
|
2
|
+
export * from './contexts/index.ts';
|
|
3
|
+
export * from './hooks/index.ts';
|
|
4
|
+
export * from './lib/index.ts';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-standard-node",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -39,39 +39,39 @@
|
|
|
39
39
|
"module": "dist/browser/index.mjs",
|
|
40
40
|
"types": "dist/browser/index.d.ts",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@xylabs/assert": "^4.
|
|
43
|
-
"@xylabs/hex": "^4.
|
|
44
|
-
"@xylabs/react-async-effect": "^6.
|
|
45
|
-
"@xylabs/react-hooks": "^6.
|
|
46
|
-
"@xylabs/react-promise": "^6.
|
|
47
|
-
"@xylabs/react-shared": "^6.
|
|
48
|
-
"@xyo-network/account-model": "^4.
|
|
49
|
-
"@xyo-network/archivist-memory": "^4.
|
|
50
|
-
"@xyo-network/archivist-model": "^4.
|
|
51
|
-
"@xyo-network/archivist-storage": "^4.
|
|
52
|
-
"@xyo-network/bridge-http": "^4.
|
|
53
|
-
"@xyo-network/module-model": "^4.
|
|
54
|
-
"@xyo-network/node-memory": "^4.
|
|
55
|
-
"@xyo-network/node-model": "^4.
|
|
56
|
-
"@xyo-network/payloadset-plugin": "^4.
|
|
57
|
-
"@xyo-network/react-network": "^6.
|
|
58
|
-
"@xyo-network/react-node": "^6.
|
|
59
|
-
"@xyo-network/react-wallet": "^6.
|
|
60
|
-
"@xyo-network/sentinel-memory": "^4.
|
|
61
|
-
"@xyo-network/sentinel-model": "^4.
|
|
62
|
-
"@xyo-network/wallet-model": "^4.
|
|
63
|
-
"@xyo-network/witness-model": "^4.
|
|
42
|
+
"@xylabs/assert": "^4.15.0",
|
|
43
|
+
"@xylabs/hex": "^4.15.0",
|
|
44
|
+
"@xylabs/react-async-effect": "^6.4.0",
|
|
45
|
+
"@xylabs/react-hooks": "^6.4.0",
|
|
46
|
+
"@xylabs/react-promise": "^6.4.0",
|
|
47
|
+
"@xylabs/react-shared": "^6.4.0",
|
|
48
|
+
"@xyo-network/account-model": "^4.3.0",
|
|
49
|
+
"@xyo-network/archivist-memory": "^4.3.0",
|
|
50
|
+
"@xyo-network/archivist-model": "^4.3.0",
|
|
51
|
+
"@xyo-network/archivist-storage": "^4.3.0",
|
|
52
|
+
"@xyo-network/bridge-http": "^4.3.0",
|
|
53
|
+
"@xyo-network/module-model": "^4.3.0",
|
|
54
|
+
"@xyo-network/node-memory": "^4.3.0",
|
|
55
|
+
"@xyo-network/node-model": "^4.3.0",
|
|
56
|
+
"@xyo-network/payloadset-plugin": "^4.3.0",
|
|
57
|
+
"@xyo-network/react-network": "^6.2.0",
|
|
58
|
+
"@xyo-network/react-node": "^6.2.0",
|
|
59
|
+
"@xyo-network/react-wallet": "^6.2.0",
|
|
60
|
+
"@xyo-network/sentinel-memory": "^4.3.0",
|
|
61
|
+
"@xyo-network/sentinel-model": "^4.3.0",
|
|
62
|
+
"@xyo-network/wallet-model": "^4.3.0",
|
|
63
|
+
"@xyo-network/witness-model": "^4.3.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@mui/icons-material": "^7.2.0",
|
|
67
67
|
"@mui/material": "^7.2.0",
|
|
68
68
|
"@types/react": "^19.1.8",
|
|
69
|
-
"@xylabs/ts-scripts-yarn3": "
|
|
70
|
-
"@xylabs/tsconfig-react": "
|
|
71
|
-
"react": "^19.1.
|
|
72
|
-
"react-dom": "^19.1.
|
|
73
|
-
"react-router-dom": "^7.7.
|
|
74
|
-
"storybook": "^9.0.
|
|
69
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.1",
|
|
70
|
+
"@xylabs/tsconfig-react": "^7.0.1",
|
|
71
|
+
"react": "^19.1.1",
|
|
72
|
+
"react-dom": "^19.1.1",
|
|
73
|
+
"react-router-dom": "^7.7.1",
|
|
74
|
+
"storybook": "^9.0.18",
|
|
75
75
|
"typescript": "^5.8.3"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|