@xyo-network/diviner-range-model 2.107.3 → 2.107.4
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/browser/index.cjs +54 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +33 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/neutral/index.cjs +54 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.js +33 -1
- package/dist/neutral/index.js.map +1 -1
- package/dist/node/index.cjs +65 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +33 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +5 -5
package/dist/browser/index.cjs
CHANGED
|
@@ -1,2 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
BigIntSchema: () => BigIntSchema,
|
|
25
|
+
NumberSchema: () => NumberSchema,
|
|
26
|
+
RangeDivinerConfigSchema: () => RangeDivinerConfigSchema,
|
|
27
|
+
RangeSchema: () => RangeSchema,
|
|
28
|
+
isBigIntRangePayload: () => isBigIntRangePayload,
|
|
29
|
+
isNumberRangePayload: () => isNumberRangePayload,
|
|
30
|
+
isRangeDivinerConfig: () => isRangeDivinerConfig,
|
|
31
|
+
isRangePayload: () => isRangePayload
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
|
34
|
+
|
|
35
|
+
// src/Config/Config.ts
|
|
36
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
37
|
+
var RangeDivinerConfigSchema = "network.xyo.diviner.range.config";
|
|
38
|
+
var isRangeDivinerConfig = (0, import_payload_model.isPayloadOfSchemaType)(RangeDivinerConfigSchema);
|
|
39
|
+
|
|
40
|
+
// src/Payload/BigInt.ts
|
|
41
|
+
var BigIntSchema = "network.xyo.bigint";
|
|
42
|
+
|
|
43
|
+
// src/Payload/Number.ts
|
|
44
|
+
var NumberSchema = "network.xyo.number";
|
|
45
|
+
|
|
46
|
+
// src/Payload/Range.ts
|
|
47
|
+
var import_hex = require("@xylabs/hex");
|
|
48
|
+
var import_payload_model2 = require("@xyo-network/payload-model");
|
|
49
|
+
var RangeSchema = "network.xyo.range";
|
|
50
|
+
var isRangePayload = (0, import_payload_model2.isPayloadOfSchemaType)(RangeSchema);
|
|
51
|
+
var isBigIntRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && (0, import_hex.isHex)(payload.start, {
|
|
52
|
+
prefix: true
|
|
53
|
+
}), "isBigIntRangePayload");
|
|
54
|
+
var isNumberRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && typeof payload.start === "number", "isNumberRangePayload");
|
|
2
55
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["export * from './Config'\nexport * from './Payload'\n","import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["export * from './Config'\nexport * from './Payload'\n","import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;ACCA,2BAAsC;AAE/B,IAAMA,2BAA2B;AAYjC,IAAMC,2BAAuBC,4CAA0CF,wBAAAA;;;ACZvE,IAAMG,eAAe;;;ACDrB,IAAMC,eAAe;;;ACF5B,iBAA2B;AAC3B,IAAAC,wBAA+C;AAIxC,IAAMC,cAAc;AAgBpB,IAAMC,qBAAiBC,6CAAoCF,WAAAA;AAE3D,IAAMG,uBAAuB,wBAACC,YACnCH,eAAeG,OAAAA,SAAYC,kBAAMD,QAAQE,OAAO;EAAEC,QAAQ;AAAK,CAAA,GAD7B;AAG7B,IAAMC,uBAAuB,wBAACJ,YAAqDH,eAAeG,OAAAA,KAAY,OAAOA,QAAQE,UAAU,UAA1G;","names":["RangeDivinerConfigSchema","isRangeDivinerConfig","isPayloadOfSchemaType","BigIntSchema","NumberSchema","import_payload_model","RangeSchema","isRangePayload","isPayloadOfSchemaType","isBigIntRangePayload","payload","isHex","start","prefix","isNumberRangePayload"]}
|
package/dist/browser/index.js
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/Config/Config.ts
|
|
5
|
+
import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
6
|
+
var RangeDivinerConfigSchema = "network.xyo.diviner.range.config";
|
|
7
|
+
var isRangeDivinerConfig = isPayloadOfSchemaType(RangeDivinerConfigSchema);
|
|
8
|
+
|
|
9
|
+
// src/Payload/BigInt.ts
|
|
10
|
+
var BigIntSchema = "network.xyo.bigint";
|
|
11
|
+
|
|
12
|
+
// src/Payload/Number.ts
|
|
13
|
+
var NumberSchema = "network.xyo.number";
|
|
14
|
+
|
|
15
|
+
// src/Payload/Range.ts
|
|
16
|
+
import { isHex } from "@xylabs/hex";
|
|
17
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType2 } from "@xyo-network/payload-model";
|
|
18
|
+
var RangeSchema = "network.xyo.range";
|
|
19
|
+
var isRangePayload = isPayloadOfSchemaType2(RangeSchema);
|
|
20
|
+
var isBigIntRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && isHex(payload.start, {
|
|
21
|
+
prefix: true
|
|
22
|
+
}), "isBigIntRangePayload");
|
|
23
|
+
var isNumberRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && typeof payload.start === "number", "isNumberRangePayload");
|
|
24
|
+
export {
|
|
25
|
+
BigIntSchema,
|
|
26
|
+
NumberSchema,
|
|
27
|
+
RangeDivinerConfigSchema,
|
|
28
|
+
RangeSchema,
|
|
29
|
+
isBigIntRangePayload,
|
|
30
|
+
isNumberRangePayload,
|
|
31
|
+
isRangeDivinerConfig,
|
|
32
|
+
isRangePayload
|
|
33
|
+
};
|
|
2
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":";;;;AACA,SAASA,6BAA6B;AAE/B,IAAMC,2BAA2B;AAYjC,IAAMC,uBAAuBF,sBAA0CC,wBAAAA;;;ACZvE,IAAME,eAAe;;;ACDrB,IAAMC,eAAe;;;ACF5B,SAAcC,aAAa;AAC3B,SAASC,yBAAAA,8BAAsC;AAIxC,IAAMC,cAAc;AAgBpB,IAAMC,iBAAiBC,uBAAoCF,WAAAA;AAE3D,IAAMG,uBAAuB,wBAACC,YACnCH,eAAeG,OAAAA,KAAYC,MAAMD,QAAQE,OAAO;EAAEC,QAAQ;AAAK,CAAA,GAD7B;AAG7B,IAAMC,uBAAuB,wBAACJ,YAAqDH,eAAeG,OAAAA,KAAY,OAAOA,QAAQE,UAAU,UAA1G;","names":["isPayloadOfSchemaType","RangeDivinerConfigSchema","isRangeDivinerConfig","BigIntSchema","NumberSchema","isHex","isPayloadOfSchemaType","RangeSchema","isRangePayload","isPayloadOfSchemaType","isBigIntRangePayload","payload","isHex","start","prefix","isNumberRangePayload"]}
|
package/dist/neutral/index.cjs
CHANGED
|
@@ -1,2 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
BigIntSchema: () => BigIntSchema,
|
|
25
|
+
NumberSchema: () => NumberSchema,
|
|
26
|
+
RangeDivinerConfigSchema: () => RangeDivinerConfigSchema,
|
|
27
|
+
RangeSchema: () => RangeSchema,
|
|
28
|
+
isBigIntRangePayload: () => isBigIntRangePayload,
|
|
29
|
+
isNumberRangePayload: () => isNumberRangePayload,
|
|
30
|
+
isRangeDivinerConfig: () => isRangeDivinerConfig,
|
|
31
|
+
isRangePayload: () => isRangePayload
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
|
34
|
+
|
|
35
|
+
// src/Config/Config.ts
|
|
36
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
37
|
+
var RangeDivinerConfigSchema = "network.xyo.diviner.range.config";
|
|
38
|
+
var isRangeDivinerConfig = (0, import_payload_model.isPayloadOfSchemaType)(RangeDivinerConfigSchema);
|
|
39
|
+
|
|
40
|
+
// src/Payload/BigInt.ts
|
|
41
|
+
var BigIntSchema = "network.xyo.bigint";
|
|
42
|
+
|
|
43
|
+
// src/Payload/Number.ts
|
|
44
|
+
var NumberSchema = "network.xyo.number";
|
|
45
|
+
|
|
46
|
+
// src/Payload/Range.ts
|
|
47
|
+
var import_hex = require("@xylabs/hex");
|
|
48
|
+
var import_payload_model2 = require("@xyo-network/payload-model");
|
|
49
|
+
var RangeSchema = "network.xyo.range";
|
|
50
|
+
var isRangePayload = (0, import_payload_model2.isPayloadOfSchemaType)(RangeSchema);
|
|
51
|
+
var isBigIntRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && (0, import_hex.isHex)(payload.start, {
|
|
52
|
+
prefix: true
|
|
53
|
+
}), "isBigIntRangePayload");
|
|
54
|
+
var isNumberRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && typeof payload.start === "number", "isNumberRangePayload");
|
|
2
55
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["export * from './Config'\nexport * from './Payload'\n","import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["export * from './Config'\nexport * from './Payload'\n","import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;ACCA,2BAAsC;AAE/B,IAAMA,2BAA2B;AAYjC,IAAMC,2BAAuBC,4CAA0CF,wBAAAA;;;ACZvE,IAAMG,eAAe;;;ACDrB,IAAMC,eAAe;;;ACF5B,iBAA2B;AAC3B,IAAAC,wBAA+C;AAIxC,IAAMC,cAAc;AAgBpB,IAAMC,qBAAiBC,6CAAoCF,WAAAA;AAE3D,IAAMG,uBAAuB,wBAACC,YACnCH,eAAeG,OAAAA,SAAYC,kBAAMD,QAAQE,OAAO;EAAEC,QAAQ;AAAK,CAAA,GAD7B;AAG7B,IAAMC,uBAAuB,wBAACJ,YAAqDH,eAAeG,OAAAA,KAAY,OAAOA,QAAQE,UAAU,UAA1G;","names":["RangeDivinerConfigSchema","isRangeDivinerConfig","isPayloadOfSchemaType","BigIntSchema","NumberSchema","import_payload_model","RangeSchema","isRangePayload","isPayloadOfSchemaType","isBigIntRangePayload","payload","isHex","start","prefix","isNumberRangePayload"]}
|
package/dist/neutral/index.js
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/Config/Config.ts
|
|
5
|
+
import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
6
|
+
var RangeDivinerConfigSchema = "network.xyo.diviner.range.config";
|
|
7
|
+
var isRangeDivinerConfig = isPayloadOfSchemaType(RangeDivinerConfigSchema);
|
|
8
|
+
|
|
9
|
+
// src/Payload/BigInt.ts
|
|
10
|
+
var BigIntSchema = "network.xyo.bigint";
|
|
11
|
+
|
|
12
|
+
// src/Payload/Number.ts
|
|
13
|
+
var NumberSchema = "network.xyo.number";
|
|
14
|
+
|
|
15
|
+
// src/Payload/Range.ts
|
|
16
|
+
import { isHex } from "@xylabs/hex";
|
|
17
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType2 } from "@xyo-network/payload-model";
|
|
18
|
+
var RangeSchema = "network.xyo.range";
|
|
19
|
+
var isRangePayload = isPayloadOfSchemaType2(RangeSchema);
|
|
20
|
+
var isBigIntRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && isHex(payload.start, {
|
|
21
|
+
prefix: true
|
|
22
|
+
}), "isBigIntRangePayload");
|
|
23
|
+
var isNumberRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && typeof payload.start === "number", "isNumberRangePayload");
|
|
24
|
+
export {
|
|
25
|
+
BigIntSchema,
|
|
26
|
+
NumberSchema,
|
|
27
|
+
RangeDivinerConfigSchema,
|
|
28
|
+
RangeSchema,
|
|
29
|
+
isBigIntRangePayload,
|
|
30
|
+
isNumberRangePayload,
|
|
31
|
+
isRangeDivinerConfig,
|
|
32
|
+
isRangePayload
|
|
33
|
+
};
|
|
2
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":";;;;AACA,SAASA,6BAA6B;AAE/B,IAAMC,2BAA2B;AAYjC,IAAMC,uBAAuBF,sBAA0CC,wBAAAA;;;ACZvE,IAAME,eAAe;;;ACDrB,IAAMC,eAAe;;;ACF5B,SAAcC,aAAa;AAC3B,SAASC,yBAAAA,8BAAsC;AAIxC,IAAMC,cAAc;AAgBpB,IAAMC,iBAAiBC,uBAAoCF,WAAAA;AAE3D,IAAMG,uBAAuB,wBAACC,YACnCH,eAAeG,OAAAA,KAAYC,MAAMD,QAAQE,OAAO;EAAEC,QAAQ;AAAK,CAAA,GAD7B;AAG7B,IAAMC,uBAAuB,wBAACJ,YAAqDH,eAAeG,OAAAA,KAAY,OAAOA,QAAQE,UAAU,UAA1G;","names":["isPayloadOfSchemaType","RangeDivinerConfigSchema","isRangeDivinerConfig","BigIntSchema","NumberSchema","isHex","isPayloadOfSchemaType","RangeSchema","isRangePayload","isPayloadOfSchemaType","isBigIntRangePayload","payload","isHex","start","prefix","isNumberRangePayload"]}
|
package/dist/node/index.cjs
CHANGED
|
@@ -1,2 +1,66 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
BigIntSchema: () => BigIntSchema,
|
|
25
|
+
NumberSchema: () => NumberSchema,
|
|
26
|
+
RangeDivinerConfigSchema: () => RangeDivinerConfigSchema,
|
|
27
|
+
RangeSchema: () => RangeSchema,
|
|
28
|
+
isBigIntRangePayload: () => isBigIntRangePayload,
|
|
29
|
+
isNumberRangePayload: () => isNumberRangePayload,
|
|
30
|
+
isRangeDivinerConfig: () => isRangeDivinerConfig,
|
|
31
|
+
isRangePayload: () => isRangePayload
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
|
34
|
+
|
|
35
|
+
// src/Config/Config.ts
|
|
36
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
37
|
+
var RangeDivinerConfigSchema = "network.xyo.diviner.range.config";
|
|
38
|
+
var isRangeDivinerConfig = (0, import_payload_model.isPayloadOfSchemaType)(RangeDivinerConfigSchema);
|
|
39
|
+
|
|
40
|
+
// src/Payload/BigInt.ts
|
|
41
|
+
var BigIntSchema = "network.xyo.bigint";
|
|
42
|
+
|
|
43
|
+
// src/Payload/Number.ts
|
|
44
|
+
var NumberSchema = "network.xyo.number";
|
|
45
|
+
|
|
46
|
+
// src/Payload/Range.ts
|
|
47
|
+
var import_hex = require("@xylabs/hex");
|
|
48
|
+
var import_payload_model2 = require("@xyo-network/payload-model");
|
|
49
|
+
var RangeSchema = "network.xyo.range";
|
|
50
|
+
var isRangePayload = (0, import_payload_model2.isPayloadOfSchemaType)(RangeSchema);
|
|
51
|
+
var isBigIntRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && (0, import_hex.isHex)(payload.start, {
|
|
52
|
+
prefix: true
|
|
53
|
+
}), "isBigIntRangePayload");
|
|
54
|
+
var isNumberRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && typeof payload.start === "number", "isNumberRangePayload");
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
BigIntSchema,
|
|
58
|
+
NumberSchema,
|
|
59
|
+
RangeDivinerConfigSchema,
|
|
60
|
+
RangeSchema,
|
|
61
|
+
isBigIntRangePayload,
|
|
62
|
+
isNumberRangePayload,
|
|
63
|
+
isRangeDivinerConfig,
|
|
64
|
+
isRangePayload
|
|
65
|
+
});
|
|
2
66
|
//# sourceMappingURL=index.cjs.map
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["export * from './Config'\nexport * from './Payload'\n","import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["export * from './Config'\nexport * from './Payload'\n","import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;ACCA,2BAAsC;AAE/B,IAAMA,2BAA2B;AAYjC,IAAMC,2BAAuBC,4CAA0CF,wBAAAA;;;ACZvE,IAAMG,eAAe;;;ACDrB,IAAMC,eAAe;;;ACF5B,iBAA2B;AAC3B,IAAAC,wBAA+C;AAIxC,IAAMC,cAAc;AAgBpB,IAAMC,qBAAiBC,6CAAoCF,WAAAA;AAE3D,IAAMG,uBAAuB,wBAACC,YACnCH,eAAeG,OAAAA,SAAYC,kBAAMD,QAAQE,OAAO;EAAEC,QAAQ;AAAK,CAAA,GAD7B;AAG7B,IAAMC,uBAAuB,wBAACJ,YAAqDH,eAAeG,OAAAA,KAAY,OAAOA,QAAQE,UAAU,UAA1G;","names":["RangeDivinerConfigSchema","isRangeDivinerConfig","isPayloadOfSchemaType","BigIntSchema","NumberSchema","import_payload_model","RangeSchema","isRangePayload","isPayloadOfSchemaType","isBigIntRangePayload","payload","isHex","start","prefix","isNumberRangePayload"]}
|
package/dist/node/index.js
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/Config/Config.ts
|
|
5
|
+
import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
6
|
+
var RangeDivinerConfigSchema = "network.xyo.diviner.range.config";
|
|
7
|
+
var isRangeDivinerConfig = isPayloadOfSchemaType(RangeDivinerConfigSchema);
|
|
8
|
+
|
|
9
|
+
// src/Payload/BigInt.ts
|
|
10
|
+
var BigIntSchema = "network.xyo.bigint";
|
|
11
|
+
|
|
12
|
+
// src/Payload/Number.ts
|
|
13
|
+
var NumberSchema = "network.xyo.number";
|
|
14
|
+
|
|
15
|
+
// src/Payload/Range.ts
|
|
16
|
+
import { isHex } from "@xylabs/hex";
|
|
17
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType2 } from "@xyo-network/payload-model";
|
|
18
|
+
var RangeSchema = "network.xyo.range";
|
|
19
|
+
var isRangePayload = isPayloadOfSchemaType2(RangeSchema);
|
|
20
|
+
var isBigIntRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && isHex(payload.start, {
|
|
21
|
+
prefix: true
|
|
22
|
+
}), "isBigIntRangePayload");
|
|
23
|
+
var isNumberRangePayload = /* @__PURE__ */ __name((payload) => isRangePayload(payload) && typeof payload.start === "number", "isNumberRangePayload");
|
|
24
|
+
export {
|
|
25
|
+
BigIntSchema,
|
|
26
|
+
NumberSchema,
|
|
27
|
+
RangeDivinerConfigSchema,
|
|
28
|
+
RangeSchema,
|
|
29
|
+
isBigIntRangePayload,
|
|
30
|
+
isNumberRangePayload,
|
|
31
|
+
isRangeDivinerConfig,
|
|
32
|
+
isRangePayload
|
|
33
|
+
};
|
|
2
34
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Config/Config.ts","../../src/Payload/BigInt.ts","../../src/Payload/Number.ts","../../src/Payload/Range.ts"],"sourcesContent":["import { DivinerConfig } from '@xyo-network/diviner-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const RangeDivinerConfigSchema = 'network.xyo.diviner.range.config' as const\nexport type RangeDivinerConfigSchema = typeof RangeDivinerConfigSchema\n\nimport { RangePayload } from '../Payload'\n\nexport type RangeDivinerConfig = DivinerConfig<\n {\n ranges?: RangePayload[]\n },\n RangeDivinerConfigSchema\n>\n\nexport const isRangeDivinerConfig = isPayloadOfSchemaType<RangeDivinerConfig>(RangeDivinerConfigSchema)\n","import { Hex } from '@xylabs/hex'\nimport { Payload } from '@xyo-network/payload-model'\n\nexport const BigIntSchema = 'network.xyo.bigint' as const\nexport type BigIntSchema = typeof BigIntSchema\n\nexport type BigIntPayload = Payload<{ value: Hex }, BigIntSchema>\n","import { Payload } from '@xyo-network/payload-model'\n\nexport const NumberSchema = 'network.xyo.number' as const\nexport type NumberSchema = typeof NumberSchema\n\nexport type NumberPayload = Payload<{ value: number }, NumberSchema>\n","import { Hex, isHex } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'\n\n/* Note: We decorate these names with Payload since Range is a system type */\n\nexport const RangeSchema = 'network.xyo.range' as const\nexport type RangeSchema = typeof RangeSchema\n\nexport type RangePayloadBase<T> = Payload<\n {\n count: number\n start: T\n },\n RangeSchema\n>\n\nexport type NumberRangePayload = RangePayloadBase<number>\nexport type BigIntRangePayload = RangePayloadBase<Hex>\n\nexport type RangePayload = NumberRangePayload | BigIntRangePayload\n\nexport const isRangePayload = isPayloadOfSchemaType<RangePayload>(RangeSchema)\n\nexport const isBigIntRangePayload = (payload?: unknown): payload is BigIntRangePayload =>\n isRangePayload(payload) && isHex(payload.start, { prefix: true })\n\nexport const isNumberRangePayload = (payload?: unknown): payload is NumberRangePayload => isRangePayload(payload) && typeof payload.start === 'number'\n"],"mappings":";;;;AACA,SAASA,6BAA6B;AAE/B,IAAMC,2BAA2B;AAYjC,IAAMC,uBAAuBF,sBAA0CC,wBAAAA;;;ACZvE,IAAME,eAAe;;;ACDrB,IAAMC,eAAe;;;ACF5B,SAAcC,aAAa;AAC3B,SAASC,yBAAAA,8BAAsC;AAIxC,IAAMC,cAAc;AAgBpB,IAAMC,iBAAiBC,uBAAoCF,WAAAA;AAE3D,IAAMG,uBAAuB,wBAACC,YACnCH,eAAeG,OAAAA,KAAYC,MAAMD,QAAQE,OAAO;EAAEC,QAAQ;AAAK,CAAA,GAD7B;AAG7B,IAAMC,uBAAuB,wBAACJ,YAAqDH,eAAeG,OAAAA,KAAY,OAAOA,QAAQE,UAAU,UAA1G;","names":["isPayloadOfSchemaType","RangeDivinerConfigSchema","isRangeDivinerConfig","BigIntSchema","NumberSchema","isHex","isPayloadOfSchemaType","RangeSchema","isRangePayload","isPayloadOfSchemaType","isBigIntRangePayload","payload","isHex","start","prefix","isNumberRangePayload"]}
|
package/package.json
CHANGED
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@xylabs/hex": "^3.5.1",
|
|
14
|
-
"@xyo-network/diviner-model": "~2.107.
|
|
15
|
-
"@xyo-network/payload-model": "~2.107.
|
|
14
|
+
"@xyo-network/diviner-model": "~2.107.4",
|
|
15
|
+
"@xyo-network/payload-model": "~2.107.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@xylabs/ts-scripts-yarn3": "^3.11.
|
|
19
|
-
"@xylabs/tsconfig": "^3.11.
|
|
18
|
+
"@xylabs/ts-scripts-yarn3": "^3.11.10",
|
|
19
|
+
"@xylabs/tsconfig": "^3.11.10",
|
|
20
20
|
"typescript": "^5.5.2"
|
|
21
21
|
},
|
|
22
22
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
@@ -58,6 +58,6 @@
|
|
|
58
58
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
59
59
|
},
|
|
60
60
|
"sideEffects": false,
|
|
61
|
-
"version": "2.107.
|
|
61
|
+
"version": "2.107.4",
|
|
62
62
|
"type": "module"
|
|
63
63
|
}
|