@xyo-network/diviner-hash-lease 3.9.17 → 3.9.19

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.
@@ -0,0 +1,5 @@
1
+ import type { DivinerConfig } from '@xyo-network/diviner-model';
2
+ export declare const HashLeaseEstimateDivinerConfigSchema: "network.xyo.diviner.hash.lease.estimate.config";
3
+ export type HashLeaseEstimateDivinerConfigSchema = typeof HashLeaseEstimateDivinerConfigSchema;
4
+ export type HashLeaseEstimateDivinerConfig = DivinerConfig<{}, HashLeaseEstimateDivinerConfigSchema>;
5
+ //# sourceMappingURL=Config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE/D,eAAO,MAAM,oCAAoC,EAAG,gDAAyD,CAAA;AAC7G,MAAM,MAAM,oCAAoC,GAAG,OAAO,oCAAoC,CAAA;AAE9F,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAExD,EAEC,EACD,oCAAoC,CACrC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
2
+ import { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
3
+ import { Payload, Schema } from '@xyo-network/payload-model';
4
+ import { HashLeaseEstimateDivinerParams } from './Params.ts';
5
+ import { HashLeaseEstimate } from './Payload/index.ts';
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
+ static readonly configSchemas: Schema[];
8
+ static readonly defaultConfigSchema: Schema;
9
+ static readonly targetSchema: "network.xyo.hash.lease.estimate";
10
+ protected divineHandler(_payloads?: TIn[]): Promise<TOut[]>;
11
+ }
12
+ //# sourceMappingURL=Diviner.d.ts.map
@@ -0,0 +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,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAEpF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAG5D,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAA2B,MAAM,oBAAoB,CAAA;AAE/E,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,oCAA0B;cAEtC,aAAa,CAAC,SAAS,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAG/E"}
@@ -0,0 +1,5 @@
1
+ import type { DivinerParams } from '@xyo-network/diviner-model';
2
+ import type { AnyConfigSchema } from '@xyo-network/module-model';
3
+ import type { HashLeaseEstimateDivinerConfig } from './Config.ts';
4
+ export type HashLeaseEstimateDivinerParams<TConfig extends AnyConfigSchema<HashLeaseEstimateDivinerConfig> = AnyConfigSchema<HashLeaseEstimateDivinerConfig>> = DivinerParams<TConfig>;
5
+ //# sourceMappingURL=Params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAEjE,MAAM,MAAM,8BAA8B,CACxC,OAAO,SAAS,eAAe,CAAC,8BAA8B,CAAC,GAAG,eAAe,CAAC,8BAA8B,CAAC,IAC/G,aAAa,CAAC,OAAO,CAAC,CAAA"}
@@ -0,0 +1,28 @@
1
+ import type { Payload, WithSources } from '@xyo-network/payload-model';
2
+ export declare const HashLeaseSchema: "network.xyo.hash.lease";
3
+ export type HashLeaseSchema = typeof HashLeaseSchema;
4
+ export type HashLease = Payload<{
5
+ /**
6
+ * The desired duration of the lease
7
+ */
8
+ duration: number;
9
+ }, HashLeaseSchema>;
10
+ /**
11
+ * Identity function for HashLease payload
12
+ */
13
+ export declare const isHashLease: (x?: unknown | null) => x is HashLease;
14
+ export declare const asHashLease: {
15
+ <TType extends HashLease>(value: import("@xylabs/promise").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
16
+ <TType extends HashLease>(value: import("@xylabs/promise").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<HashLease>, config?: import("@xylabs/object").TypeCheckConfig): TType;
17
+ };
18
+ export declare const asOptionalHashLease: <TType extends HashLease>(value: import("@xylabs/promise").AnyNonPromise) => TType | undefined;
19
+ /**
20
+ * Identity function for HashLease payload with sources
21
+ */
22
+ export declare const isHashLeaseWithSources: (x?: unknown | null) => x is WithSources<WithSources<HashLease>>;
23
+ export declare const asHashLeaseWithSources: {
24
+ <TType extends WithSources<HashLease>>(value: import("@xylabs/promise").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
25
+ <TType extends WithSources<HashLease>>(value: import("@xylabs/promise").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<WithSources<HashLease>>, config?: import("@xylabs/object").TypeCheckConfig): TType;
26
+ };
27
+ export declare const asOptionalHashLeaseWithSources: <TType extends WithSources<HashLease>>(value: import("@xylabs/promise").AnyNonPromise) => TType | undefined;
28
+ //# sourceMappingURL=HashLease.d.ts.map
@@ -0,0 +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,4BAA4B,CAAA;AAGtE,eAAO,MAAM,eAAe,EAAG,wBAAiC,CAAA;AAChE,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAA;AAEpD,MAAM,MAAM,SAAS,GAAG,OAAO,CAC7B;IACE;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB,EACD,eAAe,CAChB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,wCAAoD,CAAA;AAC5E,eAAO,MAAM,WAAW;4CAjBK,iBAAgB,iCAChC,gBAAoB;4CAKpB,iBAAiB,oGAQJ,gBACvB;CAEsE,CAAA;AACzE,eAAO,MAAM,mBAAmB,0CAD4B,iBACzD,qCAAsF,CAAA;AAEzF;;GAEG;AACH,eAAO,MAAM,sBAAsB,kEAA4E,CAAA;AAC/G,eAAO,MAAM,sBAAsB;yDAxBN,iBAAgB,iCAChC,gBAAoB;yDAKpB,iBAAiB,iHAQJ,gBACvB;CASyG,CAAA;AAC5G,eAAO,MAAM,8BAA8B,uDARiB,iBACzD,qCAOyH,CAAA"}
@@ -0,0 +1,45 @@
1
+ import type { Payload, WithSources } from '@xyo-network/payload-model';
2
+ export declare const HashLeaseEstimateSchema: "network.xyo.hash.lease.estimate";
3
+ export type HashLeaseEstimateSchema = typeof HashLeaseEstimateSchema;
4
+ export interface HashLeaseEstimateFields {
5
+ /**
6
+ * The currency of the price
7
+ */
8
+ currency: string;
9
+ /**
10
+ * When the lease ends
11
+ */
12
+ exp: number;
13
+ /**
14
+ * When the lease begins
15
+ */
16
+ nbf: number;
17
+ /**
18
+ * The estimated price of the lease
19
+ */
20
+ price: number;
21
+ }
22
+ export type HashLeaseEstimate = Payload<HashLeaseEstimateFields, HashLeaseEstimateSchema>;
23
+ /**
24
+ * Identity function for HashLeaseEstimate payload
25
+ */
26
+ export declare const isHashLeaseEstimate: (x?: unknown | null) => x is HashLeaseEstimate;
27
+ export declare const asHashLeaseEstimate: {
28
+ <TType extends HashLeaseEstimate>(value: import("@xylabs/promise").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
29
+ <TType extends HashLeaseEstimate>(value: import("@xylabs/promise").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<HashLeaseEstimate>, config?: import("@xylabs/object" /**
30
+ * When the lease begins
31
+ */).TypeCheckConfig): TType;
32
+ };
33
+ export declare const asOptionalHashLeaseEstimate: <TType extends HashLeaseEstimate>(value: import("@xylabs/promise").AnyNonPromise) => TType | undefined;
34
+ /**
35
+ * Identity function for HashLeaseEstimate payload with sources
36
+ */
37
+ export declare const isHashLeaseEstimateWithSources: (x?: unknown | null) => x is WithSources<WithSources<HashLeaseEstimate>>;
38
+ export declare const asHashLeaseEstimateWithSources: {
39
+ <TType extends WithSources<HashLeaseEstimate>>(value: import("@xylabs/promise").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
40
+ <TType extends WithSources<HashLeaseEstimate>>(value: import("@xylabs/promise").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<WithSources<HashLeaseEstimate>>, config?: import("@xylabs/object" /**
41
+ * When the lease begins
42
+ */).TypeCheckConfig): TType;
43
+ };
44
+ export declare const asOptionalHashLeaseEstimateWithSources: <TType extends WithSources<HashLeaseEstimate>>(value: import("@xylabs/promise").AnyNonPromise) => TType | undefined;
45
+ //# sourceMappingURL=HashLeaseEstimate.d.ts.map
@@ -0,0 +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,4BAA4B,CAAA;AAGtE,eAAO,MAAM,uBAAuB,EAAG,iCAA0C,CAAA;AACjF,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAA;AAEzF;;GAEG;AACH,eAAO,MAAM,mBAAmB,gDAAoE,CAAA;AACpG,eAAO,MAAM,mBAAmB;oDA5BJ,iBAAiB,iCAAiC,gBAC9D;oDAES,iBAAiB,4GAOvC,gBAED,CAAA;;OAEG;CAc4F,CAAA;AACjG,eAAO,MAAM,2BAA2B,kDAPtB,iBAAiB,qCAO8E,CAAA;AAEjH;;GAEG;AACH,eAAO,MAAM,8BAA8B,0EAA4F,CAAA;AACvI,eAAO,MAAM,8BAA8B;iEAnCf,iBAAiB,iCAAiC,gBAC9D;iEAES,iBAAiB,yHAOvC,gBAED,CAAA;;OAEG;CAqB+H,CAAA;AACpI,eAAO,MAAM,sCAAsC,+DAdjC,iBAAiB,qCAciH,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './HashLease.ts';
2
+ export * from './HashLeaseEstimate.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Payload/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA"}
@@ -1,61 +1,5 @@
1
- import { DivinerConfig, DivinerParams, DivinerModuleEventData, DivinerInstance } from '@xyo-network/diviner-model';
2
- import { AbstractDiviner } from '@xyo-network/diviner-abstract';
3
- import { Payload, WithSources, Schema } from '@xyo-network/payload-model';
4
- import { AnyConfigSchema } from '@xyo-network/module-model';
5
- import * as _xylabs_object from '@xylabs/object';
6
- import * as _xylabs_promise from '@xylabs/promise';
7
-
8
- declare const HashLeaseEstimateDivinerConfigSchema: "network.xyo.diviner.hash.lease.estimate.config";
9
- type HashLeaseEstimateDivinerConfigSchema = typeof HashLeaseEstimateDivinerConfigSchema;
10
- type HashLeaseEstimateDivinerConfig = DivinerConfig<{}, HashLeaseEstimateDivinerConfigSchema>;
11
-
12
- type HashLeaseEstimateDivinerParams<TConfig extends AnyConfigSchema<HashLeaseEstimateDivinerConfig> = AnyConfigSchema<HashLeaseEstimateDivinerConfig>> = DivinerParams<TConfig>;
13
-
14
- declare const HashLeaseSchema: "network.xyo.hash.lease";
15
- type HashLeaseSchema = typeof HashLeaseSchema;
16
- type HashLease = Payload<{
17
- duration: number;
18
- }, HashLeaseSchema>;
19
- declare const isHashLease: (x?: unknown | null) => x is HashLease;
20
- declare const asHashLease: {
21
- <TType extends HashLease>(value: _xylabs_promise.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
22
- <TType extends HashLease>(value: _xylabs_promise.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<HashLease>, config?: _xylabs_object.TypeCheckConfig): TType;
23
- };
24
- declare const asOptionalHashLease: <TType extends HashLease>(value: _xylabs_promise.AnyNonPromise) => TType | undefined;
25
- declare const isHashLeaseWithSources: (x?: unknown | null) => x is WithSources<WithSources<HashLease>>;
26
- declare const asHashLeaseWithSources: {
27
- <TType extends WithSources<HashLease>>(value: _xylabs_promise.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
28
- <TType extends WithSources<HashLease>>(value: _xylabs_promise.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<WithSources<HashLease>>, config?: _xylabs_object.TypeCheckConfig): TType;
29
- };
30
- declare const asOptionalHashLeaseWithSources: <TType extends WithSources<HashLease>>(value: _xylabs_promise.AnyNonPromise) => TType | undefined;
31
-
32
- declare const HashLeaseEstimateSchema: "network.xyo.hash.lease.estimate";
33
- type HashLeaseEstimateSchema = typeof HashLeaseEstimateSchema;
34
- interface HashLeaseEstimateFields {
35
- currency: string;
36
- exp: number;
37
- nbf: number;
38
- price: number;
39
- }
40
- type HashLeaseEstimate = Payload<HashLeaseEstimateFields, HashLeaseEstimateSchema>;
41
- declare const isHashLeaseEstimate: (x?: unknown | null) => x is HashLeaseEstimate;
42
- declare const asHashLeaseEstimate: {
43
- <TType extends HashLeaseEstimate>(value: _xylabs_promise.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
44
- <TType extends HashLeaseEstimate>(value: _xylabs_promise.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<HashLeaseEstimate>, config?: _xylabs_object.TypeCheckConfig): TType;
45
- };
46
- declare const asOptionalHashLeaseEstimate: <TType extends HashLeaseEstimate>(value: _xylabs_promise.AnyNonPromise) => TType | undefined;
47
- declare const isHashLeaseEstimateWithSources: (x?: unknown | null) => x is WithSources<WithSources<HashLeaseEstimate>>;
48
- declare const asHashLeaseEstimateWithSources: {
49
- <TType extends WithSources<HashLeaseEstimate>>(value: _xylabs_promise.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
50
- <TType extends WithSources<HashLeaseEstimate>>(value: _xylabs_promise.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<WithSources<HashLeaseEstimate>>, config?: _xylabs_object.TypeCheckConfig): TType;
51
- };
52
- declare const asOptionalHashLeaseEstimateWithSources: <TType extends WithSources<HashLeaseEstimate>>(value: _xylabs_promise.AnyNonPromise) => TType | undefined;
53
-
54
- 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> {
55
- static readonly configSchemas: Schema[];
56
- static readonly defaultConfigSchema: Schema;
57
- static readonly targetSchema: "network.xyo.hash.lease.estimate";
58
- protected divineHandler(_payloads?: TIn[]): Promise<TOut[]>;
59
- }
60
-
61
- export { type HashLease, type HashLeaseEstimate, HashLeaseEstimateDiviner, type HashLeaseEstimateDivinerConfig, HashLeaseEstimateDivinerConfigSchema, type HashLeaseEstimateDivinerParams, type HashLeaseEstimateFields, HashLeaseEstimateSchema, HashLeaseSchema, asHashLease, asHashLeaseEstimate, asHashLeaseEstimateWithSources, asHashLeaseWithSources, asOptionalHashLease, asOptionalHashLeaseEstimate, asOptionalHashLeaseEstimateWithSources, asOptionalHashLeaseWithSources, isHashLease, isHashLeaseEstimate, isHashLeaseEstimateWithSources, isHashLeaseWithSources };
1
+ export * from './Config.ts';
2
+ export * from './Diviner.ts';
3
+ export * from './Params.ts';
4
+ export * from './Payload/index.ts';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA"}
@@ -23,10 +23,7 @@ import { creatableModule } from "@xyo-network/module-model";
23
23
 
24
24
  // src/Payload/HashLease.ts
25
25
  import { AsObjectFactory } from "@xylabs/object";
26
- import {
27
- isPayloadOfSchemaType,
28
- isPayloadOfSchemaTypeWithSources
29
- } from "@xyo-network/payload-model";
26
+ import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from "@xyo-network/payload-model";
30
27
  var HashLeaseSchema = "network.xyo.hash.lease";
31
28
  var isHashLease = isPayloadOfSchemaType(HashLeaseSchema);
32
29
  var asHashLease = AsObjectFactory.create(isHashLease);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Config.ts","../../src/Diviner.ts","../../src/Payload/HashLease.ts","../../src/Payload/HashLeaseEstimate.ts"],"sourcesContent":["import type { DivinerConfig } from '@xyo-network/diviner-model'\n\nexport const HashLeaseEstimateDivinerConfigSchema = 'network.xyo.diviner.hash.lease.estimate.config' as const\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 { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport { creatableModule } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { HashLeaseEstimateDivinerConfigSchema } from './Config.ts'\nimport { HashLeaseEstimateDivinerParams } from './Params.ts'\nimport { HashLeaseEstimate, 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/object'\nimport {\n isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources, type Payload, type WithSources,\n} from '@xyo-network/payload-model'\n\nexport const HashLeaseSchema = 'network.xyo.hash.lease' as const\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/object'\nimport type { Payload, WithSources } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'\n\nexport const HashLeaseEstimateSchema = 'network.xyo.hash.lease.estimate' as const\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"],"mappings":";;;;;;;;;;;;;;;;;AAEO,IAAM,uCAAuC;;;ACFpD,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;;;ACFhC,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAAuB;AAAA,OAClB;AAEA,IAAM,kBAAkB;AAgBxB,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;;;AC9B3H,SAAS,mBAAAA,wBAAuB;AAEhC,SAAS,yBAAAC,wBAAuB,oCAAAC,yCAAwC;AAEjE,IAAM,0BAA0B;AA2BhC,IAAM,sBAAsBD,uBAAyC,uBAAuB;AAC5F,IAAM,sBAAsBD,iBAAgB,OAA0B,mBAAmB;AACzF,IAAM,8BAA8BA,iBAAgB,eAAkC,mBAAmB;AAKzG,IAAM,iCAAiCE,kCAAiE,uBAAuB;AAC/H,IAAM,iCAAiCF,iBAAgB,OAAuC,8BAA8B;AAC5H,IAAM,yCAAyCA,iBAAgB,eAA+C,8BAA8B;;;AF9B5I,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;","names":["AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources"]}
1
+ {"version":3,"sources":["../../src/Config.ts","../../src/Diviner.ts","../../src/Payload/HashLease.ts","../../src/Payload/HashLeaseEstimate.ts"],"sourcesContent":["import type { DivinerConfig } from '@xyo-network/diviner-model'\n\nexport const HashLeaseEstimateDivinerConfigSchema = 'network.xyo.diviner.hash.lease.estimate.config' as const\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 { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport { creatableModule } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\n\nimport { HashLeaseEstimateDivinerConfigSchema } from './Config.ts'\nimport { HashLeaseEstimateDivinerParams } from './Params.ts'\nimport { HashLeaseEstimate, 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/object'\nimport type { Payload, WithSources } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'\n\nexport const HashLeaseSchema = 'network.xyo.hash.lease' as const\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/object'\nimport type { Payload, WithSources } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'\n\nexport const HashLeaseEstimateSchema = 'network.xyo.hash.lease.estimate' as const\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"],"mappings":";;;;;;;;;;;;;;;;;AAEO,IAAM,uCAAuC;;;ACFpD,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;;;ACFhC,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB,wCAAwC;AAEjE,IAAM,kBAAkB;AAgBxB,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;;;AC7B3H,SAAS,mBAAAA,wBAAuB;AAEhC,SAAS,yBAAAC,wBAAuB,oCAAAC,yCAAwC;AAEjE,IAAM,0BAA0B;AA2BhC,IAAM,sBAAsBD,uBAAyC,uBAAuB;AAC5F,IAAM,sBAAsBD,iBAAgB,OAA0B,mBAAmB;AACzF,IAAM,8BAA8BA,iBAAgB,eAAkC,mBAAmB;AAKzG,IAAM,iCAAiCE,kCAAiE,uBAAuB;AAC/H,IAAM,iCAAiCF,iBAAgB,OAAuC,8BAA8B;AAC5H,IAAM,yCAAyCA,iBAAgB,eAA+C,8BAA8B;;;AF9B5I,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;","names":["AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-hash-lease",
3
- "version": "3.9.17",
3
+ "version": "3.9.19",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -30,15 +30,15 @@
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
32
  "@xylabs/object": "^4.5.1",
33
- "@xyo-network/diviner-abstract": "^3.9.17",
34
- "@xyo-network/diviner-model": "^3.9.17",
35
- "@xyo-network/module-model": "^3.9.17",
36
- "@xyo-network/payload-model": "^3.9.17"
33
+ "@xyo-network/diviner-abstract": "^3.9.19",
34
+ "@xyo-network/diviner-model": "^3.9.19",
35
+ "@xyo-network/module-model": "^3.9.19",
36
+ "@xyo-network/payload-model": "^3.9.19"
37
37
  },
38
38
  "devDependencies": {
39
- "@xylabs/ts-scripts-yarn3": "^5.0.24",
40
- "@xylabs/tsconfig": "^5.0.24",
41
- "typescript": "^5.7.3"
39
+ "@xylabs/ts-scripts-yarn3": "^5.0.39",
40
+ "@xylabs/tsconfig": "^5.0.39",
41
+ "typescript": "^5.8.2"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"
@@ -1,7 +1,6 @@
1
1
  import { AsObjectFactory } from '@xylabs/object'
2
- import {
3
- isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources, type Payload, type WithSources,
4
- } from '@xyo-network/payload-model'
2
+ import type { Payload, WithSources } from '@xyo-network/payload-model'
3
+ import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'
5
4
 
6
5
  export const HashLeaseSchema = 'network.xyo.hash.lease' as const
7
6
  export type HashLeaseSchema = typeof HashLeaseSchema