@xyo-network/diviner-payload-model 3.6.0-rc.8 → 3.6.0
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/Predicate.d.ts +3 -10
- package/dist/neutral/Predicate.d.ts.map +1 -1
- package/dist/neutral/Query.d.ts +13 -4
- package/dist/neutral/Query.d.ts.map +1 -1
- package/dist/neutral/index.mjs +3 -0
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +8 -10
- package/src/Predicate.ts +3 -14
- package/src/Query.ts +6 -4
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import type { Address, Hash, Hex } from '@xylabs/hex';
|
|
2
1
|
import type { EmptyObject } from '@xylabs/object';
|
|
3
|
-
import type { Schema } from '@xyo-network/payload-model';
|
|
2
|
+
import type { Schema, Sequence } from '@xyo-network/payload-model';
|
|
4
3
|
import type { Order } from './Order.ts';
|
|
5
|
-
export type PayloadDivinerPredicate<T extends EmptyObject = EmptyObject
|
|
6
|
-
|
|
7
|
-
* @deprecated Use BW Diviner to find signed Payloads matching desired
|
|
8
|
-
* criteria, then get Payloads by hash directly from Archivist
|
|
9
|
-
*/
|
|
10
|
-
address: Address | Address[];
|
|
11
|
-
cursor: TCursor;
|
|
12
|
-
hash: Hash;
|
|
4
|
+
export type PayloadDivinerPredicate<T extends EmptyObject = EmptyObject> = Partial<{
|
|
5
|
+
cursor: Sequence;
|
|
13
6
|
limit: number;
|
|
14
7
|
order: Order;
|
|
15
8
|
schemas: Schema[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Predicate.d.ts","sourceRoot":"","sources":["../../src/Predicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Predicate.d.ts","sourceRoot":"","sources":["../../src/Predicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAElE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI,OAAO,CAChF;IACE,MAAM,EAAE,QAAQ,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,GAAG,CAAC,CACN,CAAA"}
|
package/dist/neutral/Query.d.ts
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { EmptyObject } from '@xylabs/object';
|
|
1
|
+
import { type EmptyObject } from '@xylabs/object';
|
|
3
2
|
import { type Query } from '@xyo-network/payload-model';
|
|
4
3
|
import type { PayloadDivinerPredicate } from './Predicate.ts';
|
|
5
4
|
import { PayloadDivinerSchema } from './Schema.ts';
|
|
6
5
|
export type PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`;
|
|
7
6
|
export declare const PayloadDivinerQuerySchema: PayloadDivinerQuerySchema;
|
|
8
|
-
export type PayloadDivinerQueryPayload<T extends EmptyObject = EmptyObject
|
|
7
|
+
export type PayloadDivinerQueryPayload<T extends EmptyObject = EmptyObject> = Query<{
|
|
9
8
|
schema: PayloadDivinerQuerySchema;
|
|
10
|
-
} & PayloadDivinerPredicate<T
|
|
9
|
+
} & PayloadDivinerPredicate<T>>;
|
|
11
10
|
export declare const isPayloadDivinerQueryPayload: (x?: unknown | null) => x is import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
12
11
|
schema: import("@xyo-network/payload-model").Schema;
|
|
13
12
|
}>;
|
|
13
|
+
export declare const asPayloadDivinerQueryPayload: {
|
|
14
|
+
<TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
15
|
+
schema: import("@xyo-network/payload-model").Schema;
|
|
16
|
+
}>>(value: import("@xylabs/promise").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
17
|
+
<TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
18
|
+
schema: import("@xyo-network/payload-model").Schema;
|
|
19
|
+
}>>(value: import("@xylabs/promise").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
20
|
+
schema: import("@xyo-network/payload-model").Schema;
|
|
21
|
+
}>>, config?: import("@xylabs/object").TypeCheckConfig): TType;
|
|
22
|
+
};
|
|
14
23
|
//# sourceMappingURL=Query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAE9E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,yBAAyB,GAAG,GAAG,oBAAoB,QAAQ,CAAA;AACvE,eAAO,MAAM,yBAAyB,EAAE,yBAA2D,CAAA;AAEnG,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI,KAAK,CACjF;IAAE,MAAM,EAAE,yBAAyB,CAAA;CAAE,GAAG,uBAAuB,CAAC,CAAC,CAAC,CACnE,CAAA;AAED,eAAO,MAAM,4BAA4B;;EAAmD,CAAA;AAE5F,eAAO,MAAM,4BAA4B;;;sBAXA,iBAEnC,iCAAkC,gBAAmB;;;sBACO,iBAAiB;;yBAEL,gBACjE;CAKmF,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -5,13 +5,16 @@ var PayloadDivinerSchema = "network.xyo.diviner.payload";
|
|
|
5
5
|
var PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`;
|
|
6
6
|
|
|
7
7
|
// src/Query.ts
|
|
8
|
+
import { AsObjectFactory } from "@xylabs/object";
|
|
8
9
|
import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
|
|
9
10
|
var PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`;
|
|
10
11
|
var isPayloadDivinerQueryPayload = isPayloadOfSchemaType(PayloadDivinerQuerySchema);
|
|
12
|
+
var asPayloadDivinerQueryPayload = AsObjectFactory.create(isPayloadDivinerQueryPayload);
|
|
11
13
|
export {
|
|
12
14
|
PayloadDivinerConfigSchema,
|
|
13
15
|
PayloadDivinerQuerySchema,
|
|
14
16
|
PayloadDivinerSchema,
|
|
17
|
+
asPayloadDivinerQueryPayload,
|
|
15
18
|
isPayloadDivinerQueryPayload
|
|
16
19
|
};
|
|
17
20
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Schema.ts","../../src/Config.ts","../../src/Query.ts"],"sourcesContent":["export type PayloadDivinerSchema = 'network.xyo.diviner.payload'\nexport const PayloadDivinerSchema: PayloadDivinerSchema = 'network.xyo.diviner.payload'\n","import type { EmptyObject, WithAdditional } from '@xylabs/object'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\n\nimport { PayloadDivinerSchema } from './Schema.ts'\n\nexport type PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`\nexport const PayloadDivinerConfigSchema: PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`\n\nexport type PayloadDivinerConfig<TAdditional extends EmptyObject | void = void, TSchema extends Schema | void = void> = DivinerConfig<\n WithAdditional<\n {\n indexBatchSize?: number\n maxIndexSize?: number\n },\n TAdditional\n >,\n TSchema extends void ? PayloadDivinerConfigSchema : TSchema\n>\n","import
|
|
1
|
+
{"version":3,"sources":["../../src/Schema.ts","../../src/Config.ts","../../src/Query.ts"],"sourcesContent":["export type PayloadDivinerSchema = 'network.xyo.diviner.payload'\nexport const PayloadDivinerSchema: PayloadDivinerSchema = 'network.xyo.diviner.payload'\n","import type { EmptyObject, WithAdditional } from '@xylabs/object'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\n\nimport { PayloadDivinerSchema } from './Schema.ts'\n\nexport type PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`\nexport const PayloadDivinerConfigSchema: PayloadDivinerConfigSchema = `${PayloadDivinerSchema}.config`\n\nexport type PayloadDivinerConfig<TAdditional extends EmptyObject | void = void, TSchema extends Schema | void = void> = DivinerConfig<\n WithAdditional<\n {\n indexBatchSize?: number\n maxIndexSize?: number\n },\n TAdditional\n >,\n TSchema extends void ? PayloadDivinerConfigSchema : TSchema\n>\n","import { AsObjectFactory, type EmptyObject } from '@xylabs/object'\nimport { isPayloadOfSchemaType, type Query } from '@xyo-network/payload-model'\n\nimport type { PayloadDivinerPredicate } from './Predicate.ts'\nimport { PayloadDivinerSchema } from './Schema.ts'\n\nexport type PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`\nexport const PayloadDivinerQuerySchema: PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`\n\nexport type PayloadDivinerQueryPayload<T extends EmptyObject = EmptyObject> = Query<\n { schema: PayloadDivinerQuerySchema } & PayloadDivinerPredicate<T>\n>\n\nexport const isPayloadDivinerQueryPayload = isPayloadOfSchemaType(PayloadDivinerQuerySchema)\n\nexport const asPayloadDivinerQueryPayload = AsObjectFactory.create(isPayloadDivinerQueryPayload)\n"],"mappings":";AACO,IAAMA,uBAA6C;;;ACMnD,IAAMC,6BAAyD,GAAGC,oBAAAA;;;ACPzE,SAASC,uBAAyC;AAClD,SAASC,6BAAyC;AAM3C,IAAMC,4BAAuD,GAAGC,oBAAAA;AAMhE,IAAMC,+BAA+BC,sBAAsBH,yBAAAA;AAE3D,IAAMI,+BAA+BC,gBAAgBC,OAAOJ,4BAAAA;","names":["PayloadDivinerSchema","PayloadDivinerConfigSchema","PayloadDivinerSchema","AsObjectFactory","isPayloadOfSchemaType","PayloadDivinerQuerySchema","PayloadDivinerSchema","isPayloadDivinerQueryPayload","isPayloadOfSchemaType","asPayloadDivinerQueryPayload","AsObjectFactory","create"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-payload-model",
|
|
3
|
-
"version": "3.6.0
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,19 +29,17 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/
|
|
33
|
-
"@
|
|
34
|
-
"@xyo-network/
|
|
35
|
-
"@xyo-network/
|
|
36
|
-
"@xyo-network/payload-model": "^3.6.0-rc.8"
|
|
32
|
+
"@xylabs/object": "^4.4.26",
|
|
33
|
+
"@xyo-network/diviner-model": "^3.6.0",
|
|
34
|
+
"@xyo-network/module-model": "^3.6.0",
|
|
35
|
+
"@xyo-network/payload-model": "^3.6.0"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@xylabs/ts-scripts-yarn3": "^4.2.
|
|
40
|
-
"@xylabs/tsconfig": "^4.2.
|
|
38
|
+
"@xylabs/ts-scripts-yarn3": "^4.2.6",
|
|
39
|
+
"@xylabs/tsconfig": "^4.2.6",
|
|
41
40
|
"typescript": "^5.7.2"
|
|
42
41
|
},
|
|
43
42
|
"publishConfig": {
|
|
44
43
|
"access": "public"
|
|
45
|
-
}
|
|
46
|
-
"stableVersion": "3.5.2"
|
|
44
|
+
}
|
|
47
45
|
}
|
package/src/Predicate.ts
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
Address, Hash, Hex,
|
|
3
|
-
} from '@xylabs/hex'
|
|
4
1
|
import type { EmptyObject } from '@xylabs/object'
|
|
5
|
-
import type { Schema } from '@xyo-network/payload-model'
|
|
2
|
+
import type { Schema, Sequence } from '@xyo-network/payload-model'
|
|
6
3
|
|
|
7
4
|
import type { Order } from './Order.ts'
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export type PayloadDivinerPredicate<T extends EmptyObject = EmptyObject, TCursor = Hex> = Partial<
|
|
6
|
+
export type PayloadDivinerPredicate<T extends EmptyObject = EmptyObject> = Partial<
|
|
12
7
|
{
|
|
13
|
-
|
|
14
|
-
* @deprecated Use BW Diviner to find signed Payloads matching desired
|
|
15
|
-
* criteria, then get Payloads by hash directly from Archivist
|
|
16
|
-
*/
|
|
17
|
-
address: Address | Address[]
|
|
18
|
-
cursor: TCursor
|
|
19
|
-
hash: Hash
|
|
8
|
+
cursor: Sequence
|
|
20
9
|
limit: number
|
|
21
10
|
order: Order
|
|
22
11
|
schemas: Schema[]
|
package/src/Query.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { EmptyObject } from '@xylabs/object'
|
|
1
|
+
import { AsObjectFactory, type EmptyObject } from '@xylabs/object'
|
|
3
2
|
import { isPayloadOfSchemaType, type Query } from '@xyo-network/payload-model'
|
|
4
3
|
|
|
5
4
|
import type { PayloadDivinerPredicate } from './Predicate.ts'
|
|
@@ -8,7 +7,10 @@ import { PayloadDivinerSchema } from './Schema.ts'
|
|
|
8
7
|
export type PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`
|
|
9
8
|
export const PayloadDivinerQuerySchema: PayloadDivinerQuerySchema = `${PayloadDivinerSchema}.query`
|
|
10
9
|
|
|
11
|
-
export type PayloadDivinerQueryPayload<T extends EmptyObject = EmptyObject
|
|
12
|
-
{ schema: PayloadDivinerQuerySchema } & PayloadDivinerPredicate<T
|
|
10
|
+
export type PayloadDivinerQueryPayload<T extends EmptyObject = EmptyObject> = Query<
|
|
11
|
+
{ schema: PayloadDivinerQuerySchema } & PayloadDivinerPredicate<T>
|
|
13
12
|
>
|
|
13
|
+
|
|
14
14
|
export const isPayloadDivinerQueryPayload = isPayloadOfSchemaType(PayloadDivinerQuerySchema)
|
|
15
|
+
|
|
16
|
+
export const asPayloadDivinerQueryPayload = AsObjectFactory.create(isPayloadDivinerQueryPayload)
|