@xyo-network/react-archivist 2.55.10 → 2.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,35 +1,3 @@
1
1
  import { ArchivistWrapper } from '@xyo-network/archivist';
2
- export declare const useArchivist: (nameOrAddress?: string | undefined, wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined, logger?: import("@xyo-network/core").Logger | undefined) => [ArchivistWrapper<import("@xyo-network/archivist").ArchivistModule<import("@xyo-network/archivist").ArchivistParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
3
- readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
4
- readonly name?: string | undefined;
5
- readonly paging?: Record<string, {
6
- size?: number | undefined;
7
- }> | undefined;
8
- readonly schema: string;
9
- readonly security?: {
10
- readonly allowAnonymous?: boolean | undefined;
11
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
12
- readonly disallowed?: Record<string, string[]> | undefined;
13
- } | undefined;
14
- readonly storeQueries?: boolean | undefined;
15
- } & Omit<Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
16
- readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
17
- readonly name?: string | undefined;
18
- readonly paging?: Record<string, {
19
- size?: number | undefined;
20
- }> | undefined;
21
- readonly schema: "network.xyo.archivist.config";
22
- readonly security?: {
23
- readonly allowAnonymous?: boolean | undefined;
24
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
25
- readonly disallowed?: Record<string, string[]> | undefined;
26
- } | undefined;
27
- readonly storeQueries?: boolean | undefined;
28
- } & Omit<{
29
- parents?: import("@xyo-network/archivist").ArchivistParents | undefined;
30
- schema: "network.xyo.archivist.config";
31
- storeParentReads?: boolean | undefined;
32
- } & Omit<undefined, "schema">, "schema">, "schema"> & {
33
- schema: string;
34
- }, "schema">, undefined>, import("@xyo-network/archivist").ArchivistModuleEventData>> | undefined, Error | undefined];
2
+ export declare const useArchivist: (nameOrAddress?: string | undefined, wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined, logger?: import("@xyo-network/core").Logger | undefined) => [ArchivistWrapper<import("@xyo-network/archivist").ArchivistModule> | undefined, Error | undefined];
35
3
  //# sourceMappingURL=useArchivist.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useArchivist.d.ts","sourceRoot":"","sources":["../../../src/hooks/useArchivist.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGzD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qHAA6D,CAAA"}
1
+ {"version":3,"file":"useArchivist.d.ts","sourceRoot":"","sources":["../../../src/hooks/useArchivist.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGzD,eAAO,MAAM,YAAY,+QAA6D,CAAA"}
@@ -6,39 +6,7 @@ export declare const useArchivistStates: <T extends import("@xyo-network/payload
6
6
  } = import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
7
7
  schema: string;
8
8
  }>() => {
9
- archivist: ArchivistWrapper<import("@xyo-network/archivist").ArchivistModule<import("@xyo-network/archivist").ArchivistParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
10
- readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
11
- readonly name?: string | undefined;
12
- readonly paging?: Record<string, {
13
- size?: number | undefined;
14
- }> | undefined;
15
- readonly schema: string;
16
- readonly security?: {
17
- readonly allowAnonymous?: boolean | undefined;
18
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
19
- readonly disallowed?: Record<string, string[]> | undefined;
20
- } | undefined;
21
- readonly storeQueries?: boolean | undefined;
22
- } & Omit<Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
23
- readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
24
- readonly name?: string | undefined;
25
- readonly paging?: Record<string, {
26
- size?: number | undefined;
27
- }> | undefined;
28
- readonly schema: "network.xyo.archivist.config";
29
- readonly security?: {
30
- readonly allowAnonymous?: boolean | undefined;
31
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
32
- readonly disallowed?: Record<string, string[]> | undefined;
33
- } | undefined;
34
- readonly storeQueries?: boolean | undefined;
35
- } & Omit<{
36
- parents?: import("@xyo-network/archivist").ArchivistParents | undefined;
37
- schema: "network.xyo.archivist.config";
38
- storeParentReads?: boolean | undefined;
39
- } & Omit<undefined, "schema">, "schema">, "schema"> & {
40
- schema: string;
41
- }, "schema">, undefined>, import("@xyo-network/archivist").ArchivistModuleEventData>> | undefined;
9
+ archivist: ArchivistWrapper<import("@xyo-network/archivist").ArchivistModule> | undefined;
42
10
  error: Error | undefined;
43
11
  payloads: T[] | undefined;
44
12
  refresh: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useArchivistStates.d.ts","sourceRoot":"","sources":["../../../src/hooks/useArchivistStates.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAMzD,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CAAA;AAExC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB9B,CAAA"}
1
+ {"version":3,"file":"useArchivistStates.d.ts","sourceRoot":"","sources":["../../../src/hooks/useArchivistStates.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAMzD,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CAAA;AAExC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;CAgB9B,CAAA"}
@@ -1,35 +1,3 @@
1
1
  import { ArchivistWrapper } from '@xyo-network/archivist';
2
- export declare const useArchivists: (account?: import("@xyo-network/wallet-model").WalletInstance | undefined, logger?: import("@xyo-network/core").Logger | undefined) => [ArchivistWrapper<import("@xyo-network/archivist").ArchivistModule<import("@xyo-network/archivist").ArchivistParams<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
3
- readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
4
- readonly name?: string | undefined;
5
- readonly paging?: Record<string, {
6
- size?: number | undefined;
7
- }> | undefined;
8
- readonly schema: string;
9
- readonly security?: {
10
- readonly allowAnonymous?: boolean | undefined;
11
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
12
- readonly disallowed?: Record<string, string[]> | undefined;
13
- } | undefined;
14
- readonly storeQueries?: boolean | undefined;
15
- } & Omit<Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
16
- readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
17
- readonly name?: string | undefined;
18
- readonly paging?: Record<string, {
19
- size?: number | undefined;
20
- }> | undefined;
21
- readonly schema: "network.xyo.archivist.config";
22
- readonly security?: {
23
- readonly allowAnonymous?: boolean | undefined;
24
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
25
- readonly disallowed?: Record<string, string[]> | undefined;
26
- } | undefined;
27
- readonly storeQueries?: boolean | undefined;
28
- } & Omit<{
29
- parents?: import("@xyo-network/archivist").ArchivistParents | undefined;
30
- schema: "network.xyo.archivist.config";
31
- storeParentReads?: boolean | undefined;
32
- } & Omit<undefined, "schema">, "schema">, "schema"> & {
33
- schema: string;
34
- }, "schema">, undefined>, import("@xyo-network/archivist").ArchivistModuleEventData>>[] | undefined, Error | undefined];
2
+ export declare const useArchivists: (account?: import("@xyo-network/wallet-model").WalletInstance | undefined, logger?: import("@xyo-network/core").Logger | undefined) => [ArchivistWrapper<import("@xyo-network/archivist").ArchivistModule>[] | undefined, Error | undefined];
35
3
  //# sourceMappingURL=useArchivists.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useArchivists.d.ts","sourceRoot":"","sources":["../../../src/hooks/useArchivists.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGzD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHAA+D,CAAA"}
1
+ {"version":3,"file":"useArchivists.d.ts","sourceRoot":"","sources":["../../../src/hooks/useArchivists.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGzD,eAAO,MAAM,aAAa,8OAA+D,CAAA"}
package/package.json CHANGED
@@ -12,10 +12,10 @@
12
12
  "dependencies": {
13
13
  "@xylabs/react-button": "^2.17.6",
14
14
  "@xylabs/react-flexbox": "^2.17.6",
15
- "@xyo-network/boundwitness-model": "^2.63.10",
16
- "@xyo-network/boundwitness-wrapper": "^2.63.10",
17
- "@xyo-network/react-module": "^2.55.10",
18
- "@xyo-network/react-node": "^2.55.10",
15
+ "@xyo-network/boundwitness-model": "^2.64.1",
16
+ "@xyo-network/boundwitness-wrapper": "^2.64.1",
17
+ "@xyo-network/react-module": "^2.56.1",
18
+ "@xyo-network/react-node": "^2.56.1",
19
19
  "react-icons": "^4.10.1"
20
20
  },
21
21
  "peerDependencies": {
@@ -29,18 +29,18 @@
29
29
  },
30
30
  "description": "Common React library for all XYO projects that use React",
31
31
  "devDependencies": {
32
- "@storybook/react": "^7.0.23",
32
+ "@storybook/react": "^7.0.24",
33
33
  "@xylabs/react-async-effect": "^2.17.6",
34
34
  "@xylabs/ts-scripts-yarn3": "^2.17.17",
35
35
  "@xylabs/tsconfig-react": "^2.17.17",
36
- "@xyo-network/account": "^2.63.10",
37
- "@xyo-network/archivist": "^2.63.10",
38
- "@xyo-network/archivist-wrapper": "^2.63.10",
39
- "@xyo-network/boundwitness-builder": "^2.63.10",
40
- "@xyo-network/module": "^2.63.10",
41
- "@xyo-network/payload-model": "^2.63.10",
42
- "@xyo-network/react-storybook": "^2.55.10",
43
- "typescript": "^5.1.3"
36
+ "@xyo-network/account": "^2.64.1",
37
+ "@xyo-network/archivist": "^2.64.1",
38
+ "@xyo-network/archivist-wrapper": "^2.64.1",
39
+ "@xyo-network/boundwitness-builder": "^2.64.1",
40
+ "@xyo-network/module": "^2.64.1",
41
+ "@xyo-network/payload-model": "^2.64.1",
42
+ "@xyo-network/react-storybook": "^2.56.1",
43
+ "typescript": "^5.1.6"
44
44
  },
45
45
  "browser": "dist/esm/index.js",
46
46
  "docs": "dist/docs.json",
@@ -84,5 +84,5 @@
84
84
  },
85
85
  "sideEffects": false,
86
86
  "types": "dist/types/index.d.ts",
87
- "version": "2.55.10"
87
+ "version": "2.56.1"
88
88
  }
@@ -23,7 +23,7 @@ const insertPayload = async (archivist?: ArchivistModule) => {
23
23
  if (archivist) {
24
24
  const payload = { schema: 'network.xyo.payload', timestamp: Date.now() }
25
25
  const insertQuery = { schema: ArchivistInsertQuerySchema }
26
- const account = Account.random()
26
+ const account = await Account.randomSync()
27
27
  const builder = new QueryBoundWitnessBuilder({ inlinePayloads: true }).payloads([insertQuery, payload]).witness(account).query(insertQuery)
28
28
  const [insertQueryBoundWitness, payloads] = await builder.build()
29
29
  const wrapper = ArchivistWrapper.wrap(archivist, account)
@@ -5,7 +5,7 @@ import { Payload } from '@xyo-network/payload-model'
5
5
 
6
6
  import { ArchivistStats } from './ArchivistStats'
7
7
 
8
- const account = Account.random()
8
+ const account = Account.randomSync()
9
9
  const payload = () => ({ schema: 'network.xyo.payload', timestamp: Date.now() })
10
10
  const boundWitness = () => new BoundWitnessBuilder().payload(payload()).witness(account).build()
11
11
 
@@ -34,7 +34,7 @@ const Template: StoryFn<typeof MemoryArchivistsStats> = () => {
34
34
  })
35
35
  const payload = { schema: 'network.xyo.payload' }
36
36
  const insertQuery = { schema: ArchivistInsertQuerySchema }
37
- const account = Account.random()
37
+ const account = await Account.randomSync()
38
38
  const builder = new QueryBoundWitnessBuilder({ inlinePayloads: true }).payloads([insertQuery, payload]).witness(account).query(insertQuery)
39
39
  const [insertQueryBoundWitness, payloads] = await builder.build()
40
40
  const wrapper = ArchivistWrapper.wrap(newModule, account)