@xyo-network/diviner-hash-lease 3.0.1 → 3.0.3
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.map +1 -1
- package/package.json +9 -9
- package/src/Config.ts +1 -1
- package/src/Params.ts +3 -3
- package/src/Payload/HashLease.ts +1 -1
- package/src/Payload/HashLeaseEstimate.ts +2 -1
- package/xy.config.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Config.ts","../../src/Diviner.ts","../../src/Payload/HashLease.ts","../../src/Payload/HashLeaseEstimate.ts"],"sourcesContent":["import { 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 targetSchema = HashLeaseEstimateSchema\n\n protected override async divineHandler(_payloads: TIn[] = []): Promise<TOut[]> {\n return await Promise.resolve([])\n }\n}\n","import { Payload } 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","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, 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 targetSchema = HashLeaseEstimateSchema\n\n protected override async divineHandler(_payloads: TIn[] = []): Promise<TOut[]> {\n return await Promise.resolve([])\n }\n}\n","import type { Payload } 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","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, 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)\n\n/**\n * Identity function for HashLeaseEstimate payload with meta\n */\nexport const isHashLeaseEstimateWithMeta = isPayloadOfSchemaTypeWithMeta<HashLeaseEstimate>(HashLeaseEstimateSchema)\n\n/**\n * Identity function for HashLeaseEstimate payload with sources\n */\nexport const isHashLeaseEstimateWithSources = isPayloadOfSchemaTypeWithSources<HashLeaseEstimate>(HashLeaseEstimateSchema)\n"],"mappings":";;;;AAEO,IAAMA,uCAAuC;;;ACFpD,SAASC,uBAAuB;AAEhC,SAASC,uBAAuB;;;ACAzB,IAAMC,kBAAkB;;;ACD/B,SAASC,uBAAuBC,+BAA+BC,wCAAwC;AAEhG,IAAMC,0BAA0B;AA2BhC,IAAMC,sBAAsBJ,sBAAyCG,uBAAAA;AAKrE,IAAME,8BAA8BJ,8BAAiDE,uBAAAA;AAKrF,IAAMG,iCAAiCJ,iCAAoDC,uBAAAA;;;;;;;;;;AF9B3F,IAAMI,2BAAN,cASGC,gBAAAA;SAAAA;;;EACR,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeC;;EAC5E,OAAyBC,sBAA8BD;EACvD,OAAgBE,eAAeC;EAE/B,MAAyBC,cAAcC,YAAmB,CAAA,GAAqB;AAC7E,WAAO,MAAMC,QAAQC,QAAQ,CAAA,CAAE;EACjC;AACF;;;;","names":["HashLeaseEstimateDivinerConfigSchema","AbstractDiviner","creatableModule","HashLeaseSchema","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithMeta","isPayloadOfSchemaTypeWithSources","HashLeaseEstimateSchema","isHashLeaseEstimate","isHashLeaseEstimateWithMeta","isHashLeaseEstimateWithSources","HashLeaseEstimateDiviner","AbstractDiviner","configSchemas","HashLeaseEstimateDivinerConfigSchema","defaultConfigSchema","targetSchema","HashLeaseEstimateSchema","divineHandler","_payloads","Promise","resolve"]}
|
package/package.json
CHANGED
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
},
|
|
8
8
|
"bugs": {
|
|
9
9
|
"email": "support@xyo.network",
|
|
10
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
10
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xyo-network/diviner-abstract": "^3.0.
|
|
14
|
-
"@xyo-network/diviner-model": "^3.0.
|
|
15
|
-
"@xyo-network/module-model": "^3.0.
|
|
16
|
-
"@xyo-network/payload-model": "^3.0.
|
|
13
|
+
"@xyo-network/diviner-abstract": "^3.0.3",
|
|
14
|
+
"@xyo-network/diviner-model": "^3.0.3",
|
|
15
|
+
"@xyo-network/module-model": "^3.0.3",
|
|
16
|
+
"@xyo-network/payload-model": "^3.0.3"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.
|
|
20
|
-
"@xylabs/tsconfig": "^4.0.0-rc.
|
|
19
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.20",
|
|
20
|
+
"@xylabs/tsconfig": "^4.0.0-rc.20",
|
|
21
21
|
"typescript": "^5.5.4"
|
|
22
22
|
},
|
|
23
23
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
},
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
40
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
|
-
"version": "3.0.
|
|
43
|
+
"version": "3.0.3",
|
|
44
44
|
"type": "module"
|
|
45
45
|
}
|
package/src/Config.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DivinerConfig } from '@xyo-network/diviner-model'
|
|
1
|
+
import type { DivinerConfig } from '@xyo-network/diviner-model'
|
|
2
2
|
|
|
3
3
|
export const HashLeaseEstimateDivinerConfigSchema = 'network.xyo.diviner.hash.lease.estimate.config' as const
|
|
4
4
|
export type HashLeaseEstimateDivinerConfigSchema = typeof HashLeaseEstimateDivinerConfigSchema
|
package/src/Params.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DivinerParams } from '@xyo-network/diviner-model'
|
|
2
|
-
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
1
|
+
import type { DivinerParams } from '@xyo-network/diviner-model'
|
|
2
|
+
import type { AnyConfigSchema } from '@xyo-network/module-model'
|
|
3
3
|
|
|
4
|
-
import { HashLeaseEstimateDivinerConfig } from './Config.ts'
|
|
4
|
+
import type { HashLeaseEstimateDivinerConfig } from './Config.ts'
|
|
5
5
|
|
|
6
6
|
export type HashLeaseEstimateDivinerParams<
|
|
7
7
|
TConfig extends AnyConfigSchema<HashLeaseEstimateDivinerConfig> = AnyConfigSchema<HashLeaseEstimateDivinerConfig>,
|
package/src/Payload/HashLease.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Payload } from '@xyo-network/payload-model'
|
|
2
|
+
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'
|
|
2
3
|
|
|
3
4
|
export const HashLeaseEstimateSchema = 'network.xyo.hash.lease.estimate' as const
|
|
4
5
|
export type HashLeaseEstimateSchema = typeof HashLeaseEstimateSchema
|
package/xy.config.ts
CHANGED