@xyo-network/react-node 2.75.0 → 2.75.2

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.
Files changed (48) hide show
  1. package/dist/browser/hooks/ModuleFromNodeConfig.d.cts +2 -2
  2. package/dist/browser/hooks/ModuleFromNodeConfig.d.cts.map +1 -1
  3. package/dist/browser/hooks/ModuleFromNodeConfig.d.mts +2 -2
  4. package/dist/browser/hooks/ModuleFromNodeConfig.d.mts.map +1 -1
  5. package/dist/browser/hooks/ModuleFromNodeConfig.d.ts +2 -2
  6. package/dist/browser/hooks/ModuleFromNodeConfig.d.ts.map +1 -1
  7. package/dist/browser/hooks/useModuleFromNode.d.cts +67 -1
  8. package/dist/browser/hooks/useModuleFromNode.d.cts.map +1 -1
  9. package/dist/browser/hooks/useModuleFromNode.d.mts +67 -1
  10. package/dist/browser/hooks/useModuleFromNode.d.mts.map +1 -1
  11. package/dist/browser/hooks/useModuleFromNode.d.ts +67 -1
  12. package/dist/browser/hooks/useModuleFromNode.d.ts.map +1 -1
  13. package/dist/browser/hooks/useWeakModuleFromNode.d.cts +56 -1
  14. package/dist/browser/hooks/useWeakModuleFromNode.d.cts.map +1 -1
  15. package/dist/browser/hooks/useWeakModuleFromNode.d.mts +56 -1
  16. package/dist/browser/hooks/useWeakModuleFromNode.d.mts.map +1 -1
  17. package/dist/browser/hooks/useWeakModuleFromNode.d.ts +56 -1
  18. package/dist/browser/hooks/useWeakModuleFromNode.d.ts.map +1 -1
  19. package/dist/browser/index.cjs +10 -9
  20. package/dist/browser/index.cjs.map +1 -1
  21. package/dist/browser/index.js +47 -46
  22. package/dist/browser/index.js.map +1 -1
  23. package/dist/node/hooks/ModuleFromNodeConfig.d.cts +2 -2
  24. package/dist/node/hooks/ModuleFromNodeConfig.d.cts.map +1 -1
  25. package/dist/node/hooks/ModuleFromNodeConfig.d.mts +2 -2
  26. package/dist/node/hooks/ModuleFromNodeConfig.d.mts.map +1 -1
  27. package/dist/node/hooks/ModuleFromNodeConfig.d.ts +2 -2
  28. package/dist/node/hooks/ModuleFromNodeConfig.d.ts.map +1 -1
  29. package/dist/node/hooks/useModuleFromNode.d.cts +67 -1
  30. package/dist/node/hooks/useModuleFromNode.d.cts.map +1 -1
  31. package/dist/node/hooks/useModuleFromNode.d.mts +67 -1
  32. package/dist/node/hooks/useModuleFromNode.d.mts.map +1 -1
  33. package/dist/node/hooks/useModuleFromNode.d.ts +67 -1
  34. package/dist/node/hooks/useModuleFromNode.d.ts.map +1 -1
  35. package/dist/node/hooks/useWeakModuleFromNode.d.cts +56 -1
  36. package/dist/node/hooks/useWeakModuleFromNode.d.cts.map +1 -1
  37. package/dist/node/hooks/useWeakModuleFromNode.d.mts +56 -1
  38. package/dist/node/hooks/useWeakModuleFromNode.d.mts.map +1 -1
  39. package/dist/node/hooks/useWeakModuleFromNode.d.ts +56 -1
  40. package/dist/node/hooks/useWeakModuleFromNode.d.ts.map +1 -1
  41. package/dist/node/index.cjs +10 -9
  42. package/dist/node/index.cjs.map +1 -1
  43. package/dist/node/index.js +47 -46
  44. package/dist/node/index.js.map +1 -1
  45. package/package.json +12 -11
  46. package/src/hooks/ModuleFromNodeConfig.ts +2 -2
  47. package/src/hooks/useModuleFromNode.ts +13 -9
  48. package/src/hooks/useWeakModuleFromNode.ts +13 -10
@@ -1,7 +1,7 @@
1
1
  import { Logger } from '@xylabs/logger';
2
- import { ModuleFilterOptions } from '@xyo-network/module-model';
2
+ import { ModuleFilterOptions, ModuleInstance } from '@xyo-network/module-model';
3
3
  import { NodeInstance } from '@xyo-network/node-model';
4
- export type ModuleFromNodeConfig = ModuleFilterOptions & {
4
+ export type ModuleFromNodeConfig<T extends ModuleInstance = ModuleInstance> = ModuleFilterOptions & {
5
5
  logger?: Logger;
6
6
  node?: NodeInstance | string;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleFromNodeConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/ModuleFromNodeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IACvD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,6BAA6B,YAAa,oBAAoB,uBAE1E,CAAA"}
1
+ {"version":3,"file":"ModuleFromNodeConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/ModuleFromNodeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI,mBAAmB,GAAG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,6BAA6B,YAAa,oBAAoB,uBAE1E,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { Logger } from '@xylabs/logger';
2
- import { ModuleFilterOptions } from '@xyo-network/module-model';
2
+ import { ModuleFilterOptions, ModuleInstance } from '@xyo-network/module-model';
3
3
  import { NodeInstance } from '@xyo-network/node-model';
4
- export type ModuleFromNodeConfig = ModuleFilterOptions & {
4
+ export type ModuleFromNodeConfig<T extends ModuleInstance = ModuleInstance> = ModuleFilterOptions & {
5
5
  logger?: Logger;
6
6
  node?: NodeInstance | string;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleFromNodeConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/ModuleFromNodeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IACvD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,6BAA6B,YAAa,oBAAoB,uBAE1E,CAAA"}
1
+ {"version":3,"file":"ModuleFromNodeConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/ModuleFromNodeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI,mBAAmB,GAAG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,6BAA6B,YAAa,oBAAoB,uBAE1E,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { Logger } from '@xylabs/logger';
2
- import { ModuleFilterOptions } from '@xyo-network/module-model';
2
+ import { ModuleFilterOptions, ModuleInstance } from '@xyo-network/module-model';
3
3
  import { NodeInstance } from '@xyo-network/node-model';
4
- export type ModuleFromNodeConfig = ModuleFilterOptions & {
4
+ export type ModuleFromNodeConfig<T extends ModuleInstance = ModuleInstance> = ModuleFilterOptions & {
5
5
  logger?: Logger;
6
6
  node?: NodeInstance | string;
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleFromNodeConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/ModuleFromNodeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IACvD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,6BAA6B,YAAa,oBAAoB,uBAE1E,CAAA"}
1
+ {"version":3,"file":"ModuleFromNodeConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/ModuleFromNodeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI,mBAAmB,GAAG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,6BAA6B,YAAa,oBAAoB,uBAE1E,CAAA"}
@@ -1,5 +1,71 @@
1
1
  import { ModuleInstance } from '@xyo-network/module-model';
2
2
  import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
3
3
  /** @deprecated use useWeakModuleFromNode */
4
- export declare const useModuleFromNode: (nameOrAddressOrInstance?: string | ModuleInstance, config?: ModuleFromNodeConfig) => [ModuleInstance | undefined, Error | undefined];
4
+ export declare const useModuleFromNode: <T extends void | ModuleInstance<import("@xylabs/object").BaseParamsFields & {
5
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
6
+ addToResolvers?: boolean | undefined;
7
+ allowNameResolution?: boolean | undefined;
8
+ 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 & {
9
+ schema: "network.xyo.module.config";
10
+ }, "schema"> & {
11
+ schema: string;
12
+ };
13
+ ephemeralQueryAccountEnabled?: boolean | undefined;
14
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
15
+ }, import("@xyo-network/module-model").ModuleEventData<object>> = void>(nameOrAddressOrInstance?: string | (T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
16
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
17
+ addToResolvers?: boolean | undefined;
18
+ allowNameResolution?: boolean | undefined;
19
+ 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 & {
20
+ schema: "network.xyo.module.config";
21
+ }, "schema"> & {
22
+ schema: string;
23
+ };
24
+ ephemeralQueryAccountEnabled?: boolean | undefined;
25
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
26
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
27
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
28
+ addToResolvers?: boolean | undefined;
29
+ allowNameResolution?: boolean | undefined;
30
+ 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 & {
31
+ schema: "network.xyo.module.config";
32
+ }, "schema"> & {
33
+ schema: string;
34
+ };
35
+ ephemeralQueryAccountEnabled?: boolean | undefined;
36
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
37
+ }, import("@xyo-network/module-model").ModuleEventData<object>>) | undefined, config?: (T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
38
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
39
+ addToResolvers?: boolean | undefined;
40
+ allowNameResolution?: boolean | undefined;
41
+ 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 & {
42
+ schema: "network.xyo.module.config";
43
+ }, "schema"> & {
44
+ schema: string;
45
+ };
46
+ ephemeralQueryAccountEnabled?: boolean | undefined;
47
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
48
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? ModuleFromNodeConfig<T_1> : ModuleFromNodeConfig<T_1> | undefined) | undefined) => [(T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
49
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
50
+ addToResolvers?: boolean | undefined;
51
+ allowNameResolution?: boolean | undefined;
52
+ 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 & {
53
+ schema: "network.xyo.module.config";
54
+ }, "schema"> & {
55
+ schema: string;
56
+ };
57
+ ephemeralQueryAccountEnabled?: boolean | undefined;
58
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
59
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
60
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
61
+ addToResolvers?: boolean | undefined;
62
+ allowNameResolution?: boolean | undefined;
63
+ 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 & {
64
+ schema: "network.xyo.module.config";
65
+ }, "schema"> & {
66
+ schema: string;
67
+ };
68
+ ephemeralQueryAccountEnabled?: boolean | undefined;
69
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
70
+ }, import("@xyo-network/module-model").ModuleEventData<object>>) | undefined, Error | undefined];
5
71
  //# sourceMappingURL=useModuleFromNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsC,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG9F,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB,6BACF,MAAM,GAAG,cAAc,WACxC,oBAAoB,KAC5B,CAAC,cAAc,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAkChD,CAAA"}
1
+ {"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG5E,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gGAwC7B,CAAA"}
@@ -1,5 +1,71 @@
1
1
  import { ModuleInstance } from '@xyo-network/module-model';
2
2
  import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
3
3
  /** @deprecated use useWeakModuleFromNode */
4
- export declare const useModuleFromNode: (nameOrAddressOrInstance?: string | ModuleInstance, config?: ModuleFromNodeConfig) => [ModuleInstance | undefined, Error | undefined];
4
+ export declare const useModuleFromNode: <T extends void | ModuleInstance<import("@xylabs/object").BaseParamsFields & {
5
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
6
+ addToResolvers?: boolean | undefined;
7
+ allowNameResolution?: boolean | undefined;
8
+ 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 & {
9
+ schema: "network.xyo.module.config";
10
+ }, "schema"> & {
11
+ schema: string;
12
+ };
13
+ ephemeralQueryAccountEnabled?: boolean | undefined;
14
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
15
+ }, import("@xyo-network/module-model").ModuleEventData<object>> = void>(nameOrAddressOrInstance?: string | (T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
16
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
17
+ addToResolvers?: boolean | undefined;
18
+ allowNameResolution?: boolean | undefined;
19
+ 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 & {
20
+ schema: "network.xyo.module.config";
21
+ }, "schema"> & {
22
+ schema: string;
23
+ };
24
+ ephemeralQueryAccountEnabled?: boolean | undefined;
25
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
26
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
27
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
28
+ addToResolvers?: boolean | undefined;
29
+ allowNameResolution?: boolean | undefined;
30
+ 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 & {
31
+ schema: "network.xyo.module.config";
32
+ }, "schema"> & {
33
+ schema: string;
34
+ };
35
+ ephemeralQueryAccountEnabled?: boolean | undefined;
36
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
37
+ }, import("@xyo-network/module-model").ModuleEventData<object>>) | undefined, config?: (T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
38
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
39
+ addToResolvers?: boolean | undefined;
40
+ allowNameResolution?: boolean | undefined;
41
+ 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 & {
42
+ schema: "network.xyo.module.config";
43
+ }, "schema"> & {
44
+ schema: string;
45
+ };
46
+ ephemeralQueryAccountEnabled?: boolean | undefined;
47
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
48
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? ModuleFromNodeConfig<T_1> : ModuleFromNodeConfig<T_1> | undefined) | undefined) => [(T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
49
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
50
+ addToResolvers?: boolean | undefined;
51
+ allowNameResolution?: boolean | undefined;
52
+ 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 & {
53
+ schema: "network.xyo.module.config";
54
+ }, "schema"> & {
55
+ schema: string;
56
+ };
57
+ ephemeralQueryAccountEnabled?: boolean | undefined;
58
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
59
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
60
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
61
+ addToResolvers?: boolean | undefined;
62
+ allowNameResolution?: boolean | undefined;
63
+ 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 & {
64
+ schema: "network.xyo.module.config";
65
+ }, "schema"> & {
66
+ schema: string;
67
+ };
68
+ ephemeralQueryAccountEnabled?: boolean | undefined;
69
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
70
+ }, import("@xyo-network/module-model").ModuleEventData<object>>) | undefined, Error | undefined];
5
71
  //# sourceMappingURL=useModuleFromNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsC,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG9F,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB,6BACF,MAAM,GAAG,cAAc,WACxC,oBAAoB,KAC5B,CAAC,cAAc,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAkChD,CAAA"}
1
+ {"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG5E,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gGAwC7B,CAAA"}
@@ -1,5 +1,71 @@
1
1
  import { ModuleInstance } from '@xyo-network/module-model';
2
2
  import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
3
3
  /** @deprecated use useWeakModuleFromNode */
4
- export declare const useModuleFromNode: (nameOrAddressOrInstance?: string | ModuleInstance, config?: ModuleFromNodeConfig) => [ModuleInstance | undefined, Error | undefined];
4
+ export declare const useModuleFromNode: <T extends void | ModuleInstance<import("@xylabs/object").BaseParamsFields & {
5
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
6
+ addToResolvers?: boolean | undefined;
7
+ allowNameResolution?: boolean | undefined;
8
+ 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 & {
9
+ schema: "network.xyo.module.config";
10
+ }, "schema"> & {
11
+ schema: string;
12
+ };
13
+ ephemeralQueryAccountEnabled?: boolean | undefined;
14
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
15
+ }, import("@xyo-network/module-model").ModuleEventData<object>> = void>(nameOrAddressOrInstance?: string | (T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
16
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
17
+ addToResolvers?: boolean | undefined;
18
+ allowNameResolution?: boolean | undefined;
19
+ 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 & {
20
+ schema: "network.xyo.module.config";
21
+ }, "schema"> & {
22
+ schema: string;
23
+ };
24
+ ephemeralQueryAccountEnabled?: boolean | undefined;
25
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
26
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
27
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
28
+ addToResolvers?: boolean | undefined;
29
+ allowNameResolution?: boolean | undefined;
30
+ 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 & {
31
+ schema: "network.xyo.module.config";
32
+ }, "schema"> & {
33
+ schema: string;
34
+ };
35
+ ephemeralQueryAccountEnabled?: boolean | undefined;
36
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
37
+ }, import("@xyo-network/module-model").ModuleEventData<object>>) | undefined, config?: (T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
38
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
39
+ addToResolvers?: boolean | undefined;
40
+ allowNameResolution?: boolean | undefined;
41
+ 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 & {
42
+ schema: "network.xyo.module.config";
43
+ }, "schema"> & {
44
+ schema: string;
45
+ };
46
+ ephemeralQueryAccountEnabled?: boolean | undefined;
47
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
48
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? ModuleFromNodeConfig<T_1> : ModuleFromNodeConfig<T_1> | undefined) | undefined) => [(T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
49
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
50
+ addToResolvers?: boolean | undefined;
51
+ allowNameResolution?: boolean | undefined;
52
+ 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 & {
53
+ schema: "network.xyo.module.config";
54
+ }, "schema"> & {
55
+ schema: string;
56
+ };
57
+ ephemeralQueryAccountEnabled?: boolean | undefined;
58
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
59
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
60
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
61
+ addToResolvers?: boolean | undefined;
62
+ allowNameResolution?: boolean | undefined;
63
+ 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 & {
64
+ schema: "network.xyo.module.config";
65
+ }, "schema"> & {
66
+ schema: string;
67
+ };
68
+ ephemeralQueryAccountEnabled?: boolean | undefined;
69
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
70
+ }, import("@xyo-network/module-model").ModuleEventData<object>>) | undefined, Error | undefined];
5
71
  //# sourceMappingURL=useModuleFromNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsC,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG9F,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB,6BACF,MAAM,GAAG,cAAc,WACxC,oBAAoB,KAC5B,CAAC,cAAc,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAkChD,CAAA"}
1
+ {"version":3,"file":"useModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useModuleFromNode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG5E,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gGAwC7B,CAAA"}
@@ -1,4 +1,59 @@
1
1
  import { ModuleInstance } from '@xyo-network/module-model';
2
2
  import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
3
- export declare const useWeakModuleFromNode: (nameOrAddressOrInstance?: string | ModuleInstance, config?: ModuleFromNodeConfig) => [WeakRef<ModuleInstance> | undefined, Error | undefined];
3
+ export declare const useWeakModuleFromNode: <T extends void | ModuleInstance<import("@xylabs/object").BaseParamsFields & {
4
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
5
+ addToResolvers?: boolean | undefined;
6
+ allowNameResolution?: boolean | undefined;
7
+ 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 & {
8
+ schema: "network.xyo.module.config";
9
+ }, "schema"> & {
10
+ schema: string;
11
+ };
12
+ ephemeralQueryAccountEnabled?: boolean | undefined;
13
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
14
+ }, import("@xyo-network/module-model").ModuleEventData<object>> = void>(nameOrAddressOrInstance?: string | (T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
15
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
16
+ addToResolvers?: boolean | undefined;
17
+ allowNameResolution?: boolean | undefined;
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
+ schema: "network.xyo.module.config";
20
+ }, "schema"> & {
21
+ schema: string;
22
+ };
23
+ ephemeralQueryAccountEnabled?: boolean | undefined;
24
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
25
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
26
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
27
+ addToResolvers?: boolean | undefined;
28
+ allowNameResolution?: boolean | undefined;
29
+ 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 & {
30
+ schema: "network.xyo.module.config";
31
+ }, "schema"> & {
32
+ schema: string;
33
+ };
34
+ ephemeralQueryAccountEnabled?: boolean | undefined;
35
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
36
+ }, import("@xyo-network/module-model").ModuleEventData<object>>) | undefined, config?: ModuleFromNodeConfig) => [WeakRef<T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
37
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
38
+ addToResolvers?: boolean | undefined;
39
+ allowNameResolution?: boolean | undefined;
40
+ 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 & {
41
+ schema: "network.xyo.module.config";
42
+ }, "schema"> & {
43
+ schema: string;
44
+ };
45
+ ephemeralQueryAccountEnabled?: boolean | undefined;
46
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
47
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
48
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
49
+ addToResolvers?: boolean | undefined;
50
+ allowNameResolution?: boolean | undefined;
51
+ 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 & {
52
+ schema: "network.xyo.module.config";
53
+ }, "schema"> & {
54
+ schema: string;
55
+ };
56
+ ephemeralQueryAccountEnabled?: boolean | undefined;
57
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
58
+ }, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined, Error | undefined];
4
59
  //# sourceMappingURL=useWeakModuleFromNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWeakModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWeakModuleFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAsC,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG9F,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,eAAO,MAAM,qBAAqB,6BACN,MAAM,GAAG,cAAc,WACxC,oBAAoB,KAC5B,CAAC,QAAQ,cAAc,CAAC,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAoCzD,CAAA"}
1
+ {"version":3,"file":"useWeakModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWeakModuleFromNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG5E,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAEvB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;gGAuC9B,CAAA"}
@@ -1,4 +1,59 @@
1
1
  import { ModuleInstance } from '@xyo-network/module-model';
2
2
  import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
3
- export declare const useWeakModuleFromNode: (nameOrAddressOrInstance?: string | ModuleInstance, config?: ModuleFromNodeConfig) => [WeakRef<ModuleInstance> | undefined, Error | undefined];
3
+ export declare const useWeakModuleFromNode: <T extends void | ModuleInstance<import("@xylabs/object").BaseParamsFields & {
4
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
5
+ addToResolvers?: boolean | undefined;
6
+ allowNameResolution?: boolean | undefined;
7
+ 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 & {
8
+ schema: "network.xyo.module.config";
9
+ }, "schema"> & {
10
+ schema: string;
11
+ };
12
+ ephemeralQueryAccountEnabled?: boolean | undefined;
13
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
14
+ }, import("@xyo-network/module-model").ModuleEventData<object>> = void>(nameOrAddressOrInstance?: string | (T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
15
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
16
+ addToResolvers?: boolean | undefined;
17
+ allowNameResolution?: boolean | undefined;
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
+ schema: "network.xyo.module.config";
20
+ }, "schema"> & {
21
+ schema: string;
22
+ };
23
+ ephemeralQueryAccountEnabled?: boolean | undefined;
24
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
25
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
26
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
27
+ addToResolvers?: boolean | undefined;
28
+ allowNameResolution?: boolean | undefined;
29
+ 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 & {
30
+ schema: "network.xyo.module.config";
31
+ }, "schema"> & {
32
+ schema: string;
33
+ };
34
+ ephemeralQueryAccountEnabled?: boolean | undefined;
35
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
36
+ }, import("@xyo-network/module-model").ModuleEventData<object>>) | undefined, config?: ModuleFromNodeConfig) => [WeakRef<T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
37
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
38
+ addToResolvers?: boolean | undefined;
39
+ allowNameResolution?: boolean | undefined;
40
+ 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 & {
41
+ schema: "network.xyo.module.config";
42
+ }, "schema"> & {
43
+ schema: string;
44
+ };
45
+ ephemeralQueryAccountEnabled?: boolean | undefined;
46
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
47
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
48
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
49
+ addToResolvers?: boolean | undefined;
50
+ allowNameResolution?: boolean | undefined;
51
+ 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 & {
52
+ schema: "network.xyo.module.config";
53
+ }, "schema"> & {
54
+ schema: string;
55
+ };
56
+ ephemeralQueryAccountEnabled?: boolean | undefined;
57
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
58
+ }, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined, Error | undefined];
4
59
  //# sourceMappingURL=useWeakModuleFromNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWeakModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWeakModuleFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAsC,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG9F,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,eAAO,MAAM,qBAAqB,6BACN,MAAM,GAAG,cAAc,WACxC,oBAAoB,KAC5B,CAAC,QAAQ,cAAc,CAAC,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAoCzD,CAAA"}
1
+ {"version":3,"file":"useWeakModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWeakModuleFromNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG5E,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAEvB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;gGAuC9B,CAAA"}
@@ -1,4 +1,59 @@
1
1
  import { ModuleInstance } from '@xyo-network/module-model';
2
2
  import { ModuleFromNodeConfig } from './ModuleFromNodeConfig';
3
- export declare const useWeakModuleFromNode: (nameOrAddressOrInstance?: string | ModuleInstance, config?: ModuleFromNodeConfig) => [WeakRef<ModuleInstance> | undefined, Error | undefined];
3
+ export declare const useWeakModuleFromNode: <T extends void | ModuleInstance<import("@xylabs/object").BaseParamsFields & {
4
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
5
+ addToResolvers?: boolean | undefined;
6
+ allowNameResolution?: boolean | undefined;
7
+ 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 & {
8
+ schema: "network.xyo.module.config";
9
+ }, "schema"> & {
10
+ schema: string;
11
+ };
12
+ ephemeralQueryAccountEnabled?: boolean | undefined;
13
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
14
+ }, import("@xyo-network/module-model").ModuleEventData<object>> = void>(nameOrAddressOrInstance?: string | (T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
15
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
16
+ addToResolvers?: boolean | undefined;
17
+ allowNameResolution?: boolean | undefined;
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
+ schema: "network.xyo.module.config";
20
+ }, "schema"> & {
21
+ schema: string;
22
+ };
23
+ ephemeralQueryAccountEnabled?: boolean | undefined;
24
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
25
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
26
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
27
+ addToResolvers?: boolean | undefined;
28
+ allowNameResolution?: boolean | undefined;
29
+ 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 & {
30
+ schema: "network.xyo.module.config";
31
+ }, "schema"> & {
32
+ schema: string;
33
+ };
34
+ ephemeralQueryAccountEnabled?: boolean | undefined;
35
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
36
+ }, import("@xyo-network/module-model").ModuleEventData<object>>) | undefined, config?: ModuleFromNodeConfig) => [WeakRef<T extends ModuleInstance<import("@xylabs/object").BaseParamsFields & {
37
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
38
+ addToResolvers?: boolean | undefined;
39
+ allowNameResolution?: boolean | undefined;
40
+ 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 & {
41
+ schema: "network.xyo.module.config";
42
+ }, "schema"> & {
43
+ schema: string;
44
+ };
45
+ ephemeralQueryAccountEnabled?: boolean | undefined;
46
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
47
+ }, import("@xyo-network/module-model").ModuleEventData<object>> ? T : ModuleInstance<import("@xylabs/object").BaseParamsFields & {
48
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
49
+ addToResolvers?: boolean | undefined;
50
+ allowNameResolution?: boolean | undefined;
51
+ 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 & {
52
+ schema: "network.xyo.module.config";
53
+ }, "schema"> & {
54
+ schema: string;
55
+ };
56
+ ephemeralQueryAccountEnabled?: boolean | undefined;
57
+ moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[] | undefined;
58
+ }, import("@xyo-network/module-model").ModuleEventData<object>>> | undefined, Error | undefined];
4
59
  //# sourceMappingURL=useWeakModuleFromNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWeakModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWeakModuleFromNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAsC,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG9F,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,eAAO,MAAM,qBAAqB,6BACN,MAAM,GAAG,cAAc,WACxC,oBAAoB,KAC5B,CAAC,QAAQ,cAAc,CAAC,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAoCzD,CAAA"}
1
+ {"version":3,"file":"useWeakModuleFromNode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWeakModuleFromNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAG5E,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAA;AAI5F,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAEvB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;gGAuC9B,CAAA"}
@@ -91,18 +91,19 @@ var useNode = (config) => {
91
91
  };
92
92
 
93
93
  // src/hooks/useModuleFromNode.ts
94
- var useModuleFromNode = (nameOrAddressOrInstance, config) => {
94
+ var useModuleFromNode = (nameOrAddressOrInstance = void 0, config) => {
95
95
  const [node, nodeError] = useNode(config);
96
96
  const logger = useModuleFromNodeConfigLogger(config);
97
97
  const filterOptions = useModuleFilterOptions(config);
98
98
  const [result, setResult] = (0, import_react3.useState)();
99
99
  const [, error] = (0, import_react_promise2.usePromise)(async () => {
100
100
  logger?.debug("useModuleFromNode: resolving");
101
+ const identity = config?.identity ?? import_module_model.isModuleInstance;
101
102
  if (node && nameOrAddressOrInstance) {
102
103
  node.on("moduleAttached", ({ module: module2 }) => {
103
104
  logger?.debug(`useModuleFromNode: moduleAttached [${module2.config.name ?? module2.address}]`);
104
105
  if (module2.address === nameOrAddressOrInstance || module2.config?.name === nameOrAddressOrInstance) {
105
- setResult((0, import_module_model.asModuleInstance)(module2));
106
+ setResult(identity(module2) ? module2 : void 0);
106
107
  }
107
108
  });
108
109
  node.on("moduleDetached", ({ module: module2 }) => {
@@ -111,12 +112,12 @@ var useModuleFromNode = (nameOrAddressOrInstance, config) => {
111
112
  setResult(void 0);
112
113
  }
113
114
  });
114
- if ((0, import_module_model.isModuleInstance)(nameOrAddressOrInstance)) {
115
+ if (identity(nameOrAddressOrInstance)) {
115
116
  setResult(nameOrAddressOrInstance);
116
117
  } else {
117
118
  const result2 = await node.resolve(nameOrAddressOrInstance, filterOptions);
118
119
  logger?.debug(`Result: ${result2?.address}`);
119
- setResult(result2);
120
+ setResult(identity(module) ? module : void 0);
120
121
  }
121
122
  return result;
122
123
  }
@@ -187,20 +188,20 @@ var useNodeFromNode = (nameOrAddressOrInstance, config) => {
187
188
  var import_react_promise5 = require("@xylabs/react-promise");
188
189
  var import_module_model3 = require("@xyo-network/module-model");
189
190
  var import_react5 = require("react");
190
- var useWeakModuleFromNode = (nameOrAddressOrInstance, config) => {
191
+ var useWeakModuleFromNode = (nameOrAddressOrInstance = void 0, config) => {
191
192
  const [node, nodeError] = useNode(config);
192
193
  const logger = useModuleFromNodeConfigLogger(config);
193
194
  const filterOptions = useModuleFilterOptions(config);
194
195
  const [result, setResult] = (0, import_react5.useState)();
195
196
  const [, error] = (0, import_react_promise5.usePromise)(async () => {
196
197
  logger?.debug("useModuleFromNode: resolving");
198
+ const identity = config?.identity ?? import_module_model3.isModuleInstance;
197
199
  const nodeInstance = node;
198
200
  if (nodeInstance && nameOrAddressOrInstance) {
199
201
  nodeInstance.on("moduleAttached", ({ module: module2 }) => {
200
202
  logger?.debug(`useModuleFromNode: moduleAttached [${module2.config.name ?? module2.address}]`);
201
203
  if (module2.address === nameOrAddressOrInstance || module2.config?.name === nameOrAddressOrInstance) {
202
- const instance = (0, import_module_model3.asModuleInstance)(module2);
203
- setResult(instance ? new WeakRef(instance) : void 0);
204
+ setResult(identity(module2) ? new WeakRef(module2) : void 0);
204
205
  }
205
206
  });
206
207
  nodeInstance.on("moduleDetached", ({ module: module2 }) => {
@@ -209,12 +210,12 @@ var useWeakModuleFromNode = (nameOrAddressOrInstance, config) => {
209
210
  setResult(void 0);
210
211
  }
211
212
  });
212
- if ((0, import_module_model3.isModuleInstance)(nameOrAddressOrInstance)) {
213
+ if (identity(nameOrAddressOrInstance)) {
213
214
  setResult(new WeakRef(nameOrAddressOrInstance));
214
215
  } else {
215
216
  const result2 = await nodeInstance.resolve(nameOrAddressOrInstance, filterOptions);
216
217
  logger?.debug(`Result: ${result2?.address}`);
217
- setResult(result2 ? new WeakRef(result2) : void 0);
218
+ setResult(identity(result2) ? new WeakRef(result2) : void 0);
218
219
  }
219
220
  return result;
220
221
  }