@xyo-network/diviner-hash-lease 3.9.17 → 3.9.18
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/dist/neutral/index.mjs
CHANGED
|
@@ -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 {
|
|
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.
|
|
3
|
+
"version": "3.9.18",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -30,14 +30,14 @@
|
|
|
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.
|
|
34
|
-
"@xyo-network/diviner-model": "^3.9.
|
|
35
|
-
"@xyo-network/module-model": "^3.9.
|
|
36
|
-
"@xyo-network/payload-model": "^3.9.
|
|
33
|
+
"@xyo-network/diviner-abstract": "^3.9.18",
|
|
34
|
+
"@xyo-network/diviner-model": "^3.9.18",
|
|
35
|
+
"@xyo-network/module-model": "^3.9.18",
|
|
36
|
+
"@xyo-network/payload-model": "^3.9.18"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@xylabs/ts-scripts-yarn3": "^5.0.
|
|
40
|
-
"@xylabs/tsconfig": "^5.0.
|
|
39
|
+
"@xylabs/ts-scripts-yarn3": "^5.0.25",
|
|
40
|
+
"@xylabs/tsconfig": "^5.0.25",
|
|
41
41
|
"typescript": "^5.7.3"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
package/src/Payload/HashLease.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import {
|
|
3
|
-
|
|
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
|