@xyo-network/diviner-hash-lease 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 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-hash-lease.svg
45
46
  [npm-link]: https://www.npmjs.com/package/@xyo-network/diviner-hash-lease
46
47
  [license-badge]: https://img.shields.io/npm/l/@xyo-network/diviner-hash-lease.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
@@ -1,7 +1,17 @@
1
+ import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk-js';
1
2
  import type { DivinerConfig } from '@xyo-network/diviner-model';
2
- export declare const HashLeaseEstimateDivinerConfigSchema: "network.xyo.diviner.hash.lease.estimate.config" & {
3
+ import { DivinerConfigZod } from '@xyo-network/diviner-model';
4
+ import * as z from 'zod/mini';
5
+ export declare const HashLeaseEstimateDivinerConfigSchema: 'network.xyo.diviner.hash.lease.estimate.config' & {
3
6
  readonly __schema: true;
4
7
  };
5
8
  export type HashLeaseEstimateDivinerConfigSchema = typeof HashLeaseEstimateDivinerConfigSchema;
9
+ export declare const HashLeaseEstimateDivinerConfigZod: z.ZodMiniObject<Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {
10
+ schema: z.ZodMiniLiteral<HashLeaseEstimateDivinerConfigSchema>;
11
+ }, z.core.$strip>;
12
+ export type HashLeaseEstimateDivinerConfigBase = z.infer<typeof HashLeaseEstimateDivinerConfigZod>;
13
+ export declare const isHashLeaseEstimateDivinerConfig: ReturnType<typeof zodIsFactory<HashLeaseEstimateDivinerConfigBase>>;
14
+ export declare const asHashLeaseEstimateDivinerConfig: ReturnType<typeof zodAsFactory<HashLeaseEstimateDivinerConfigBase>>;
15
+ export declare const toHashLeaseEstimateDivinerConfig: ReturnType<typeof zodToFactory<HashLeaseEstimateDivinerConfigBase>>;
6
16
  export type HashLeaseEstimateDivinerConfig = DivinerConfig<{}, HashLeaseEstimateDivinerConfigSchema>;
7
17
  //# sourceMappingURL=Config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG/D,eAAO,MAAM,oCAAoC;;CAAmE,CAAA;AACpH,MAAM,MAAM,oCAAoC,GAAG,OAAO,oCAAoC,CAAA;AAE9F,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAExD,EAEC,EACD,oCAAoC,CACrC,CAAA"}
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,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;AAE7D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,eAAO,MAAM,oCAAoC,EAAE,gDAAgD,GAAG;IACpG,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CAC2C,CAAA;AACpE,MAAM,MAAM,oCAAoC,GAAG,OAAO,oCAAoC,CAAA;AAE9F,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,aAAa,CAC7D,IAAI,CAAC,CAAC,OAAO,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,GAAG;IACnD,MAAM,EAAE,CAAC,CAAC,cAAc,CAAC,oCAAoC,CAAC,CAAA;CAC/D,EACD,CAAC,CAAC,IAAI,CAAC,MAAM,CAC4E,CAAA;AAE3F,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAElG,eAAO,MAAM,gCAAgC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,kCAAkC,CAAC,CAAmD,CAAA;AACpK,eAAO,MAAM,gCAAgC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,kCAAkC,CAAC,CAAuF,CAAA;AACxM,eAAO,MAAM,gCAAgC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,kCAAkC,CAAC,CAAuF,CAAA;AAExM,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAExD,EAEC,EACD,oCAAoC,CACrC,CAAA"}
@@ -6,7 +6,7 @@ import type { HashLeaseEstimate } from './Payload/index.ts';
6
6
  export declare class HashLeaseEstimateDiviner<TParams extends HashLeaseEstimateDivinerParams = HashLeaseEstimateDivinerParams, TIn extends Payload = Payload, TOut extends HashLeaseEstimate | Payload = HashLeaseEstimate | Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
7
7
  static readonly configSchemas: Schema[];
8
8
  static readonly defaultConfigSchema: Schema;
9
- static readonly targetSchema: "network.xyo.hash.lease.estimate" & {
9
+ static readonly targetSchema: 'network.xyo.hash.lease.estimate' & {
10
10
  readonly __schema: true;
11
11
  };
12
12
  protected divineHandler(_payloads?: TIn[]): Promise<TOut[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO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O,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAG3D,qBACa,wBAAwB,CACnC,OAAO,SAAS,8BAA8B,GAAG,8BAA8B,EAC/E,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,IAAI,SAAS,iBAAiB,GAAG,OAAO,GAAG,iBAAiB,GAAG,OAAO,EACtE,UAAU,SAAS,sBAAsB,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAChH,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EACnC,GAAG,EACH,IAAI,CACL,CACD,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;IACvD,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAiE;IACjH,gBAAyB,mBAAmB,EAAE,MAAM,CAAuC;IAC3F,gBAAyB,YAAY,EAAE,iCAAiC,GAAG;QACzE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;KACxB,CAA0B;cAEF,aAAa,CAAC,SAAS,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAG/E"}
@@ -1,24 +1,27 @@
1
- import type { Payload, WithSources } from '@xyo-network/sdk-protocol-js';
2
- export declare const HashLeaseSchema: "network.xyo.hash.lease" & {
1
+ import type { AnyNonPromise, AsTypeFunction } from '@xylabs/sdk-js';
2
+ import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk-js';
3
+ import type { WithSources } from '@xyo-network/sdk-protocol-js';
4
+ import * as z from 'zod/mini';
5
+ export declare const HashLeaseSchema: 'network.xyo.hash.lease' & {
3
6
  readonly __schema: true;
4
7
  };
5
8
  export type HashLeaseSchema = typeof HashLeaseSchema;
6
- export type HashLease = Payload<{
7
- /**
8
- * The desired duration of the lease
9
- */
10
- duration: number;
11
- }, HashLeaseSchema>;
9
+ export declare const HashLeaseZod: z.ZodMiniObject<{
10
+ duration: z.ZodMiniNumber<number>;
11
+ schema: z.ZodMiniLiteral<HashLeaseSchema>;
12
+ }, z.core.$strip>;
13
+ export type HashLease = z.infer<typeof HashLeaseZod>;
12
14
  /**
13
15
  * Identity function for HashLease payload
14
16
  */
15
- export declare const isHashLease: (x?: unknown) => x is HashLease;
16
- export declare const asHashLease: import("@xylabs/sdk-js").AsTypeFunction<HashLease>;
17
- export declare const asOptionalHashLease: (value: import("@xylabs/sdk-js").AnyNonPromise) => HashLease | undefined;
17
+ export declare const isHashLease: ReturnType<typeof zodIsFactory<HashLease>>;
18
+ export declare const asHashLease: ReturnType<typeof zodAsFactory<HashLease>>;
19
+ export declare const asOptionalHashLease: (value: AnyNonPromise) => HashLease | undefined;
20
+ export declare const toHashLease: ReturnType<typeof zodToFactory<HashLease>>;
18
21
  /**
19
22
  * Identity function for HashLease payload with sources
20
23
  */
21
24
  export declare const isHashLeaseWithSources: (x?: unknown) => x is WithSources<WithSources<HashLease>>;
22
- export declare const asHashLeaseWithSources: import("@xylabs/sdk-js").AsTypeFunction<WithSources<HashLease>>;
23
- export declare const asOptionalHashLeaseWithSources: (value: import("@xylabs/sdk-js").AnyNonPromise) => WithSources<HashLease> | undefined;
25
+ export declare const asHashLeaseWithSources: AsTypeFunction<WithSources<HashLease>>;
26
+ export declare const asOptionalHashLeaseWithSources: (value: AnyNonPromise) => WithSources<HashLease> | undefined;
24
27
  //# sourceMappingURL=HashLease.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HashLease.d.ts","sourceRoot":"","sources":["../../../src/Payload/HashLease.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAKxE,eAAO,MAAM,eAAe;;CAA2C,CAAA;AACvE,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAA;AAEpD,MAAM,MAAM,SAAS,GAAG,OAAO,CAC7B;IACE;;OAEG;IACH,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EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAA6C,CAAA;AAChH,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,SAAS,GAAG,SAAkE,CAAA;AAC1I,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAA6C,CAAA;AAEhH;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAA6E,CAAA;AAC1K,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,WAAW,CAAC,SAAS,CAAC,CAA0E,CAAA;AACpJ,eAAO,MAAM,8BAA8B,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,WAAW,CAAC,SAAS,CAAC,GAAG,SAA0F,CAAA"}
@@ -1,5 +1,8 @@
1
- import type { Payload, WithSources } from '@xyo-network/sdk-protocol-js';
2
- export declare const HashLeaseEstimateSchema: "network.xyo.hash.lease.estimate" & {
1
+ import type { AnyNonPromise, AsTypeFunction } from '@xylabs/sdk-js';
2
+ import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk-js';
3
+ import type { WithSources } from '@xyo-network/sdk-protocol-js';
4
+ import * as z from 'zod/mini';
5
+ export declare const HashLeaseEstimateSchema: 'network.xyo.hash.lease.estimate' & {
3
6
  readonly __schema: true;
4
7
  };
5
8
  export type HashLeaseEstimateSchema = typeof HashLeaseEstimateSchema;
@@ -21,17 +24,21 @@ export interface HashLeaseEstimateFields {
21
24
  */
22
25
  price: number;
23
26
  }
24
- export type HashLeaseEstimate = Payload<HashLeaseEstimateFields, HashLeaseEstimateSchema>;
27
+ export declare const HashLeaseEstimateZod: z.ZodMiniIntersection<z.ZodMiniObject<{
28
+ schema: z.ZodMiniLiteral<HashLeaseEstimateSchema>;
29
+ }, z.core.$strip>, z.ZodMiniCustom<HashLeaseEstimateFields, HashLeaseEstimateFields>>;
30
+ export type HashLeaseEstimate = z.infer<typeof HashLeaseEstimateZod>;
25
31
  /**
26
32
  * Identity function for HashLeaseEstimate payload
27
33
  */
28
- export declare const isHashLeaseEstimate: (x?: unknown) => x is HashLeaseEstimate;
29
- export declare const asHashLeaseEstimate: import("@xylabs/sdk-js").AsTypeFunction<HashLeaseEstimate>;
30
- export declare const asOptionalHashLeaseEstimate: (value: import("@xylabs/sdk-js").AnyNonPromise) => HashLeaseEstimate | undefined;
34
+ export declare const isHashLeaseEstimate: ReturnType<typeof zodIsFactory<HashLeaseEstimate>>;
35
+ export declare const asHashLeaseEstimate: ReturnType<typeof zodAsFactory<HashLeaseEstimate>>;
36
+ export declare const asOptionalHashLeaseEstimate: (value: AnyNonPromise) => HashLeaseEstimate | undefined;
37
+ export declare const toHashLeaseEstimate: ReturnType<typeof zodToFactory<HashLeaseEstimate>>;
31
38
  /**
32
39
  * Identity function for HashLeaseEstimate payload with sources
33
40
  */
34
41
  export declare const isHashLeaseEstimateWithSources: (x?: unknown) => x is WithSources<WithSources<HashLeaseEstimate>>;
35
- export declare const asHashLeaseEstimateWithSources: import("@xylabs/sdk-js").AsTypeFunction<WithSources<HashLeaseEstimate>>;
36
- export declare const asOptionalHashLeaseEstimateWithSources: (value: import("@xylabs/sdk-js").AnyNonPromise) => WithSources<HashLeaseEstimate> | undefined;
42
+ export declare const asHashLeaseEstimateWithSources: AsTypeFunction<WithSources<HashLeaseEstimate>>;
43
+ export declare const asOptionalHashLeaseEstimateWithSources: (value: AnyNonPromise) => WithSources<HashLeaseEstimate> | undefined;
37
44
  //# sourceMappingURL=HashLeaseEstimate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HashLeaseEstimate.d.ts","sourceRoot":"","sources":["../../../src/Payload/HashLeaseEstimate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAKxE,eAAO,MAA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superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
16
16
 
17
17
  // src/Config.ts
18
+ import {
19
+ zodAsFactory,
20
+ zodIsFactory,
21
+ zodToFactory
22
+ } from "@xylabs/sdk-js";
23
+ import { DivinerConfigZod } from "@xyo-network/diviner-model";
18
24
  import { asSchema } from "@xyo-network/sdk-protocol-js";
25
+ import * as z from "zod/mini";
19
26
  var HashLeaseEstimateDivinerConfigSchema = asSchema("network.xyo.diviner.hash.lease.estimate.config", true);
27
+ var HashLeaseEstimateDivinerConfigZod = z.extend(DivinerConfigZod, { schema: z.literal(HashLeaseEstimateDivinerConfigSchema) });
28
+ var isHashLeaseEstimateDivinerConfig = zodIsFactory(HashLeaseEstimateDivinerConfigZod);
29
+ var asHashLeaseEstimateDivinerConfig = zodAsFactory(HashLeaseEstimateDivinerConfigZod, "asHashLeaseEstimateDivinerConfig");
30
+ var toHashLeaseEstimateDivinerConfig = zodToFactory(HashLeaseEstimateDivinerConfigZod, "toHashLeaseEstimateDivinerConfig");
20
31
 
21
32
  // src/Diviner.ts
22
33
  import { AbstractDiviner } from "@xyo-network/diviner-abstract";
23
34
  import { creatableModule } from "@xyo-network/module-model";
24
35
 
25
36
  // src/Payload/HashLease.ts
26
- import { AsObjectFactory } from "@xylabs/sdk-js";
37
+ import {
38
+ AsObjectFactory,
39
+ zodAsFactory as zodAsFactory2,
40
+ zodIsFactory as zodIsFactory2,
41
+ zodToFactory as zodToFactory2
42
+ } from "@xylabs/sdk-js";
27
43
  import {
28
44
  asSchema as asSchema2,
29
- isPayloadOfSchemaType,
30
- isPayloadOfSchemaTypeWithSources
45
+ isPayloadOfSchemaTypeWithSources,
46
+ PayloadZodOfSchema
31
47
  } from "@xyo-network/sdk-protocol-js";
48
+ import * as z2 from "zod/mini";
32
49
  var HashLeaseSchema = asSchema2("network.xyo.hash.lease", true);
33
- var isHashLease = isPayloadOfSchemaType(HashLeaseSchema);
34
- var asHashLease = AsObjectFactory.create(isHashLease);
50
+ var HashLeaseZod = z2.extend(PayloadZodOfSchema(HashLeaseSchema), {
51
+ /**
52
+ * The desired duration of the lease
53
+ */
54
+ duration: z2.number()
55
+ });
56
+ var isHashLease = zodIsFactory2(HashLeaseZod);
57
+ var asHashLease = zodAsFactory2(HashLeaseZod, "asHashLease");
35
58
  var asOptionalHashLease = AsObjectFactory.createOptional(isHashLease);
59
+ var toHashLease = zodToFactory2(HashLeaseZod, "toHashLease");
36
60
  var isHashLeaseWithSources = isPayloadOfSchemaTypeWithSources(HashLeaseSchema);
37
61
  var asHashLeaseWithSources = AsObjectFactory.create(isHashLeaseWithSources);
38
62
  var asOptionalHashLeaseWithSources = AsObjectFactory.createOptional(isHashLeaseWithSources);
39
63
 
40
64
  // src/Payload/HashLeaseEstimate.ts
41
- import { AsObjectFactory as AsObjectFactory2 } from "@xylabs/sdk-js";
65
+ import {
66
+ AsObjectFactory as AsObjectFactory2,
67
+ zodAsFactory as zodAsFactory3,
68
+ zodIsFactory as zodIsFactory3,
69
+ zodToFactory as zodToFactory3
70
+ } from "@xylabs/sdk-js";
42
71
  import {
43
72
  asSchema as asSchema3,
44
- isPayloadOfSchemaType as isPayloadOfSchemaType2,
45
- isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources2
73
+ isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources2,
74
+ PayloadZodOfSchema as PayloadZodOfSchema2
46
75
  } from "@xyo-network/sdk-protocol-js";
76
+ import * as z3 from "zod/mini";
47
77
  var HashLeaseEstimateSchema = asSchema3("network.xyo.hash.lease.estimate", true);
48
- var isHashLeaseEstimate = isPayloadOfSchemaType2(HashLeaseEstimateSchema);
49
- var asHashLeaseEstimate = AsObjectFactory2.create(isHashLeaseEstimate);
78
+ var HashLeaseEstimateZod = z3.intersection(PayloadZodOfSchema2(HashLeaseEstimateSchema), z3.custom());
79
+ var isHashLeaseEstimate = zodIsFactory3(HashLeaseEstimateZod);
80
+ var asHashLeaseEstimate = zodAsFactory3(HashLeaseEstimateZod, "asHashLeaseEstimate");
50
81
  var asOptionalHashLeaseEstimate = AsObjectFactory2.createOptional(isHashLeaseEstimate);
82
+ var toHashLeaseEstimate = zodToFactory3(HashLeaseEstimateZod, "toHashLeaseEstimate");
51
83
  var isHashLeaseEstimateWithSources = isPayloadOfSchemaTypeWithSources2(HashLeaseEstimateSchema);
52
84
  var asHashLeaseEstimateWithSources = AsObjectFactory2.create(isHashLeaseEstimateWithSources);
53
85
  var asOptionalHashLeaseEstimateWithSources = AsObjectFactory2.createOptional(isHashLeaseEstimateWithSources);
@@ -67,10 +99,14 @@ HashLeaseEstimateDiviner = __decorateClass([
67
99
  export {
68
100
  HashLeaseEstimateDiviner,
69
101
  HashLeaseEstimateDivinerConfigSchema,
102
+ HashLeaseEstimateDivinerConfigZod,
70
103
  HashLeaseEstimateSchema,
104
+ HashLeaseEstimateZod,
71
105
  HashLeaseSchema,
106
+ HashLeaseZod,
72
107
  asHashLease,
73
108
  asHashLeaseEstimate,
109
+ asHashLeaseEstimateDivinerConfig,
74
110
  asHashLeaseEstimateWithSources,
75
111
  asHashLeaseWithSources,
76
112
  asOptionalHashLease,
@@ -79,7 +115,11 @@ export {
79
115
  asOptionalHashLeaseWithSources,
80
116
  isHashLease,
81
117
  isHashLeaseEstimate,
118
+ isHashLeaseEstimateDivinerConfig,
82
119
  isHashLeaseEstimateWithSources,
83
- isHashLeaseWithSources
120
+ isHashLeaseWithSources,
121
+ toHashLease,
122
+ toHashLeaseEstimate,
123
+ toHashLeaseEstimateDivinerConfig
84
124
  };
85
125
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Config.ts", "../../src/Diviner.ts", "../../src/Payload/HashLease.ts", "../../src/Payload/HashLeaseEstimate.ts"],
4
- "sourcesContent": ["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema } from '@xyo-network/sdk-protocol-js'\n\nexport const HashLeaseEstimateDivinerConfigSchema = asSchema('network.xyo.diviner.hash.lease.estimate.config', true)\nexport type HashLeaseEstimateDivinerConfigSchema = typeof HashLeaseEstimateDivinerConfigSchema\n\nexport type HashLeaseEstimateDivinerConfig = DivinerConfig<\n\n {\n //\n },\n HashLeaseEstimateDivinerConfigSchema\n>\n", "import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport { creatableModule } from '@xyo-network/module-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol-js'\n\nimport { HashLeaseEstimateDivinerConfigSchema } from './Config.ts'\nimport type { HashLeaseEstimateDivinerParams } from './Params.ts'\nimport type { HashLeaseEstimate } from './Payload/index.ts'\nimport { HashLeaseEstimateSchema } from './Payload/index.ts'\n\n@creatableModule()\nexport class HashLeaseEstimateDiviner<\n TParams extends HashLeaseEstimateDivinerParams = HashLeaseEstimateDivinerParams,\n TIn extends Payload = Payload,\n TOut extends HashLeaseEstimate | Payload = HashLeaseEstimate | 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 static override readonly configSchemas: Schema[] = [...super.configSchemas, HashLeaseEstimateDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = HashLeaseEstimateDivinerConfigSchema\n static override readonly targetSchema = HashLeaseEstimateSchema\n\n protected override async divineHandler(_payloads: TIn[] = []): Promise<TOut[]> {\n return await Promise.resolve([])\n }\n}\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\nimport type { Payload, WithSources } from '@xyo-network/sdk-protocol-js'\nimport {\n asSchema, isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/sdk-protocol-js'\n\nexport const HashLeaseSchema = asSchema('network.xyo.hash.lease', true)\nexport type HashLeaseSchema = typeof HashLeaseSchema\n\nexport type HashLease = Payload<\n {\n /**\n * The desired duration of the lease\n */\n duration: number\n },\n HashLeaseSchema\n>\n\n/**\n * Identity function for HashLease payload\n */\nexport const isHashLease = isPayloadOfSchemaType<HashLease>(HashLeaseSchema)\nexport const asHashLease = AsObjectFactory.create<HashLease>(isHashLease)\nexport const asOptionalHashLease = AsObjectFactory.createOptional<HashLease>(isHashLease)\n\n/**\n * Identity function for HashLease payload with sources\n */\nexport const isHashLeaseWithSources = isPayloadOfSchemaTypeWithSources<WithSources<HashLease>>(HashLeaseSchema)\nexport const asHashLeaseWithSources = AsObjectFactory.create<WithSources<HashLease>>(isHashLeaseWithSources)\nexport const asOptionalHashLeaseWithSources = AsObjectFactory.createOptional<WithSources<HashLease>>(isHashLeaseWithSources)\n", "import { AsObjectFactory } from '@xylabs/sdk-js'\nimport type { Payload, WithSources } from '@xyo-network/sdk-protocol-js'\nimport {\n asSchema, isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources,\n} from '@xyo-network/sdk-protocol-js'\n\nexport const HashLeaseEstimateSchema = asSchema('network.xyo.hash.lease.estimate', true)\nexport type HashLeaseEstimateSchema = typeof HashLeaseEstimateSchema\n\nexport interface HashLeaseEstimateFields {\n /**\n * The currency of the price\n */\n currency: string\n /**\n * When the lease ends\n */\n exp: number\n /**\n * When the lease begins\n */\n nbf: number\n /**\n * The estimated price of the lease\n */\n price: number\n}\n\nexport type HashLeaseEstimate = Payload<HashLeaseEstimateFields, HashLeaseEstimateSchema>\n\n/**\n * Identity function for HashLeaseEstimate payload\n */\nexport const isHashLeaseEstimate = isPayloadOfSchemaType<HashLeaseEstimate>(HashLeaseEstimateSchema)\nexport const asHashLeaseEstimate = AsObjectFactory.create<HashLeaseEstimate>(isHashLeaseEstimate)\nexport const asOptionalHashLeaseEstimate = AsObjectFactory.createOptional<HashLeaseEstimate>(isHashLeaseEstimate)\n\n/**\n * Identity function for HashLeaseEstimate payload with sources\n */\nexport const isHashLeaseEstimateWithSources = isPayloadOfSchemaTypeWithSources<WithSources<HashLeaseEstimate>>(HashLeaseEstimateSchema)\nexport const asHashLeaseEstimateWithSources = AsObjectFactory.create<WithSources<HashLeaseEstimate>>(isHashLeaseEstimateWithSources)\nexport const asOptionalHashLeaseEstimateWithSources = AsObjectFactory.createOptional<WithSources<HashLeaseEstimate>>(isHashLeaseEstimateWithSources)\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AACA,SAAS,gBAAgB;AAElB,IAAM,uCAAuC,SAAS,kDAAkD,IAAI;;;ACHnH,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;;;ACFhC,SAAS,uBAAuB;AAEhC;AAAA,EACE,YAAAA;AAAA,EAAU;AAAA,EAAuB;AAAA,OAC5B;AAEA,IAAM,kBAAkBA,UAAS,0BAA0B,IAAI;AAgB/D,IAAM,cAAc,sBAAiC,eAAe;AACpE,IAAM,cAAc,gBAAgB,OAAkB,WAAW;AACjE,IAAM,sBAAsB,gBAAgB,eAA0B,WAAW;AAKjF,IAAM,yBAAyB,iCAAyD,eAAe;AACvG,IAAM,yBAAyB,gBAAgB,OAA+B,sBAAsB;AACpG,IAAM,iCAAiC,gBAAgB,eAAuC,sBAAsB;;;AC/B3H,SAAS,mBAAAC,wBAAuB;AAEhC;AAAA,EACE,YAAAC;AAAA,EAAU,yBAAAC;AAAA,EAAuB,oCAAAC;AAAA,OAC5B;AAEA,IAAM,0BAA0BF,UAAS,mCAAmC,IAAI;AA2BhF,IAAM,sBAAsBC,uBAAyC,uBAAuB;AAC5F,IAAM,sBAAsBF,iBAAgB,OAA0B,mBAAmB;AACzF,IAAM,8BAA8BA,iBAAgB,eAAkC,mBAAmB;AAKzG,IAAM,iCAAiCG,kCAAiE,uBAAuB;AAC/H,IAAM,iCAAiCH,iBAAgB,OAAuC,8BAA8B;AAC5H,IAAM,yCAAyCA,iBAAgB,eAA+C,8BAA8B;;;AF/B5I,IAAM,2BAAN,cASG,gBAAgD;AAAA,EAKxD,MAAyB,cAAc,YAAmB,CAAC,GAAoB;AAC7E,WAAO,MAAM,QAAQ,QAAQ,CAAC,CAAC;AAAA,EACjC;AACF;AAPE,cAVW,0BAUc,iBAA0B,CAAC,GAAG,+DAAM,kBAAe,oCAAoC;AAChH,cAXW,0BAWc,uBAA8B;AACvD,cAZW,0BAYc,gBAAe;AAZ7B,2BAAN;AAAA,EADN,gBAAgB;AAAA,GACJ;",
6
- "names": ["asSchema", "AsObjectFactory", "asSchema", "isPayloadOfSchemaType", "isPayloadOfSchemaTypeWithSources"]
4
+ "sourcesContent": ["import {\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 { asSchema } from '@xyo-network/sdk-protocol-js'\nimport * as z from 'zod/mini'\n\nexport const HashLeaseEstimateDivinerConfigSchema: 'network.xyo.diviner.hash.lease.estimate.config' & {\n readonly __schema: true\n} = asSchema('network.xyo.diviner.hash.lease.estimate.config', true)\nexport type HashLeaseEstimateDivinerConfigSchema = typeof HashLeaseEstimateDivinerConfigSchema\n\nexport const HashLeaseEstimateDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n schema: z.ZodMiniLiteral<HashLeaseEstimateDivinerConfigSchema>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, { schema: z.literal(HashLeaseEstimateDivinerConfigSchema) })\n\nexport type HashLeaseEstimateDivinerConfigBase = z.infer<typeof HashLeaseEstimateDivinerConfigZod>\n\nexport const isHashLeaseEstimateDivinerConfig: ReturnType<typeof zodIsFactory<HashLeaseEstimateDivinerConfigBase>> = zodIsFactory(HashLeaseEstimateDivinerConfigZod)\nexport const asHashLeaseEstimateDivinerConfig: ReturnType<typeof zodAsFactory<HashLeaseEstimateDivinerConfigBase>> = zodAsFactory(HashLeaseEstimateDivinerConfigZod, 'asHashLeaseEstimateDivinerConfig')\nexport const toHashLeaseEstimateDivinerConfig: ReturnType<typeof zodToFactory<HashLeaseEstimateDivinerConfigBase>> = zodToFactory(HashLeaseEstimateDivinerConfigZod, 'toHashLeaseEstimateDivinerConfig')\n\nexport type HashLeaseEstimateDivinerConfig = DivinerConfig<\n\n {\n //\n },\n HashLeaseEstimateDivinerConfigSchema\n>\n", "import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport { creatableModule } from '@xyo-network/module-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol-js'\n\nimport { HashLeaseEstimateDivinerConfigSchema } from './Config.ts'\nimport type { HashLeaseEstimateDivinerParams } from './Params.ts'\nimport type { HashLeaseEstimate } from './Payload/index.ts'\nimport { HashLeaseEstimateSchema } from './Payload/index.ts'\n\n@creatableModule()\nexport class HashLeaseEstimateDiviner<\n TParams extends HashLeaseEstimateDivinerParams = HashLeaseEstimateDivinerParams,\n TIn extends Payload = Payload,\n TOut extends HashLeaseEstimate | Payload = HashLeaseEstimate | 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 static override readonly configSchemas: Schema[] = [...super.configSchemas, HashLeaseEstimateDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = HashLeaseEstimateDivinerConfigSchema\n static override readonly targetSchema: 'network.xyo.hash.lease.estimate' & {\n readonly __schema: true\n } = HashLeaseEstimateSchema\n\n protected override async divineHandler(_payloads: TIn[] = []): Promise<TOut[]> {\n return await Promise.resolve([])\n }\n}\n", "import type { AnyNonPromise, AsTypeFunction } from '@xylabs/sdk-js'\nimport {\n AsObjectFactory, zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { WithSources } from '@xyo-network/sdk-protocol-js'\nimport {\n asSchema, isPayloadOfSchemaTypeWithSources, PayloadZodOfSchema,\n} from '@xyo-network/sdk-protocol-js'\nimport * as z from 'zod/mini'\n\nexport const HashLeaseSchema: 'network.xyo.hash.lease' & {\n readonly __schema: true\n} = asSchema('network.xyo.hash.lease', true)\nexport type HashLeaseSchema = typeof HashLeaseSchema\n\nexport const HashLeaseZod: z.ZodMiniObject<{\n duration: z.ZodMiniNumber<number>\n schema: z.ZodMiniLiteral<HashLeaseSchema>\n}, z.core.$strip> = z.extend(PayloadZodOfSchema(HashLeaseSchema), {\n /**\n * The desired duration of the lease\n */\n duration: z.number(),\n})\n\nexport type HashLease = z.infer<typeof HashLeaseZod>\n\n/**\n * Identity function for HashLease payload\n */\nexport const isHashLease: ReturnType<typeof zodIsFactory<HashLease>> = zodIsFactory(HashLeaseZod)\nexport const asHashLease: ReturnType<typeof zodAsFactory<HashLease>> = zodAsFactory(HashLeaseZod, 'asHashLease')\nexport const asOptionalHashLease: (value: AnyNonPromise) => HashLease | undefined = AsObjectFactory.createOptional<HashLease>(isHashLease)\nexport const toHashLease: ReturnType<typeof zodToFactory<HashLease>> = zodToFactory(HashLeaseZod, 'toHashLease')\n\n/**\n * Identity function for HashLease payload with sources\n */\nexport const isHashLeaseWithSources: (x?: unknown) => x is WithSources<WithSources<HashLease>> = isPayloadOfSchemaTypeWithSources<WithSources<HashLease>>(HashLeaseSchema)\nexport const asHashLeaseWithSources: AsTypeFunction<WithSources<HashLease>> = AsObjectFactory.create<WithSources<HashLease>>(isHashLeaseWithSources)\nexport const asOptionalHashLeaseWithSources: (value: AnyNonPromise) => WithSources<HashLease> | undefined = AsObjectFactory.createOptional<WithSources<HashLease>>(isHashLeaseWithSources)\n", "import type { AnyNonPromise, AsTypeFunction } from '@xylabs/sdk-js'\nimport {\n AsObjectFactory, zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { WithSources } from '@xyo-network/sdk-protocol-js'\nimport {\n asSchema, isPayloadOfSchemaTypeWithSources, PayloadZodOfSchema,\n} from '@xyo-network/sdk-protocol-js'\nimport * as z from 'zod/mini'\n\nexport const HashLeaseEstimateSchema: 'network.xyo.hash.lease.estimate' & {\n readonly __schema: true\n} = asSchema('network.xyo.hash.lease.estimate', true)\nexport type HashLeaseEstimateSchema = typeof HashLeaseEstimateSchema\n\nexport interface HashLeaseEstimateFields {\n /**\n * The currency of the price\n */\n currency: string\n /**\n * When the lease ends\n */\n exp: number\n /**\n * When the lease begins\n */\n nbf: number\n /**\n * The estimated price of the lease\n */\n price: number\n}\n\nexport const HashLeaseEstimateZod: z.ZodMiniIntersection<\n z.ZodMiniObject<{ schema: z.ZodMiniLiteral<HashLeaseEstimateSchema> }, z.core.$strip>,\n z.ZodMiniCustom<HashLeaseEstimateFields, HashLeaseEstimateFields>\n> = z.intersection(PayloadZodOfSchema(HashLeaseEstimateSchema), z.custom<HashLeaseEstimateFields>())\n\nexport type HashLeaseEstimate = z.infer<typeof HashLeaseEstimateZod>\n\n/**\n * Identity function for HashLeaseEstimate payload\n */\nexport const isHashLeaseEstimate: ReturnType<typeof zodIsFactory<HashLeaseEstimate>> = zodIsFactory(HashLeaseEstimateZod)\nexport const asHashLeaseEstimate: ReturnType<typeof zodAsFactory<HashLeaseEstimate>> = zodAsFactory(HashLeaseEstimateZod, 'asHashLeaseEstimate')\nexport const asOptionalHashLeaseEstimate: (value: AnyNonPromise) => HashLeaseEstimate | undefined = AsObjectFactory.createOptional<HashLeaseEstimate>(isHashLeaseEstimate)\nexport const toHashLeaseEstimate: ReturnType<typeof zodToFactory<HashLeaseEstimate>> = zodToFactory(HashLeaseEstimateZod, 'toHashLeaseEstimate')\n\n/**\n * Identity function for HashLeaseEstimate payload with sources\n */\nexport const isHashLeaseEstimateWithSources: (\n x?: unknown,\n) => x is WithSources<WithSources<HashLeaseEstimate>> = isPayloadOfSchemaTypeWithSources<WithSources<HashLeaseEstimate>>(HashLeaseEstimateSchema)\nexport const asHashLeaseEstimateWithSources: AsTypeFunction<WithSources<HashLeaseEstimate>> = AsObjectFactory.create<WithSources<HashLeaseEstimate>>(isHashLeaseEstimateWithSources)\nexport const asOptionalHashLeaseEstimateWithSources: (\n value: AnyNonPromise,\n) => WithSources<HashLeaseEstimate> | undefined = AsObjectFactory.createOptional<WithSources<HashLeaseEstimate>>(isHashLeaseEstimateWithSources)\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAEP,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AACzB,YAAY,OAAO;AAEZ,IAAM,uCAET,SAAS,kDAAkD,IAAI;AAG5D,IAAM,oCAKP,SAAO,kBAAkB,EAAE,QAAU,UAAQ,oCAAoC,EAAE,CAAC;AAInF,IAAM,mCAAwG,aAAa,iCAAiC;AAC5J,IAAM,mCAAwG,aAAa,mCAAmC,kCAAkC;AAChM,IAAM,mCAAwG,aAAa,mCAAmC,kCAAkC;;;ACxBvM,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;;;ACDhC;AAAA,EACE;AAAA,EAAiB,gBAAAA;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACxC;AAEP;AAAA,EACE,YAAAC;AAAA,EAAU;AAAA,EAAkC;AAAA,OACvC;AACP,YAAYC,QAAO;AAEZ,IAAM,kBAETD,UAAS,0BAA0B,IAAI;AAGpC,IAAM,eAGS,UAAO,mBAAmB,eAAe,GAAG;AAAA;AAAA;AAAA;AAAA,EAIhE,UAAY,UAAO;AACrB,CAAC;AAOM,IAAM,cAA0DF,cAAa,YAAY;AACzF,IAAM,cAA0DD,cAAa,cAAc,aAAa;AACxG,IAAM,sBAAuE,gBAAgB,eAA0B,WAAW;AAClI,IAAM,cAA0DE,cAAa,cAAc,aAAa;AAKxG,IAAM,yBAAoF,iCAAyD,eAAe;AAClK,IAAM,yBAAiE,gBAAgB,OAA+B,sBAAsB;AAC5I,IAAM,iCAA+F,gBAAgB,eAAuC,sBAAsB;;;ACvCzL;AAAA,EACE,mBAAAG;AAAA,EAAiB,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,EAAc,gBAAAC;AAAA,OACxC;AAEP;AAAA,EACE,YAAAC;AAAA,EAAU,oCAAAC;AAAA,EAAkC,sBAAAC;AAAA,OACvC;AACP,YAAYC,QAAO;AAEZ,IAAM,0BAETH,UAAS,mCAAmC,IAAI;AAsB7C,IAAM,uBAGP,gBAAaE,oBAAmB,uBAAuB,GAAK,UAAgC,CAAC;AAO5F,IAAM,sBAA0EJ,cAAa,oBAAoB;AACjH,IAAM,sBAA0ED,cAAa,sBAAsB,qBAAqB;AACxI,IAAM,8BAAuFD,iBAAgB,eAAkC,mBAAmB;AAClK,IAAM,sBAA0EG,cAAa,sBAAsB,qBAAqB;AAKxI,IAAM,iCAE2CE,kCAAiE,uBAAuB;AACzI,IAAM,iCAAiFL,iBAAgB,OAAuC,8BAA8B;AAC5K,IAAM,yCAEqCA,iBAAgB,eAA+C,8BAA8B;;;AF/CxI,IAAM,2BAAN,cASG,gBAAgD;AAAA,EAOxD,MAAyB,cAAc,YAAmB,CAAC,GAAoB;AAC7E,WAAO,MAAM,QAAQ,QAAQ,CAAC,CAAC;AAAA,EACjC;AACF;AATE,cAVW,0BAUc,iBAA0B,CAAC,GAAG,+DAAM,kBAAe,oCAAoC;AAChH,cAXW,0BAWc,uBAA8B;AACvD,cAZW,0BAYc,gBAErB;AAdO,2BAAN;AAAA,EADN,gBAAgB;AAAA,GACJ;",
6
+ "names": ["zodAsFactory", "zodIsFactory", "zodToFactory", "asSchema", "z", "AsObjectFactory", "zodAsFactory", "zodIsFactory", "zodToFactory", "asSchema", "isPayloadOfSchemaTypeWithSources", "PayloadZodOfSchema", "z"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-hash-lease",
3
- "version": "6.0.4",
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": {
@@ -34,30 +34,28 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@xyo-network/diviner-abstract": "~6.0.4",
38
- "@xyo-network/diviner-model": "~6.0.4",
39
- "@xyo-network/module-model": "~6.0.4"
37
+ "@xyo-network/diviner-abstract": "~7.0.0",
38
+ "@xyo-network/diviner-model": "~7.0.0",
39
+ "@xyo-network/module-model": "~7.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@bitauth/libauth": "~3.0.0",
43
43
  "@metamask/providers": "^22.1.1",
44
44
  "@noble/post-quantum": "~0.6.1",
45
45
  "@opentelemetry/api": "^1.9.1",
46
- "@opentelemetry/sdk-trace-base": "^2.7.1",
46
+ "@opentelemetry/sdk-trace-base": "^2.8.0",
47
47
  "@scure/base": "~2.2.0",
48
48
  "@scure/bip39": "~2.2.0",
49
- "@xylabs/geo": "^6.0.8",
50
- "@xylabs/sdk-js": "^6.0.8",
51
- "@xylabs/threads": "^6.0.8",
52
- "@xylabs/toolchain": "~8.1.16",
53
- "@xylabs/tsconfig": "~8.1.16",
54
- "@xyo-network/sdk-protocol-js": "~6.0.9",
49
+ "@xylabs/geo": "^6.1.1",
50
+ "@xylabs/sdk-js": "^6.1.1",
51
+ "@xylabs/threads": "^6.1.1",
52
+ "@xylabs/toolchain": "^8.1.20",
53
+ "@xylabs/tsconfig": "^8.1.20",
54
+ "@xyo-network/sdk-protocol-js": "~7.0",
55
55
  "ajv": "^8.20.0",
56
56
  "async-mutex": "^0.5.0",
57
- "bn.js": "^5.2.3",
58
- "buffer": "^6.0.3",
59
57
  "debug": "~4.4.3",
60
- "eslint": "^10.4.1",
58
+ "eslint": "^10.5.0",
61
59
  "ethers": "^6.16.0",
62
60
  "hash-wasm": "~4.12.0",
63
61
  "idb": "^8.0.3",
@@ -79,11 +77,9 @@
79
77
  "@xylabs/geo": "^6.0",
80
78
  "@xylabs/sdk-js": "^6.0",
81
79
  "@xylabs/threads": "^6.0",
82
- "@xyo-network/sdk-protocol-js": "~6.0",
80
+ "@xyo-network/sdk-protocol-js": "^7.0",
83
81
  "ajv": "^8.20",
84
82
  "async-mutex": "^0.5",
85
- "bn.js": "^5.2",
86
- "buffer": "^6.0",
87
83
  "debug": "~4.4",
88
84
  "ethers": "^6.16",
89
85
  "hash-wasm": "~4.12",
@@ -93,6 +89,9 @@
93
89
  "webextension-polyfill": "^0.12",
94
90
  "zod": "^4.4"
95
91
  },
92
+ "engines": {
93
+ "node": "^24"
94
+ },
96
95
  "publishConfig": {
97
96
  "access": "public"
98
97
  }