@xyo-network/diviner-address-chain 6.0.4 → 7.0.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/README.md +3 -1
- package/dist/neutral/Config.d.ts +14 -1
- package/dist/neutral/Config.d.ts.map +1 -1
- package/dist/neutral/MemoryAddressChainDiviner.d.ts +2 -2
- package/dist/neutral/MemoryAddressChainDiviner.d.ts.map +1 -1
- package/dist/neutral/Payload.d.ts +9 -5
- package/dist/neutral/Payload.d.ts.map +1 -1
- package/dist/neutral/Query.d.ts +11 -5
- package/dist/neutral/Query.d.ts.map +1 -1
- package/dist/neutral/Schema.d.ts +1 -1
- package/dist/neutral/Schema.d.ts.map +1 -1
- package/dist/neutral/index.mjs +53 -4
- package/dist/neutral/index.mjs.map +4 -4
- package/dist/neutral/memory.mjs.map +2 -2
- package/dist/neutral/model.mjs +55 -4
- package/dist/neutral/model.mjs.map +4 -4
- package/package.json +22 -23
package/README.md
CHANGED
|
@@ -38,10 +38,12 @@ bun add {{name}}
|
|
|
38
38
|
|
|
39
39
|
See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
|
|
40
40
|
|
|
41
|
+
## Credits
|
|
41
42
|
|
|
43
|
+
[Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
|
|
42
44
|
|
|
43
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
44
45
|
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/diviner-address-chain.svg
|
|
45
46
|
[npm-link]: https://www.npmjs.com/package/@xyo-network/diviner-address-chain
|
|
46
47
|
[license-badge]: https://img.shields.io/npm/l/@xyo-network/diviner-address-chain.svg
|
|
47
48
|
[license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
|
|
49
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/sdk-js';
|
|
2
|
+
import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk-js';
|
|
2
3
|
import type { DivinerConfig } from '@xyo-network/diviner-model';
|
|
4
|
+
import { DivinerConfigZod } from '@xyo-network/diviner-model';
|
|
3
5
|
import type { XyoAddress } from '@xyo-network/sdk-protocol-js';
|
|
4
|
-
import
|
|
6
|
+
import * as z from 'zod/mini';
|
|
7
|
+
import { AddressChainDivinerConfigSchema } from './Schema.ts';
|
|
8
|
+
export declare const AddressChainDivinerConfigZod: z.ZodMiniObject<Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {
|
|
9
|
+
address: z.ZodMiniOptional<z.ZodMiniCustom<XyoAddress, XyoAddress>>;
|
|
10
|
+
maxResults: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
11
|
+
schema: z.ZodMiniLiteral<AddressChainDivinerConfigSchema>;
|
|
12
|
+
startHash: z.ZodMiniOptional<z.ZodMiniCustom<Hash, Hash>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type AddressChainDivinerConfigBase = z.infer<typeof AddressChainDivinerConfigZod>;
|
|
15
|
+
export declare const isAddressChainDivinerConfig: ReturnType<typeof zodIsFactory<AddressChainDivinerConfigBase>>;
|
|
16
|
+
export declare const asAddressChainDivinerConfig: ReturnType<typeof zodAsFactory<AddressChainDivinerConfigBase>>;
|
|
17
|
+
export declare const toAddressChainDivinerConfig: ReturnType<typeof zodToFactory<AddressChainDivinerConfigBase>>;
|
|
5
18
|
export type AddressChainDivinerConfig = DivinerConfig<{
|
|
6
19
|
address?: XyoAddress;
|
|
7
20
|
maxResults?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAA;AAE7D,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,aAAa,CACxD,IAAI,CAAC,CAAC,OAAO,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,GAAG;IACnD,OAAO,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAA;IACnE,UAAU,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA;IACtD,MAAM,EAAE,CAAC,CAAC,cAAc,CAAC,+BAA+B,CAAC,CAAA;IACzD,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;CAC1D,EACD,CAAC,CAAC,IAAI,CAAC,MAAM,CAMb,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAExF,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,6BAA6B,CAAC,CAA8C,CAAA;AACrJ,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,6BAA6B,CAAC,CAA6E,CAAA;AACpL,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,6BAA6B,CAAC,CAA6E,CAAA;AAEpL,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC;IACpD,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,+BAA+B,CAAA;IACvC,SAAS,CAAC,EAAE,IAAI,CAAA;CACjB,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DivinerParams } from '@xyo-network/diviner-model';
|
|
2
2
|
import type { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import type { Payload, Schema } from '@xyo-network/sdk-protocol-js';
|
|
3
|
+
import type { Payload, Schema, XyoQuantAddress } from '@xyo-network/sdk-protocol-js';
|
|
4
4
|
import { AddressChainDiviner } from './AddressChainDiviner.ts';
|
|
5
5
|
import type { AddressChainDivinerConfig } from './Config.ts';
|
|
6
6
|
export type MemoryAddressChainDivinerParams = DivinerParams<AnyConfigSchema<AddressChainDivinerConfig>>;
|
|
@@ -11,7 +11,7 @@ export declare class MemoryAddressChainDiviner<TParams extends MemoryAddressChai
|
|
|
11
11
|
readonly __hex: true;
|
|
12
12
|
} & {
|
|
13
13
|
readonly __address: true;
|
|
14
|
-
}) |
|
|
14
|
+
}) | XyoQuantAddress;
|
|
15
15
|
protected divineHandler(payloads?: Payload[]): Promise<Payload[]>;
|
|
16
16
|
private archivistFindHash;
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryAddressChainDiviner.d.ts","sourceRoot":"","sources":["../../src/MemoryAddressChainDiviner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EACI,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"MemoryAddressChainDiviner.d.ts","sourceRoot":"","sources":["../../src/MemoryAddressChainDiviner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EACI,OAAO,EAAE,MAAM,EAC7B,eAAe,EAChB,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAK5D,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC,eAAe,CAAC,yBAAyB,CAAC,CAAC,CAAA;AAEvG,qBAAa,yBAAyB,CACpC,OAAO,SAAS,+BAA+B,GAAG,+BAA+B,CACjF,SAAQ,mBAAmB,CAAC,OAAO,CAAC;IACpC,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA4D;IAC5G,gBAAyB,mBAAmB,EAAE,MAAM,CAAkC;IAEtF,IAAI,YAAY,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG;QACvC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAA;KACrB,GAAG;QACF,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAA;KACzB,CAAC,GAAG,eAAe,CAEnB;cAEwB,aAAa,CAAC,QAAQ,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;YAwBtE,iBAAiB;CAMhC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk-js';
|
|
2
|
+
import type * as z from 'zod/mini';
|
|
2
3
|
import { AddressChainSchema } from './Schema.ts';
|
|
3
|
-
export
|
|
4
|
-
schema: AddressChainSchema
|
|
5
|
-
}>;
|
|
6
|
-
export
|
|
4
|
+
export declare const AddressChainPayloadZod: z.ZodMiniObject<{
|
|
5
|
+
schema: z.ZodMiniLiteral<AddressChainSchema>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type AddressChainPayload = z.infer<typeof AddressChainPayloadZod>;
|
|
8
|
+
export declare const isAddressChainPayload: ReturnType<typeof zodIsFactory<AddressChainPayload>>;
|
|
9
|
+
export declare const asAddressChainPayload: ReturnType<typeof zodAsFactory<AddressChainPayload>>;
|
|
10
|
+
export declare const toAddressChainPayload: ReturnType<typeof zodToFactory<AddressChainPayload>>;
|
|
7
11
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,KAAK,CAAC,MAAM,UAAU,CAAA;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,aAAa,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAA;CAC7C,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAA0C,CAAA;AAE1D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAExE,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,mBAAmB,CAAC,CAAwC,CAAA;AAC/H,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,mBAAmB,CAAC,CAAiE,CAAA;AACxJ,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,mBAAmB,CAAC,CAAiE,CAAA"}
|
package/dist/neutral/Query.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk-js';
|
|
2
|
+
import type { PayloadFindFilter } from '@xyo-network/sdk-protocol-js';
|
|
3
|
+
import { QueryFieldsZod } from '@xyo-network/sdk-protocol-js';
|
|
4
|
+
import * as z from 'zod/mini';
|
|
2
5
|
import { AddressChainQuerySchema } from './Schema.ts';
|
|
3
|
-
export
|
|
4
|
-
schema: AddressChainQuerySchema
|
|
5
|
-
} & Omit<PayloadFindFilter, 'schema'
|
|
6
|
-
export
|
|
6
|
+
export declare const AddressChainQueryPayloadZod: z.ZodMiniIntersection<z.ZodMiniObject<{
|
|
7
|
+
schema: z.ZodMiniLiteral<AddressChainQuerySchema>;
|
|
8
|
+
} & (typeof QueryFieldsZod)['shape'], z.core.$strip>, z.ZodMiniCustom<Omit<PayloadFindFilter, 'schema'>, Omit<PayloadFindFilter, 'schema'>>>;
|
|
9
|
+
export type AddressChainQueryPayload = z.infer<typeof AddressChainQueryPayloadZod>;
|
|
10
|
+
export declare const isAddressChainQueryPayload: ReturnType<typeof zodIsFactory<AddressChainQueryPayload>>;
|
|
11
|
+
export declare const asAddressChainQueryPayload: ReturnType<typeof zodAsFactory<AddressChainQueryPayload>>;
|
|
12
|
+
export declare const toAddressChainQueryPayload: ReturnType<typeof zodToFactory<AddressChainQueryPayload>>;
|
|
7
13
|
//# sourceMappingURL=Query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAsB,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACjF,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAErD,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,mBAAmB,CAC7D,CAAC,CAAC,aAAa,CACX;IAAE,MAAM,EAAE,CAAC,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAAA;CAAE,GACrD,CAAC,OAAO,cAAc,CAAC,CAAC,OAAO,CAAC,EAClC,CAAC,CAAC,IAAI,CAAC,MAAM,CACd,EACD,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAItF,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAElF,eAAO,MAAM,0BAA0B,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,wBAAwB,CAAC,CAA6C,CAAA;AAC9I,eAAO,MAAM,0BAA0B,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,wBAAwB,CAAC,CAA2E,CAAA;AAC5K,eAAO,MAAM,0BAA0B,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,wBAAwB,CAAC,CAA2E,CAAA"}
|
package/dist/neutral/Schema.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,EAAE,mCAAmC,GAAG;IACrE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CAC8B,CAAA;AACvD,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA;AAE1D,eAAO,MAAM,+BAA+B,EAAE,MAAM,GAAG;IACrD,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CACyB,CAAA;AAClD,MAAM,MAAM,+BAA+B,GAAG,OAAO,+BAA+B,CAAA;AAEpF,eAAO,MAAM,uBAAuB,EAAE,MAAM,GAAG;IAC7C,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CACwB,CAAA;AACjD,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -51,19 +51,68 @@ var MemoryAddressChainDiviner = class extends AddressChainDiviner {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
+
// src/Config.ts
|
|
55
|
+
import {
|
|
56
|
+
zodAsFactory,
|
|
57
|
+
zodIsFactory,
|
|
58
|
+
zodToFactory
|
|
59
|
+
} from "@xylabs/sdk-js";
|
|
60
|
+
import { DivinerConfigZod } from "@xyo-network/diviner-model";
|
|
61
|
+
import * as z from "zod/mini";
|
|
62
|
+
var AddressChainDivinerConfigZod = z.extend(DivinerConfigZod, {
|
|
63
|
+
address: z.optional(z.custom()),
|
|
64
|
+
maxResults: z.optional(z.number()),
|
|
65
|
+
schema: z.literal(AddressChainDivinerConfigSchema),
|
|
66
|
+
startHash: z.optional(z.custom())
|
|
67
|
+
});
|
|
68
|
+
var isAddressChainDivinerConfig = zodIsFactory(AddressChainDivinerConfigZod);
|
|
69
|
+
var asAddressChainDivinerConfig = zodAsFactory(AddressChainDivinerConfigZod, "asAddressChainDivinerConfig");
|
|
70
|
+
var toAddressChainDivinerConfig = zodToFactory(AddressChainDivinerConfigZod, "toAddressChainDivinerConfig");
|
|
71
|
+
|
|
54
72
|
// src/Payload.ts
|
|
55
|
-
|
|
73
|
+
import {
|
|
74
|
+
zodAsFactory as zodAsFactory2,
|
|
75
|
+
zodIsFactory as zodIsFactory2,
|
|
76
|
+
zodToFactory as zodToFactory2
|
|
77
|
+
} from "@xylabs/sdk-js";
|
|
78
|
+
import { PayloadZodOfSchema } from "@xyo-network/sdk-protocol-js";
|
|
79
|
+
var AddressChainPayloadZod = PayloadZodOfSchema(AddressChainSchema);
|
|
80
|
+
var isAddressChainPayload = zodIsFactory2(AddressChainPayloadZod);
|
|
81
|
+
var asAddressChainPayload = zodAsFactory2(AddressChainPayloadZod, "asAddressChainPayload");
|
|
82
|
+
var toAddressChainPayload = zodToFactory2(AddressChainPayloadZod, "toAddressChainPayload");
|
|
56
83
|
|
|
57
84
|
// src/Query.ts
|
|
58
|
-
import {
|
|
59
|
-
|
|
85
|
+
import {
|
|
86
|
+
zodAsFactory as zodAsFactory3,
|
|
87
|
+
zodIsFactory as zodIsFactory3,
|
|
88
|
+
zodToFactory as zodToFactory3
|
|
89
|
+
} from "@xylabs/sdk-js";
|
|
90
|
+
import { PayloadZodOfSchema as PayloadZodOfSchema2, QueryFieldsZod } from "@xyo-network/sdk-protocol-js";
|
|
91
|
+
import * as z2 from "zod/mini";
|
|
92
|
+
var AddressChainQueryPayloadZod = z2.intersection(
|
|
93
|
+
z2.extend(PayloadZodOfSchema2(AddressChainQuerySchema), { ...QueryFieldsZod.shape }),
|
|
94
|
+
z2.custom()
|
|
95
|
+
);
|
|
96
|
+
var isAddressChainQueryPayload = zodIsFactory3(AddressChainQueryPayloadZod);
|
|
97
|
+
var asAddressChainQueryPayload = zodAsFactory3(AddressChainQueryPayloadZod, "asAddressChainQueryPayload");
|
|
98
|
+
var toAddressChainQueryPayload = zodToFactory3(AddressChainQueryPayloadZod, "toAddressChainQueryPayload");
|
|
60
99
|
export {
|
|
61
100
|
AddressChainDiviner,
|
|
62
101
|
AddressChainDivinerConfigSchema,
|
|
102
|
+
AddressChainDivinerConfigZod,
|
|
103
|
+
AddressChainPayloadZod,
|
|
104
|
+
AddressChainQueryPayloadZod,
|
|
63
105
|
AddressChainQuerySchema,
|
|
64
106
|
AddressChainSchema,
|
|
65
107
|
MemoryAddressChainDiviner,
|
|
108
|
+
asAddressChainDivinerConfig,
|
|
109
|
+
asAddressChainPayload,
|
|
110
|
+
asAddressChainQueryPayload,
|
|
111
|
+
isAddressChainDivinerConfig,
|
|
66
112
|
isAddressChainPayload,
|
|
67
|
-
isAddressChainQueryPayload
|
|
113
|
+
isAddressChainQueryPayload,
|
|
114
|
+
toAddressChainDivinerConfig,
|
|
115
|
+
toAddressChainPayload,
|
|
116
|
+
toAddressChainQueryPayload
|
|
68
117
|
};
|
|
69
118
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/AddressChainDiviner.ts", "../../src/MemoryAddressChainDiviner.ts", "../../src/Schema.ts", "../../src/Payload.ts", "../../src/Query.ts"],
|
|
4
|
-
"sourcesContent": ["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/sdk-protocol-js'\n\nimport type { AddressChainDivinerParams } from './Params.ts'\n\nexport abstract class AddressChainDiviner<\n TParams extends AddressChainDivinerParams = AddressChainDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {}\n", "import type { Hash } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport type { DivinerParams } from '@xyo-network/diviner-model'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport type {\n BoundWitness, Payload, Schema,\n} from '@xyo-network/sdk-protocol-js'\nimport { BoundWitnessSchema, isStorageMeta } from '@xyo-network/sdk-protocol-js'\n\nimport { AddressChainDiviner } from './AddressChainDiviner.ts'\nimport type { AddressChainDivinerConfig } from './Config.ts'\nimport { AddressChainDivinerConfigSchema } from './Schema.ts'\n\n// This diviner returns the most recent boundwitness signed by the address that can be found\n// if multiple broken chains are found, all the heads are returned\nexport type MemoryAddressChainDivinerParams = DivinerParams<AnyConfigSchema<AddressChainDivinerConfig>>\n\nexport class MemoryAddressChainDiviner<\n TParams extends MemoryAddressChainDivinerParams = MemoryAddressChainDivinerParams,\n> extends AddressChainDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, AddressChainDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = AddressChainDivinerConfigSchema\n\n get queryAddress() {\n return assertEx(this.config.address, () => 'Missing address')\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n const result: Payload[] = []\n assertEx(payloads.length === 0, () => 'MemoryAddressChainDiviner.divine does not allow payloads to be sent')\n try {\n const archivistIn = await this.archivistInstance()\n const archivist = assertEx(archivistIn, () => 'Unable to resolve archivist')\n let currentHash: Hash | null = assertEx(this.config.startHash, () => 'Missing startHash')\n while (currentHash && result.length < (this.config.maxResults ?? 1000)) {\n const bw = await this.archivistFindHash([archivist], currentHash)\n if (bw) {\n result.push(bw)\n const addressIndex = bw.addresses.indexOf(this.queryAddress)\n currentHash = addressIndex === -1 ? null : bw.previous_hashes[addressIndex] ?? null\n } else {\n console.log(`Hash is not a BoundWitness [${currentHash}]`)\n currentHash = null\n }\n }\n } catch (ex) {\n console.log(ex)\n }\n return result\n }\n\n private async archivistFindHash(archivists: ArchivistInstance[], hash: Hash): Promise<BoundWitness | undefined> {\n const archivist = archivists[0]\n if (archivist) {\n return (await archivist.get([hash])).findLast(x => x.schema === BoundWitnessSchema && isStorageMeta(x)) as BoundWitness | undefined\n }\n }\n}\n", "import { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const AddressChainSchema = asSchema('network.xyo.diviner.address.chain', true)\nexport type AddressChainSchema = typeof AddressChainSchema\n\nexport const AddressChainDivinerConfigSchema = asSchema(`${AddressChainSchema}.config`, true)\nexport type AddressChainDivinerConfigSchema = typeof AddressChainDivinerConfigSchema\n\nexport const AddressChainQuerySchema = asSchema(`${AddressChainSchema}.query`, true)\nexport type AddressChainQuerySchema = typeof AddressChainQuerySchema\n", "import type {
|
|
5
|
-
"mappings": ";AAAA,SAAS,uBAAuB;AAMzB,IAAe,sBAAf,cASG,gBAAgD;AAAC;;;ACd3D,SAAS,gBAAgB;
|
|
6
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/AddressChainDiviner.ts", "../../src/MemoryAddressChainDiviner.ts", "../../src/Schema.ts", "../../src/Config.ts", "../../src/Payload.ts", "../../src/Query.ts"],
|
|
4
|
+
"sourcesContent": ["import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/sdk-protocol-js'\n\nimport type { AddressChainDivinerParams } from './Params.ts'\n\nexport abstract class AddressChainDiviner<\n TParams extends AddressChainDivinerParams = AddressChainDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {}\n", "import type { Hash } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport type { DivinerParams } from '@xyo-network/diviner-model'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport type {\n BoundWitness, Payload, Schema,\n XyoQuantAddress,\n} from '@xyo-network/sdk-protocol-js'\nimport { BoundWitnessSchema, isStorageMeta } from '@xyo-network/sdk-protocol-js'\n\nimport { AddressChainDiviner } from './AddressChainDiviner.ts'\nimport type { AddressChainDivinerConfig } from './Config.ts'\nimport { AddressChainDivinerConfigSchema } from './Schema.ts'\n\n// This diviner returns the most recent boundwitness signed by the address that can be found\n// if multiple broken chains are found, all the heads are returned\nexport type MemoryAddressChainDivinerParams = DivinerParams<AnyConfigSchema<AddressChainDivinerConfig>>\n\nexport class MemoryAddressChainDiviner<\n TParams extends MemoryAddressChainDivinerParams = MemoryAddressChainDivinerParams,\n> extends AddressChainDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, AddressChainDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = AddressChainDivinerConfigSchema\n\n get queryAddress(): (Lowercase<string> & {\n readonly __hex: true\n } & {\n readonly __address: true\n }) | XyoQuantAddress {\n return assertEx(this.config.address, () => 'Missing address')\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n const result: Payload[] = []\n assertEx(payloads.length === 0, () => 'MemoryAddressChainDiviner.divine does not allow payloads to be sent')\n try {\n const archivistIn = await this.archivistInstance()\n const archivist = assertEx(archivistIn, () => 'Unable to resolve archivist')\n let currentHash: Hash | null = assertEx(this.config.startHash, () => 'Missing startHash')\n while (currentHash && result.length < (this.config.maxResults ?? 1000)) {\n const bw = await this.archivistFindHash([archivist], currentHash)\n if (bw) {\n result.push(bw)\n const addressIndex = bw.addresses.indexOf(this.queryAddress)\n currentHash = addressIndex === -1 ? null : bw.previous_hashes[addressIndex] ?? null\n } else {\n console.log(`Hash is not a BoundWitness [${currentHash}]`)\n currentHash = null\n }\n }\n } catch (ex) {\n console.log(ex)\n }\n return result\n }\n\n private async archivistFindHash(archivists: ArchivistInstance[], hash: Hash): Promise<BoundWitness | undefined> {\n const archivist = archivists[0]\n if (archivist) {\n return (await archivist.get([hash])).findLast(x => x.schema === BoundWitnessSchema && isStorageMeta(x)) as BoundWitness | undefined\n }\n }\n}\n", "import { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const AddressChainSchema: 'network.xyo.diviner.address.chain' & {\n readonly __schema: true\n} = asSchema('network.xyo.diviner.address.chain', true)\nexport type AddressChainSchema = typeof AddressChainSchema\n\nexport const AddressChainDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${AddressChainSchema}.config`, true)\nexport type AddressChainDivinerConfigSchema = typeof AddressChainDivinerConfigSchema\n\nexport const AddressChainQuerySchema: string & {\n readonly __schema: true\n} = asSchema(`${AddressChainSchema}.query`, true)\nexport type AddressChainQuerySchema = typeof AddressChainQuerySchema\n", "import type { Hash } from '@xylabs/sdk-js'\nimport {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/diviner-model'\nimport type { XyoAddress } from '@xyo-network/sdk-protocol-js'\nimport * as z from 'zod/mini'\n\nimport { AddressChainDivinerConfigSchema } from './Schema.ts'\n\nexport const AddressChainDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n address: z.ZodMiniOptional<z.ZodMiniCustom<XyoAddress, XyoAddress>>\n maxResults: z.ZodMiniOptional<z.ZodMiniNumber<number>>\n schema: z.ZodMiniLiteral<AddressChainDivinerConfigSchema>\n startHash: z.ZodMiniOptional<z.ZodMiniCustom<Hash, Hash>>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, {\n address: z.optional(z.custom<XyoAddress>()),\n maxResults: z.optional(z.number()),\n schema: z.literal(AddressChainDivinerConfigSchema),\n startHash: z.optional(z.custom<Hash>()),\n})\n\nexport type AddressChainDivinerConfigBase = z.infer<typeof AddressChainDivinerConfigZod>\n\nexport const isAddressChainDivinerConfig: ReturnType<typeof zodIsFactory<AddressChainDivinerConfigBase>> = zodIsFactory(AddressChainDivinerConfigZod)\nexport const asAddressChainDivinerConfig: ReturnType<typeof zodAsFactory<AddressChainDivinerConfigBase>> = zodAsFactory(AddressChainDivinerConfigZod, 'asAddressChainDivinerConfig')\nexport const toAddressChainDivinerConfig: ReturnType<typeof zodToFactory<AddressChainDivinerConfigBase>> = zodToFactory(AddressChainDivinerConfigZod, 'toAddressChainDivinerConfig')\n\nexport type AddressChainDivinerConfig = DivinerConfig<{\n address?: XyoAddress\n maxResults?: number\n schema: AddressChainDivinerConfigSchema\n startHash?: Hash\n}>\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport { PayloadZodOfSchema } from '@xyo-network/sdk-protocol-js'\nimport type * as z from 'zod/mini'\n\nimport { AddressChainSchema } from './Schema.ts'\n\nexport const AddressChainPayloadZod: z.ZodMiniObject<{\n schema: z.ZodMiniLiteral<AddressChainSchema>\n}, z.core.$strip> = PayloadZodOfSchema(AddressChainSchema)\n\nexport type AddressChainPayload = z.infer<typeof AddressChainPayloadZod>\n\nexport const isAddressChainPayload: ReturnType<typeof zodIsFactory<AddressChainPayload>> = zodIsFactory(AddressChainPayloadZod)\nexport const asAddressChainPayload: ReturnType<typeof zodAsFactory<AddressChainPayload>> = zodAsFactory(AddressChainPayloadZod, 'asAddressChainPayload')\nexport const toAddressChainPayload: ReturnType<typeof zodToFactory<AddressChainPayload>> = zodToFactory(AddressChainPayloadZod, 'toAddressChainPayload')\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { PayloadFindFilter } from '@xyo-network/sdk-protocol-js'\nimport { PayloadZodOfSchema, QueryFieldsZod } from '@xyo-network/sdk-protocol-js'\nimport * as z from 'zod/mini'\n\nimport { AddressChainQuerySchema } from './Schema.ts'\n\nexport const AddressChainQueryPayloadZod: z.ZodMiniIntersection<\n z.ZodMiniObject<\n & { schema: z.ZodMiniLiteral<AddressChainQuerySchema> }\n & (typeof QueryFieldsZod)['shape'],\n z.core.$strip\n >,\n z.ZodMiniCustom<Omit<PayloadFindFilter, 'schema'>, Omit<PayloadFindFilter, 'schema'>>\n> = z.intersection(\n z.extend(PayloadZodOfSchema(AddressChainQuerySchema), { ...QueryFieldsZod.shape }),\n z.custom<Omit<PayloadFindFilter, 'schema'>>(),\n)\n\nexport type AddressChainQueryPayload = z.infer<typeof AddressChainQueryPayloadZod>\n\nexport const isAddressChainQueryPayload: ReturnType<typeof zodIsFactory<AddressChainQueryPayload>> = zodIsFactory(AddressChainQueryPayloadZod)\nexport const asAddressChainQueryPayload: ReturnType<typeof zodAsFactory<AddressChainQueryPayload>> = zodAsFactory(AddressChainQueryPayloadZod, 'asAddressChainQueryPayload')\nexport const toAddressChainQueryPayload: ReturnType<typeof zodToFactory<AddressChainQueryPayload>> = zodToFactory(AddressChainQueryPayloadZod, 'toAddressChainQueryPayload')\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,uBAAuB;AAMzB,IAAe,sBAAf,cASG,gBAAgD;AAAC;;;ACd3D,SAAS,gBAAgB;AAQzB,SAAS,oBAAoB,qBAAqB;;;ACTlD,SAAS,gBAAgB;AAElB,IAAM,qBAET,SAAS,qCAAqC,IAAI;AAG/C,IAAM,kCAET,SAAS,GAAG,kBAAkB,WAAW,IAAI;AAG1C,IAAM,0BAET,SAAS,GAAG,kBAAkB,UAAU,IAAI;;;ADKzC,IAAM,4BAAN,cAEG,oBAA6B;AAAA,EACrC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,+BAA+B;AAAA,EAC3G,OAAyB,sBAA8B;AAAA,EAEvD,IAAI,eAIiB;AACnB,WAAO,SAAS,KAAK,OAAO,SAAS,MAAM,iBAAiB;AAAA,EAC9D;AAAA,EAEA,MAAyB,cAAc,WAAsB,CAAC,GAAuB;AACnF,UAAM,SAAoB,CAAC;AAC3B,aAAS,SAAS,WAAW,GAAG,MAAM,qEAAqE;AAC3G,QAAI;AACF,YAAM,cAAc,MAAM,KAAK,kBAAkB;AACjD,YAAM,YAAY,SAAS,aAAa,MAAM,6BAA6B;AAC3E,UAAI,cAA2B,SAAS,KAAK,OAAO,WAAW,MAAM,mBAAmB;AACxF,aAAO,eAAe,OAAO,UAAU,KAAK,OAAO,cAAc,MAAO;AACtE,cAAM,KAAK,MAAM,KAAK,kBAAkB,CAAC,SAAS,GAAG,WAAW;AAChE,YAAI,IAAI;AACN,iBAAO,KAAK,EAAE;AACd,gBAAM,eAAe,GAAG,UAAU,QAAQ,KAAK,YAAY;AAC3D,wBAAc,iBAAiB,KAAK,OAAO,GAAG,gBAAgB,YAAY,KAAK;AAAA,QACjF,OAAO;AACL,kBAAQ,IAAI,+BAA+B,WAAW,GAAG;AACzD,wBAAc;AAAA,QAChB;AAAA,MACF;AAAA,IACF,SAAS,IAAI;AACX,cAAQ,IAAI,EAAE;AAAA,IAChB;AACA,WAAO;AAAA,EACT;AAAA,EAEA,MAAc,kBAAkB,YAAiC,MAA+C;AAC9G,UAAM,YAAY,WAAW,CAAC;AAC9B,QAAI,WAAW;AACb,cAAQ,MAAM,UAAU,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,OAAK,EAAE,WAAW,sBAAsB,cAAc,CAAC,CAAC;AAAA,IACxG;AAAA,EACF;AACF;;;AE9DA;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAEP,SAAS,wBAAwB;AAEjC,YAAY,OAAO;AAIZ,IAAM,+BAQP,SAAO,kBAAkB;AAAA,EAC7B,SAAW,WAAW,SAAmB,CAAC;AAAA,EAC1C,YAAc,WAAW,SAAO,CAAC;AAAA,EACjC,QAAU,UAAQ,+BAA+B;AAAA,EACjD,WAAa,WAAW,SAAa,CAAC;AACxC,CAAC;AAIM,IAAM,8BAA8F,aAAa,4BAA4B;AAC7I,IAAM,8BAA8F,aAAa,8BAA8B,6BAA6B;AAC5K,IAAM,8BAA8F,aAAa,8BAA8B,6BAA6B;;;AC9BnL;AAAA,EACE,gBAAAA;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AACP,SAAS,0BAA0B;AAK5B,IAAM,yBAEO,mBAAmB,kBAAkB;AAIlD,IAAM,wBAA8EC,cAAa,sBAAsB;AACvH,IAAM,wBAA8EC,cAAa,wBAAwB,uBAAuB;AAChJ,IAAM,wBAA8EC,cAAa,wBAAwB,uBAAuB;;;AChBvJ;AAAA,EACE,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AAEP,SAAS,sBAAAC,qBAAoB,sBAAsB;AACnD,YAAYC,QAAO;AAIZ,IAAM,8BAOP;AAAA,EACF,UAAOC,oBAAmB,uBAAuB,GAAG,EAAE,GAAG,eAAe,MAAM,CAAC;AAAA,EAC/E,UAA0C;AAC9C;AAIO,IAAM,6BAAwFC,cAAa,2BAA2B;AACtI,IAAM,6BAAwFC,cAAa,6BAA6B,4BAA4B;AACpK,IAAM,6BAAwFC,cAAa,6BAA6B,4BAA4B;",
|
|
6
|
+
"names": ["zodAsFactory", "zodIsFactory", "zodToFactory", "zodIsFactory", "zodAsFactory", "zodToFactory", "zodAsFactory", "zodIsFactory", "zodToFactory", "PayloadZodOfSchema", "z", "PayloadZodOfSchema", "zodIsFactory", "zodAsFactory", "zodToFactory"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/MemoryAddressChainDiviner.ts", "../../src/AddressChainDiviner.ts", "../../src/Schema.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Hash } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport type { DivinerParams } from '@xyo-network/diviner-model'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport type {\n BoundWitness, Payload, Schema,\n} from '@xyo-network/sdk-protocol-js'\nimport { BoundWitnessSchema, isStorageMeta } from '@xyo-network/sdk-protocol-js'\n\nimport { AddressChainDiviner } from './AddressChainDiviner.ts'\nimport type { AddressChainDivinerConfig } from './Config.ts'\nimport { AddressChainDivinerConfigSchema } from './Schema.ts'\n\n// This diviner returns the most recent boundwitness signed by the address that can be found\n// if multiple broken chains are found, all the heads are returned\nexport type MemoryAddressChainDivinerParams = DivinerParams<AnyConfigSchema<AddressChainDivinerConfig>>\n\nexport class MemoryAddressChainDiviner<\n TParams extends MemoryAddressChainDivinerParams = MemoryAddressChainDivinerParams,\n> extends AddressChainDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, AddressChainDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = AddressChainDivinerConfigSchema\n\n get queryAddress() {\n return assertEx(this.config.address, () => 'Missing address')\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n const result: Payload[] = []\n assertEx(payloads.length === 0, () => 'MemoryAddressChainDiviner.divine does not allow payloads to be sent')\n try {\n const archivistIn = await this.archivistInstance()\n const archivist = assertEx(archivistIn, () => 'Unable to resolve archivist')\n let currentHash: Hash | null = assertEx(this.config.startHash, () => 'Missing startHash')\n while (currentHash && result.length < (this.config.maxResults ?? 1000)) {\n const bw = await this.archivistFindHash([archivist], currentHash)\n if (bw) {\n result.push(bw)\n const addressIndex = bw.addresses.indexOf(this.queryAddress)\n currentHash = addressIndex === -1 ? null : bw.previous_hashes[addressIndex] ?? null\n } else {\n console.log(`Hash is not a BoundWitness [${currentHash}]`)\n currentHash = null\n }\n }\n } catch (ex) {\n console.log(ex)\n }\n return result\n }\n\n private async archivistFindHash(archivists: ArchivistInstance[], hash: Hash): Promise<BoundWitness | undefined> {\n const archivist = archivists[0]\n if (archivist) {\n return (await archivist.get([hash])).findLast(x => x.schema === BoundWitnessSchema && isStorageMeta(x)) as BoundWitness | undefined\n }\n }\n}\n", "import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/sdk-protocol-js'\n\nimport type { AddressChainDivinerParams } from './Params.ts'\n\nexport abstract class AddressChainDiviner<\n TParams extends AddressChainDivinerParams = AddressChainDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {}\n", "import { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const AddressChainSchema = asSchema('network.xyo.diviner.address.chain', true)\nexport type AddressChainSchema = typeof AddressChainSchema\n\nexport const AddressChainDivinerConfigSchema = asSchema(`${AddressChainSchema}.config`, true)\nexport type AddressChainDivinerConfigSchema = typeof AddressChainDivinerConfigSchema\n\nexport const AddressChainQuerySchema = asSchema(`${AddressChainSchema}.query`, true)\nexport type AddressChainQuerySchema = typeof AddressChainQuerySchema\n"],
|
|
5
|
-
"mappings": ";AACA,SAAS,gBAAgB;
|
|
4
|
+
"sourcesContent": ["import type { Hash } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport type { DivinerParams } from '@xyo-network/diviner-model'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport type {\n BoundWitness, Payload, Schema,\n XyoQuantAddress,\n} from '@xyo-network/sdk-protocol-js'\nimport { BoundWitnessSchema, isStorageMeta } from '@xyo-network/sdk-protocol-js'\n\nimport { AddressChainDiviner } from './AddressChainDiviner.ts'\nimport type { AddressChainDivinerConfig } from './Config.ts'\nimport { AddressChainDivinerConfigSchema } from './Schema.ts'\n\n// This diviner returns the most recent boundwitness signed by the address that can be found\n// if multiple broken chains are found, all the heads are returned\nexport type MemoryAddressChainDivinerParams = DivinerParams<AnyConfigSchema<AddressChainDivinerConfig>>\n\nexport class MemoryAddressChainDiviner<\n TParams extends MemoryAddressChainDivinerParams = MemoryAddressChainDivinerParams,\n> extends AddressChainDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, AddressChainDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = AddressChainDivinerConfigSchema\n\n get queryAddress(): (Lowercase<string> & {\n readonly __hex: true\n } & {\n readonly __address: true\n }) | XyoQuantAddress {\n return assertEx(this.config.address, () => 'Missing address')\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n const result: Payload[] = []\n assertEx(payloads.length === 0, () => 'MemoryAddressChainDiviner.divine does not allow payloads to be sent')\n try {\n const archivistIn = await this.archivistInstance()\n const archivist = assertEx(archivistIn, () => 'Unable to resolve archivist')\n let currentHash: Hash | null = assertEx(this.config.startHash, () => 'Missing startHash')\n while (currentHash && result.length < (this.config.maxResults ?? 1000)) {\n const bw = await this.archivistFindHash([archivist], currentHash)\n if (bw) {\n result.push(bw)\n const addressIndex = bw.addresses.indexOf(this.queryAddress)\n currentHash = addressIndex === -1 ? null : bw.previous_hashes[addressIndex] ?? null\n } else {\n console.log(`Hash is not a BoundWitness [${currentHash}]`)\n currentHash = null\n }\n }\n } catch (ex) {\n console.log(ex)\n }\n return result\n }\n\n private async archivistFindHash(archivists: ArchivistInstance[], hash: Hash): Promise<BoundWitness | undefined> {\n const archivist = archivists[0]\n if (archivist) {\n return (await archivist.get([hash])).findLast(x => x.schema === BoundWitnessSchema && isStorageMeta(x)) as BoundWitness | undefined\n }\n }\n}\n", "import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { Payload } from '@xyo-network/sdk-protocol-js'\n\nimport type { AddressChainDivinerParams } from './Params.ts'\n\nexport abstract class AddressChainDiviner<\n TParams extends AddressChainDivinerParams = AddressChainDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {}\n", "import { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const AddressChainSchema: 'network.xyo.diviner.address.chain' & {\n readonly __schema: true\n} = asSchema('network.xyo.diviner.address.chain', true)\nexport type AddressChainSchema = typeof AddressChainSchema\n\nexport const AddressChainDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${AddressChainSchema}.config`, true)\nexport type AddressChainDivinerConfigSchema = typeof AddressChainDivinerConfigSchema\n\nexport const AddressChainQuerySchema: string & {\n readonly __schema: true\n} = asSchema(`${AddressChainSchema}.query`, true)\nexport type AddressChainQuerySchema = typeof AddressChainQuerySchema\n"],
|
|
5
|
+
"mappings": ";AACA,SAAS,gBAAgB;AAQzB,SAAS,oBAAoB,qBAAqB;;;ACTlD,SAAS,uBAAuB;AAMzB,IAAe,sBAAf,cASG,gBAAgD;AAAC;;;ACf3D,SAAS,gBAAgB;AAElB,IAAM,qBAET,SAAS,qCAAqC,IAAI;AAG/C,IAAM,kCAET,SAAS,GAAG,kBAAkB,WAAW,IAAI;AAG1C,IAAM,0BAET,SAAS,GAAG,kBAAkB,UAAU,IAAI;;;AFKzC,IAAM,4BAAN,cAEG,oBAA6B;AAAA,EACrC,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,+BAA+B;AAAA,EAC3G,OAAyB,sBAA8B;AAAA,EAEvD,IAAI,eAIiB;AACnB,WAAO,SAAS,KAAK,OAAO,SAAS,MAAM,iBAAiB;AAAA,EAC9D;AAAA,EAEA,MAAyB,cAAc,WAAsB,CAAC,GAAuB;AACnF,UAAM,SAAoB,CAAC;AAC3B,aAAS,SAAS,WAAW,GAAG,MAAM,qEAAqE;AAC3G,QAAI;AACF,YAAM,cAAc,MAAM,KAAK,kBAAkB;AACjD,YAAM,YAAY,SAAS,aAAa,MAAM,6BAA6B;AAC3E,UAAI,cAA2B,SAAS,KAAK,OAAO,WAAW,MAAM,mBAAmB;AACxF,aAAO,eAAe,OAAO,UAAU,KAAK,OAAO,cAAc,MAAO;AACtE,cAAM,KAAK,MAAM,KAAK,kBAAkB,CAAC,SAAS,GAAG,WAAW;AAChE,YAAI,IAAI;AACN,iBAAO,KAAK,EAAE;AACd,gBAAM,eAAe,GAAG,UAAU,QAAQ,KAAK,YAAY;AAC3D,wBAAc,iBAAiB,KAAK,OAAO,GAAG,gBAAgB,YAAY,KAAK;AAAA,QACjF,OAAO;AACL,kBAAQ,IAAI,+BAA+B,WAAW,GAAG;AACzD,wBAAc;AAAA,QAChB;AAAA,MACF;AAAA,IACF,SAAS,IAAI;AACX,cAAQ,IAAI,EAAE;AAAA,IAChB;AACA,WAAO;AAAA,EACT;AAAA,EAEA,MAAc,kBAAkB,YAAiC,MAA+C;AAC9G,UAAM,YAAY,WAAW,CAAC;AAC9B,QAAI,WAAW;AACb,cAAQ,MAAM,UAAU,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,OAAK,EAAE,WAAW,sBAAsB,cAAc,CAAC,CAAC;AAAA,IACxG;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/neutral/model.mjs
CHANGED
|
@@ -1,20 +1,71 @@
|
|
|
1
|
+
// src/Config.ts
|
|
2
|
+
import {
|
|
3
|
+
zodAsFactory,
|
|
4
|
+
zodIsFactory,
|
|
5
|
+
zodToFactory
|
|
6
|
+
} from "@xylabs/sdk-js";
|
|
7
|
+
import { DivinerConfigZod } from "@xyo-network/diviner-model";
|
|
8
|
+
import * as z from "zod/mini";
|
|
9
|
+
|
|
1
10
|
// src/Schema.ts
|
|
2
11
|
import { asSchema } from "@xyo-network/sdk-protocol-js";
|
|
3
12
|
var AddressChainSchema = asSchema("network.xyo.diviner.address.chain", true);
|
|
4
13
|
var AddressChainDivinerConfigSchema = asSchema(`${AddressChainSchema}.config`, true);
|
|
5
14
|
var AddressChainQuerySchema = asSchema(`${AddressChainSchema}.query`, true);
|
|
6
15
|
|
|
16
|
+
// src/Config.ts
|
|
17
|
+
var AddressChainDivinerConfigZod = z.extend(DivinerConfigZod, {
|
|
18
|
+
address: z.optional(z.custom()),
|
|
19
|
+
maxResults: z.optional(z.number()),
|
|
20
|
+
schema: z.literal(AddressChainDivinerConfigSchema),
|
|
21
|
+
startHash: z.optional(z.custom())
|
|
22
|
+
});
|
|
23
|
+
var isAddressChainDivinerConfig = zodIsFactory(AddressChainDivinerConfigZod);
|
|
24
|
+
var asAddressChainDivinerConfig = zodAsFactory(AddressChainDivinerConfigZod, "asAddressChainDivinerConfig");
|
|
25
|
+
var toAddressChainDivinerConfig = zodToFactory(AddressChainDivinerConfigZod, "toAddressChainDivinerConfig");
|
|
26
|
+
|
|
7
27
|
// src/Payload.ts
|
|
8
|
-
|
|
28
|
+
import {
|
|
29
|
+
zodAsFactory as zodAsFactory2,
|
|
30
|
+
zodIsFactory as zodIsFactory2,
|
|
31
|
+
zodToFactory as zodToFactory2
|
|
32
|
+
} from "@xylabs/sdk-js";
|
|
33
|
+
import { PayloadZodOfSchema } from "@xyo-network/sdk-protocol-js";
|
|
34
|
+
var AddressChainPayloadZod = PayloadZodOfSchema(AddressChainSchema);
|
|
35
|
+
var isAddressChainPayload = zodIsFactory2(AddressChainPayloadZod);
|
|
36
|
+
var asAddressChainPayload = zodAsFactory2(AddressChainPayloadZod, "asAddressChainPayload");
|
|
37
|
+
var toAddressChainPayload = zodToFactory2(AddressChainPayloadZod, "toAddressChainPayload");
|
|
9
38
|
|
|
10
39
|
// src/Query.ts
|
|
11
|
-
import {
|
|
12
|
-
|
|
40
|
+
import {
|
|
41
|
+
zodAsFactory as zodAsFactory3,
|
|
42
|
+
zodIsFactory as zodIsFactory3,
|
|
43
|
+
zodToFactory as zodToFactory3
|
|
44
|
+
} from "@xylabs/sdk-js";
|
|
45
|
+
import { PayloadZodOfSchema as PayloadZodOfSchema2, QueryFieldsZod } from "@xyo-network/sdk-protocol-js";
|
|
46
|
+
import * as z2 from "zod/mini";
|
|
47
|
+
var AddressChainQueryPayloadZod = z2.intersection(
|
|
48
|
+
z2.extend(PayloadZodOfSchema2(AddressChainQuerySchema), { ...QueryFieldsZod.shape }),
|
|
49
|
+
z2.custom()
|
|
50
|
+
);
|
|
51
|
+
var isAddressChainQueryPayload = zodIsFactory3(AddressChainQueryPayloadZod);
|
|
52
|
+
var asAddressChainQueryPayload = zodAsFactory3(AddressChainQueryPayloadZod, "asAddressChainQueryPayload");
|
|
53
|
+
var toAddressChainQueryPayload = zodToFactory3(AddressChainQueryPayloadZod, "toAddressChainQueryPayload");
|
|
13
54
|
export {
|
|
14
55
|
AddressChainDivinerConfigSchema,
|
|
56
|
+
AddressChainDivinerConfigZod,
|
|
57
|
+
AddressChainPayloadZod,
|
|
58
|
+
AddressChainQueryPayloadZod,
|
|
15
59
|
AddressChainQuerySchema,
|
|
16
60
|
AddressChainSchema,
|
|
61
|
+
asAddressChainDivinerConfig,
|
|
62
|
+
asAddressChainPayload,
|
|
63
|
+
asAddressChainQueryPayload,
|
|
64
|
+
isAddressChainDivinerConfig,
|
|
17
65
|
isAddressChainPayload,
|
|
18
|
-
isAddressChainQueryPayload
|
|
66
|
+
isAddressChainQueryPayload,
|
|
67
|
+
toAddressChainDivinerConfig,
|
|
68
|
+
toAddressChainPayload,
|
|
69
|
+
toAddressChainQueryPayload
|
|
19
70
|
};
|
|
20
71
|
//# sourceMappingURL=model.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/Schema.ts", "../../src/Payload.ts", "../../src/Query.ts"],
|
|
4
|
-
"sourcesContent": ["import { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const AddressChainSchema = asSchema('network.xyo.diviner.address.chain', true)\nexport type AddressChainSchema = typeof AddressChainSchema\n\nexport const AddressChainDivinerConfigSchema = asSchema(`${AddressChainSchema}.config`, true)\nexport type AddressChainDivinerConfigSchema = typeof AddressChainDivinerConfigSchema\n\nexport const AddressChainQuerySchema = asSchema(`${AddressChainSchema}.query`, true)\nexport type AddressChainQuerySchema = typeof AddressChainQuerySchema\n", "import
|
|
5
|
-
"mappings": ";AAAA,SAAS,gBAAgB;AAElB,IAAM,
|
|
6
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Config.ts", "../../src/Schema.ts", "../../src/Payload.ts", "../../src/Query.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Hash } from '@xylabs/sdk-js'\nimport {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/diviner-model'\nimport type { XyoAddress } from '@xyo-network/sdk-protocol-js'\nimport * as z from 'zod/mini'\n\nimport { AddressChainDivinerConfigSchema } from './Schema.ts'\n\nexport const AddressChainDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n address: z.ZodMiniOptional<z.ZodMiniCustom<XyoAddress, XyoAddress>>\n maxResults: z.ZodMiniOptional<z.ZodMiniNumber<number>>\n schema: z.ZodMiniLiteral<AddressChainDivinerConfigSchema>\n startHash: z.ZodMiniOptional<z.ZodMiniCustom<Hash, Hash>>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, {\n address: z.optional(z.custom<XyoAddress>()),\n maxResults: z.optional(z.number()),\n schema: z.literal(AddressChainDivinerConfigSchema),\n startHash: z.optional(z.custom<Hash>()),\n})\n\nexport type AddressChainDivinerConfigBase = z.infer<typeof AddressChainDivinerConfigZod>\n\nexport const isAddressChainDivinerConfig: ReturnType<typeof zodIsFactory<AddressChainDivinerConfigBase>> = zodIsFactory(AddressChainDivinerConfigZod)\nexport const asAddressChainDivinerConfig: ReturnType<typeof zodAsFactory<AddressChainDivinerConfigBase>> = zodAsFactory(AddressChainDivinerConfigZod, 'asAddressChainDivinerConfig')\nexport const toAddressChainDivinerConfig: ReturnType<typeof zodToFactory<AddressChainDivinerConfigBase>> = zodToFactory(AddressChainDivinerConfigZod, 'toAddressChainDivinerConfig')\n\nexport type AddressChainDivinerConfig = DivinerConfig<{\n address?: XyoAddress\n maxResults?: number\n schema: AddressChainDivinerConfigSchema\n startHash?: Hash\n}>\n", "import { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const AddressChainSchema: 'network.xyo.diviner.address.chain' & {\n readonly __schema: true\n} = asSchema('network.xyo.diviner.address.chain', true)\nexport type AddressChainSchema = typeof AddressChainSchema\n\nexport const AddressChainDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${AddressChainSchema}.config`, true)\nexport type AddressChainDivinerConfigSchema = typeof AddressChainDivinerConfigSchema\n\nexport const AddressChainQuerySchema: string & {\n readonly __schema: true\n} = asSchema(`${AddressChainSchema}.query`, true)\nexport type AddressChainQuerySchema = typeof AddressChainQuerySchema\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport { PayloadZodOfSchema } from '@xyo-network/sdk-protocol-js'\nimport type * as z from 'zod/mini'\n\nimport { AddressChainSchema } from './Schema.ts'\n\nexport const AddressChainPayloadZod: z.ZodMiniObject<{\n schema: z.ZodMiniLiteral<AddressChainSchema>\n}, z.core.$strip> = PayloadZodOfSchema(AddressChainSchema)\n\nexport type AddressChainPayload = z.infer<typeof AddressChainPayloadZod>\n\nexport const isAddressChainPayload: ReturnType<typeof zodIsFactory<AddressChainPayload>> = zodIsFactory(AddressChainPayloadZod)\nexport const asAddressChainPayload: ReturnType<typeof zodAsFactory<AddressChainPayload>> = zodAsFactory(AddressChainPayloadZod, 'asAddressChainPayload')\nexport const toAddressChainPayload: ReturnType<typeof zodToFactory<AddressChainPayload>> = zodToFactory(AddressChainPayloadZod, 'toAddressChainPayload')\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { PayloadFindFilter } from '@xyo-network/sdk-protocol-js'\nimport { PayloadZodOfSchema, QueryFieldsZod } from '@xyo-network/sdk-protocol-js'\nimport * as z from 'zod/mini'\n\nimport { AddressChainQuerySchema } from './Schema.ts'\n\nexport const AddressChainQueryPayloadZod: z.ZodMiniIntersection<\n z.ZodMiniObject<\n & { schema: z.ZodMiniLiteral<AddressChainQuerySchema> }\n & (typeof QueryFieldsZod)['shape'],\n z.core.$strip\n >,\n z.ZodMiniCustom<Omit<PayloadFindFilter, 'schema'>, Omit<PayloadFindFilter, 'schema'>>\n> = z.intersection(\n z.extend(PayloadZodOfSchema(AddressChainQuerySchema), { ...QueryFieldsZod.shape }),\n z.custom<Omit<PayloadFindFilter, 'schema'>>(),\n)\n\nexport type AddressChainQueryPayload = z.infer<typeof AddressChainQueryPayloadZod>\n\nexport const isAddressChainQueryPayload: ReturnType<typeof zodIsFactory<AddressChainQueryPayload>> = zodIsFactory(AddressChainQueryPayloadZod)\nexport const asAddressChainQueryPayload: ReturnType<typeof zodAsFactory<AddressChainQueryPayload>> = zodAsFactory(AddressChainQueryPayloadZod, 'asAddressChainQueryPayload')\nexport const toAddressChainQueryPayload: ReturnType<typeof zodToFactory<AddressChainQueryPayload>> = zodToFactory(AddressChainQueryPayloadZod, 'toAddressChainQueryPayload')\n"],
|
|
5
|
+
"mappings": ";AACA;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAEP,SAAS,wBAAwB;AAEjC,YAAY,OAAO;;;ACPnB,SAAS,gBAAgB;AAElB,IAAM,qBAET,SAAS,qCAAqC,IAAI;AAG/C,IAAM,kCAET,SAAS,GAAG,kBAAkB,WAAW,IAAI;AAG1C,IAAM,0BAET,SAAS,GAAG,kBAAkB,UAAU,IAAI;;;ADHzC,IAAM,+BAQP,SAAO,kBAAkB;AAAA,EAC7B,SAAW,WAAW,SAAmB,CAAC;AAAA,EAC1C,YAAc,WAAW,SAAO,CAAC;AAAA,EACjC,QAAU,UAAQ,+BAA+B;AAAA,EACjD,WAAa,WAAW,SAAa,CAAC;AACxC,CAAC;AAIM,IAAM,8BAA8F,aAAa,4BAA4B;AAC7I,IAAM,8BAA8F,aAAa,8BAA8B,6BAA6B;AAC5K,IAAM,8BAA8F,aAAa,8BAA8B,6BAA6B;;;AE9BnL;AAAA,EACE,gBAAAA;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AACP,SAAS,0BAA0B;AAK5B,IAAM,yBAEO,mBAAmB,kBAAkB;AAIlD,IAAM,wBAA8EC,cAAa,sBAAsB;AACvH,IAAM,wBAA8EC,cAAa,wBAAwB,uBAAuB;AAChJ,IAAM,wBAA8EC,cAAa,wBAAwB,uBAAuB;;;AChBvJ;AAAA,EACE,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACvB;AAEP,SAAS,sBAAAC,qBAAoB,sBAAsB;AACnD,YAAYC,QAAO;AAIZ,IAAM,8BAOP;AAAA,EACF,UAAOC,oBAAmB,uBAAuB,GAAG,EAAE,GAAG,eAAe,MAAM,CAAC;AAAA,EAC/E,UAA0C;AAC9C;AAIO,IAAM,6BAAwFC,cAAa,2BAA2B;AACtI,IAAM,6BAAwFC,cAAa,6BAA6B,4BAA4B;AACpK,IAAM,6BAAwFC,cAAa,6BAA6B,4BAA4B;",
|
|
6
|
+
"names": ["zodAsFactory", "zodIsFactory", "zodToFactory", "zodIsFactory", "zodAsFactory", "zodToFactory", "zodAsFactory", "zodIsFactory", "zodToFactory", "PayloadZodOfSchema", "z", "PayloadZodOfSchema", "zodIsFactory", "zodAsFactory", "zodToFactory"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-address-chain",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -46,31 +46,29 @@
|
|
|
46
46
|
"README.md"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@xyo-network/diviner-
|
|
50
|
-
"@xyo-network/
|
|
51
|
-
"@xyo-network/
|
|
49
|
+
"@xyo-network/diviner-model": "~7.0.0",
|
|
50
|
+
"@xyo-network/diviner-abstract": "~7.0.0",
|
|
51
|
+
"@xyo-network/module-model": "~7.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@bitauth/libauth": "~3.0.0",
|
|
55
55
|
"@metamask/providers": "^22.1.1",
|
|
56
56
|
"@noble/post-quantum": "~0.6.1",
|
|
57
57
|
"@opentelemetry/api": "^1.9.1",
|
|
58
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
58
|
+
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
59
59
|
"@scure/base": "~2.2.0",
|
|
60
60
|
"@scure/bip39": "~2.2.0",
|
|
61
|
-
"@xylabs/geo": "^6.
|
|
62
|
-
"@xylabs/sdk-js": "^6.
|
|
63
|
-
"@xylabs/threads": "^6.
|
|
64
|
-
"@xylabs/toolchain": "
|
|
65
|
-
"@xylabs/tsconfig": "
|
|
66
|
-
"@xylabs/vitest-extended": "
|
|
67
|
-
"@xyo-network/sdk-protocol-js": "~
|
|
61
|
+
"@xylabs/geo": "^6.1.1",
|
|
62
|
+
"@xylabs/sdk-js": "^6.1.1",
|
|
63
|
+
"@xylabs/threads": "^6.1.1",
|
|
64
|
+
"@xylabs/toolchain": "^8.1.20",
|
|
65
|
+
"@xylabs/tsconfig": "^8.1.20",
|
|
66
|
+
"@xylabs/vitest-extended": "^6.1.1",
|
|
67
|
+
"@xyo-network/sdk-protocol-js": "~7.0",
|
|
68
68
|
"ajv": "^8.20.0",
|
|
69
69
|
"async-mutex": "^0.5.0",
|
|
70
|
-
"bn.js": "^5.2.3",
|
|
71
|
-
"buffer": "^6.0.3",
|
|
72
70
|
"debug": "~4.4.3",
|
|
73
|
-
"eslint": "^10.
|
|
71
|
+
"eslint": "^10.5.0",
|
|
74
72
|
"ethers": "^6.16.0",
|
|
75
73
|
"hash-wasm": "~4.12.0",
|
|
76
74
|
"idb": "^8.0.3",
|
|
@@ -81,11 +79,11 @@
|
|
|
81
79
|
"vitest": "~4.1.8",
|
|
82
80
|
"webextension-polyfill": "^0.12.0",
|
|
83
81
|
"zod": "^4.4.3",
|
|
84
|
-
"@xyo-network/archivist-memory": "~
|
|
85
|
-
"@xyo-network/archivist-
|
|
86
|
-
"@xyo-network/
|
|
87
|
-
"@xyo-network/
|
|
88
|
-
"@xyo-network/node-
|
|
82
|
+
"@xyo-network/archivist-memory": "~7.0.0",
|
|
83
|
+
"@xyo-network/archivist-wrapper": "~7.0.0",
|
|
84
|
+
"@xyo-network/node-memory": "~7.0.0",
|
|
85
|
+
"@xyo-network/archivist-model": "~7.0.0",
|
|
86
|
+
"@xyo-network/node-model": "~7.0.0"
|
|
89
87
|
},
|
|
90
88
|
"peerDependencies": {
|
|
91
89
|
"@bitauth/libauth": "~3.0",
|
|
@@ -98,11 +96,9 @@
|
|
|
98
96
|
"@xylabs/geo": "^6.0",
|
|
99
97
|
"@xylabs/sdk-js": "^6.0",
|
|
100
98
|
"@xylabs/threads": "^6.0",
|
|
101
|
-
"@xyo-network/sdk-protocol-js": "
|
|
99
|
+
"@xyo-network/sdk-protocol-js": "^7.0",
|
|
102
100
|
"ajv": "^8.20",
|
|
103
101
|
"async-mutex": "^0.5",
|
|
104
|
-
"bn.js": "^5.2",
|
|
105
|
-
"buffer": "^6.0",
|
|
106
102
|
"debug": "~4.4",
|
|
107
103
|
"ethers": "^6.16",
|
|
108
104
|
"hash-wasm": "~4.12",
|
|
@@ -112,6 +108,9 @@
|
|
|
112
108
|
"webextension-polyfill": "^0.12",
|
|
113
109
|
"zod": "^4.4"
|
|
114
110
|
},
|
|
111
|
+
"engines": {
|
|
112
|
+
"node": "^24"
|
|
113
|
+
},
|
|
115
114
|
"publishConfig": {
|
|
116
115
|
"access": "public"
|
|
117
116
|
}
|