@xyo-network/diviner-hash-lease 5.2.18 → 5.2.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.
|
@@ -11,12 +11,12 @@ export type HashLease = Payload<{
|
|
|
11
11
|
* Identity function for HashLease payload
|
|
12
12
|
*/
|
|
13
13
|
export declare const isHashLease: (x?: unknown | null) => x is HashLease;
|
|
14
|
-
export declare const asHashLease: import("@xylabs/
|
|
14
|
+
export declare const asHashLease: import("@xylabs/sdk-js").AsTypeFunction<HashLease>;
|
|
15
15
|
export declare const asOptionalHashLease: (value: import("@xylabs/promise").AnyNonPromise) => HashLease | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* Identity function for HashLease payload with sources
|
|
18
18
|
*/
|
|
19
19
|
export declare const isHashLeaseWithSources: (x?: unknown | null) => x is WithSources<WithSources<HashLease>>;
|
|
20
|
-
export declare const asHashLeaseWithSources: import("@xylabs/
|
|
20
|
+
export declare const asHashLeaseWithSources: import("@xylabs/sdk-js").AsTypeFunction<WithSources<HashLease>>;
|
|
21
21
|
export declare const asOptionalHashLeaseWithSources: (value: import("@xylabs/promise").AnyNonPromise) => WithSources<HashLease> | undefined;
|
|
22
22
|
//# sourceMappingURL=HashLease.d.ts.map
|
|
@@ -24,12 +24,12 @@ export type HashLeaseEstimate = Payload<HashLeaseEstimateFields, HashLeaseEstima
|
|
|
24
24
|
* Identity function for HashLeaseEstimate payload
|
|
25
25
|
*/
|
|
26
26
|
export declare const isHashLeaseEstimate: (x?: unknown | null) => x is HashLeaseEstimate;
|
|
27
|
-
export declare const asHashLeaseEstimate: import("@xylabs/
|
|
27
|
+
export declare const asHashLeaseEstimate: import("@xylabs/sdk-js").AsTypeFunction<HashLeaseEstimate>;
|
|
28
28
|
export declare const asOptionalHashLeaseEstimate: (value: import("@xylabs/promise").AnyNonPromise) => HashLeaseEstimate | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* Identity function for HashLeaseEstimate payload with sources
|
|
31
31
|
*/
|
|
32
32
|
export declare const isHashLeaseEstimateWithSources: (x?: unknown | null) => x is WithSources<WithSources<HashLeaseEstimate>>;
|
|
33
|
-
export declare const asHashLeaseEstimateWithSources: import("@xylabs/
|
|
33
|
+
export declare const asHashLeaseEstimateWithSources: import("@xylabs/sdk-js").AsTypeFunction<WithSources<HashLeaseEstimate>>;
|
|
34
34
|
export declare const asOptionalHashLeaseEstimateWithSources: (value: import("@xylabs/promise").AnyNonPromise) => WithSources<HashLeaseEstimate> | undefined;
|
|
35
35
|
//# sourceMappingURL=HashLeaseEstimate.d.ts.map
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import { AbstractDiviner } from "@xyo-network/diviner-abstract";
|
|
|
22
22
|
import { creatableModule } from "@xyo-network/module-model";
|
|
23
23
|
|
|
24
24
|
// src/Payload/HashLease.ts
|
|
25
|
-
import { AsObjectFactory } from "@xylabs/
|
|
25
|
+
import { AsObjectFactory } from "@xylabs/sdk-js";
|
|
26
26
|
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from "@xyo-network/payload-model";
|
|
27
27
|
var HashLeaseSchema = "network.xyo.hash.lease";
|
|
28
28
|
var isHashLease = isPayloadOfSchemaType(HashLeaseSchema);
|
|
@@ -33,7 +33,7 @@ var asHashLeaseWithSources = AsObjectFactory.create(isHashLeaseWithSources);
|
|
|
33
33
|
var asOptionalHashLeaseWithSources = AsObjectFactory.createOptional(isHashLeaseWithSources);
|
|
34
34
|
|
|
35
35
|
// src/Payload/HashLeaseEstimate.ts
|
|
36
|
-
import { AsObjectFactory as AsObjectFactory2 } from "@xylabs/
|
|
36
|
+
import { AsObjectFactory as AsObjectFactory2 } from "@xylabs/sdk-js";
|
|
37
37
|
import { isPayloadOfSchemaType as isPayloadOfSchemaType2, isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources2 } from "@xyo-network/payload-model";
|
|
38
38
|
var HashLeaseEstimateSchema = "network.xyo.hash.lease.estimate";
|
|
39
39
|
var isHashLeaseEstimate = isPayloadOfSchemaType2(HashLeaseEstimateSchema);
|
|
@@ -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/
|
|
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/sdk-js'\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/sdk-js'\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": "5.2.
|
|
3
|
+
"version": "5.2.19",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"!**/*.test.*"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xylabs/
|
|
40
|
-
"@xyo-network/diviner-abstract": "~5.2.
|
|
41
|
-
"@xyo-network/diviner-model": "~5.2.
|
|
42
|
-
"@xyo-network/module-model": "~5.2.
|
|
43
|
-
"@xyo-network/payload-model": "~5.2.
|
|
39
|
+
"@xylabs/sdk-js": "~5.0.61",
|
|
40
|
+
"@xyo-network/diviner-abstract": "~5.2.19",
|
|
41
|
+
"@xyo-network/diviner-model": "~5.2.19",
|
|
42
|
+
"@xyo-network/module-model": "~5.2.19",
|
|
43
|
+
"@xyo-network/payload-model": "~5.2.19"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@xylabs/ts-scripts-yarn3": "~7.2.
|
|
47
|
-
"@xylabs/tsconfig": "~7.2.
|
|
46
|
+
"@xylabs/ts-scripts-yarn3": "~7.2.32",
|
|
47
|
+
"@xylabs/tsconfig": "~7.2.32",
|
|
48
48
|
"typescript": "~5.9.3"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
package/src/Payload/HashLease.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsObjectFactory } from '@xylabs/
|
|
1
|
+
import { AsObjectFactory } from '@xylabs/sdk-js'
|
|
2
2
|
import type { Payload, WithSources } from '@xyo-network/payload-model'
|
|
3
3
|
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsObjectFactory } from '@xylabs/
|
|
1
|
+
import { AsObjectFactory } from '@xylabs/sdk-js'
|
|
2
2
|
import type { Payload, WithSources } from '@xyo-network/payload-model'
|
|
3
3
|
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'
|
|
4
4
|
|