@xyo-network/diviner-hash-lease 3.6.8 → 3.6.10

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.
@@ -1,5 +1,18 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getProtoOf = Object.getPrototypeOf;
4
+ var __reflectGet = Reflect.get;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __decorateClass = (decorators, target, key, kind) => {
7
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
8
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
9
+ if (decorator = decorators[i])
10
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11
+ if (kind && result) __defProp(target, key, result);
12
+ return result;
13
+ };
14
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
15
+ var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
3
16
 
4
17
  // src/Config.ts
5
18
  var HashLeaseEstimateDivinerConfigSchema = "network.xyo.diviner.hash.lease.estimate.config";
@@ -10,7 +23,10 @@ import { creatableModule } from "@xyo-network/module-model";
10
23
 
11
24
  // src/Payload/HashLease.ts
12
25
  import { AsObjectFactory } from "@xylabs/object";
13
- import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from "@xyo-network/payload-model";
26
+ import {
27
+ isPayloadOfSchemaType,
28
+ isPayloadOfSchemaTypeWithSources
29
+ } from "@xyo-network/payload-model";
14
30
  var HashLeaseSchema = "network.xyo.hash.lease";
15
31
  var isHashLease = isPayloadOfSchemaType(HashLeaseSchema);
16
32
  var asHashLease = AsObjectFactory.create(isHashLease);
@@ -31,28 +47,15 @@ var asHashLeaseEstimateWithSources = AsObjectFactory2.create(isHashLeaseEstimate
31
47
  var asOptionalHashLeaseEstimateWithSources = AsObjectFactory2.createOptional(isHashLeaseEstimateWithSources);
32
48
 
33
49
  // src/Diviner.ts
34
- function _ts_decorate(decorators, target, key, desc) {
35
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38
- return c > 3 && r && Object.defineProperty(target, key, r), r;
39
- }
40
- __name(_ts_decorate, "_ts_decorate");
41
50
  var HashLeaseEstimateDiviner = class extends AbstractDiviner {
42
- static {
43
- __name(this, "HashLeaseEstimateDiviner");
44
- }
45
- static configSchemas = [
46
- ...super.configSchemas,
47
- HashLeaseEstimateDivinerConfigSchema
48
- ];
49
- static defaultConfigSchema = HashLeaseEstimateDivinerConfigSchema;
50
- static targetSchema = HashLeaseEstimateSchema;
51
51
  async divineHandler(_payloads = []) {
52
52
  return await Promise.resolve([]);
53
53
  }
54
54
  };
55
- HashLeaseEstimateDiviner = _ts_decorate([
55
+ __publicField(HashLeaseEstimateDiviner, "configSchemas", [...__superGet(HashLeaseEstimateDiviner, HashLeaseEstimateDiviner, "configSchemas"), HashLeaseEstimateDivinerConfigSchema]);
56
+ __publicField(HashLeaseEstimateDiviner, "defaultConfigSchema", HashLeaseEstimateDivinerConfigSchema);
57
+ __publicField(HashLeaseEstimateDiviner, "targetSchema", HashLeaseEstimateSchema);
58
+ HashLeaseEstimateDiviner = __decorateClass([
56
59
  creatableModule()
57
60
  ], HashLeaseEstimateDiviner);
58
61
  export {
@@ -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 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,IAAMA,uCAAuC;;;ACFpD,SAASC,uBAAuB;AAEhC,SAASC,uBAAuB;;;ACFhC,SAASC,uBAAuB;AAChC,SACEC,uBAAuBC,wCAClB;AAEA,IAAMC,kBAAkB;AAgBxB,IAAMC,cAAcH,sBAAiCE,eAAAA;AACrD,IAAME,cAAcL,gBAAgBM,OAAkBF,WAAAA;AACtD,IAAMG,sBAAsBP,gBAAgBQ,eAA0BJ,WAAAA;AAKtE,IAAMK,yBAAyBP,iCAAyDC,eAAAA;AACxF,IAAMO,yBAAyBV,gBAAgBM,OAA+BG,sBAAAA;AAC9E,IAAME,iCAAiCX,gBAAgBQ,eAAuCC,sBAAAA;;;AC9BrG,SAASG,mBAAAA,wBAAuB;AAEhC,SAASC,yBAAAA,wBAAuBC,oCAAAA,yCAAwC;AAEjE,IAAMC,0BAA0B;AA2BhC,IAAMC,sBAAsBH,uBAAyCE,uBAAAA;AACrE,IAAME,sBAAsBL,iBAAgBM,OAA0BF,mBAAAA;AACtE,IAAMG,8BAA8BP,iBAAgBQ,eAAkCJ,mBAAAA;AAKtF,IAAMK,iCAAiCP,kCAAiEC,uBAAAA;AACxG,IAAMO,iCAAiCV,iBAAgBM,OAAuCG,8BAAAA;AAC9F,IAAME,yCAAyCX,iBAAgBQ,eAA+CC,8BAAAA;;;;;;;;;;AF9B9G,IAAMG,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","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources","HashLeaseSchema","isHashLease","asHashLease","create","asOptionalHashLease","createOptional","isHashLeaseWithSources","asHashLeaseWithSources","asOptionalHashLeaseWithSources","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaTypeWithSources","HashLeaseEstimateSchema","isHashLeaseEstimate","asHashLeaseEstimate","create","asOptionalHashLeaseEstimate","createOptional","isHashLeaseEstimateWithSources","asHashLeaseEstimateWithSources","asOptionalHashLeaseEstimateWithSources","HashLeaseEstimateDiviner","AbstractDiviner","configSchemas","HashLeaseEstimateDivinerConfigSchema","defaultConfigSchema","targetSchema","HashLeaseEstimateSchema","divineHandler","_payloads","Promise","resolve"]}
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 { 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,0BAYK,gBAAe;AAZpB,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.6.8",
3
+ "version": "3.6.10",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,16 +29,16 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/object": "^4.4.34",
33
- "@xyo-network/diviner-abstract": "^3.6.8",
34
- "@xyo-network/diviner-model": "^3.6.8",
35
- "@xyo-network/module-model": "^3.6.8",
36
- "@xyo-network/payload-model": "^3.6.8"
32
+ "@xylabs/object": "^4.5.1",
33
+ "@xyo-network/diviner-abstract": "^3.6.10",
34
+ "@xyo-network/diviner-model": "^3.6.10",
35
+ "@xyo-network/module-model": "^3.6.10",
36
+ "@xyo-network/payload-model": "^3.6.10"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@xylabs/ts-scripts-yarn3": "^4.2.6",
40
40
  "@xylabs/tsconfig": "^4.2.6",
41
- "typescript": "^5.7.2"
41
+ "typescript": "^5.7.3"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"