@xyo-network/boundwitness-model 4.0.2 → 4.1.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.
Files changed (46) hide show
  1. package/{dist/types → build/browser}/isBoundWitness.d.ts +3 -3
  2. package/build/neutral/BoundWitness/BoundWitness.d.ts +45 -0
  3. package/build/neutral/BoundWitness/BoundWitness.d.ts.map +1 -0
  4. package/build/neutral/BoundWitness/BoundWitnessJsonSchema.d.ts +37 -0
  5. package/build/neutral/BoundWitness/BoundWitnessJsonSchema.d.ts.map +1 -0
  6. package/build/neutral/BoundWitness/BoundWitnessSchema.d.ts +3 -0
  7. package/build/neutral/BoundWitness/BoundWitnessSchema.d.ts.map +1 -0
  8. package/build/neutral/BoundWitness/index.d.ts +4 -0
  9. package/build/neutral/BoundWitness/index.d.ts.map +1 -0
  10. package/build/neutral/QueryBoundWitness.d.ts +12 -0
  11. package/build/neutral/QueryBoundWitness.d.ts.map +1 -0
  12. package/build/neutral/index.d.ts +4 -0
  13. package/build/neutral/index.d.ts.map +1 -0
  14. package/build/neutral/isBoundWitness.d.ts +14 -0
  15. package/build/neutral/isBoundWitness.d.ts.map +1 -0
  16. package/build/node/BoundWitness/BoundWitness.d.ts +45 -0
  17. package/build/node/BoundWitness/BoundWitness.d.ts.map +1 -0
  18. package/build/node/BoundWitness/BoundWitnessJsonSchema.d.ts +37 -0
  19. package/build/node/BoundWitness/BoundWitnessJsonSchema.d.ts.map +1 -0
  20. package/build/node/BoundWitness/BoundWitnessSchema.d.ts +3 -0
  21. package/build/node/BoundWitness/BoundWitnessSchema.d.ts.map +1 -0
  22. package/build/node/BoundWitness/index.d.ts +4 -0
  23. package/build/node/BoundWitness/index.d.ts.map +1 -0
  24. package/build/node/QueryBoundWitness.d.ts +12 -0
  25. package/build/node/QueryBoundWitness.d.ts.map +1 -0
  26. package/build/node/index.d.ts +4 -0
  27. package/build/node/index.d.ts.map +1 -0
  28. package/build/node/isBoundWitness.d.ts +14 -0
  29. package/build/node/isBoundWitness.d.ts.map +1 -0
  30. package/dist/browser/index.d.ts +109 -0
  31. package/dist/neutral/index.d.ts +109 -0
  32. package/dist/node/index.d.ts +109 -0
  33. package/package.json +9 -9
  34. /package/{dist/types → build/browser}/BoundWitness/BoundWitness.d.ts +0 -0
  35. /package/{dist/types → build/browser}/BoundWitness/BoundWitness.d.ts.map +0 -0
  36. /package/{dist/types → build/browser}/BoundWitness/BoundWitnessJsonSchema.d.ts +0 -0
  37. /package/{dist/types → build/browser}/BoundWitness/BoundWitnessJsonSchema.d.ts.map +0 -0
  38. /package/{dist/types → build/browser}/BoundWitness/BoundWitnessSchema.d.ts +0 -0
  39. /package/{dist/types → build/browser}/BoundWitness/BoundWitnessSchema.d.ts.map +0 -0
  40. /package/{dist/types → build/browser}/BoundWitness/index.d.ts +0 -0
  41. /package/{dist/types → build/browser}/BoundWitness/index.d.ts.map +0 -0
  42. /package/{dist/types → build/browser}/QueryBoundWitness.d.ts +0 -0
  43. /package/{dist/types → build/browser}/QueryBoundWitness.d.ts.map +0 -0
  44. /package/{dist/types → build/browser}/index.d.ts +0 -0
  45. /package/{dist/types → build/browser}/index.d.ts.map +0 -0
  46. /package/{dist/types → build/browser}/isBoundWitness.d.ts.map +0 -0
@@ -5,10 +5,10 @@ export declare const notBoundWitness: (x?: unknown | null) => x is BoundWitness;
5
5
  export declare const asBoundWitness: <T extends BoundWitness<{
6
6
  schema: string;
7
7
  }> = BoundWitness>(payload?: unknown) => T | undefined;
8
- export declare const asOptionalBoundWitness: (value: import(".store/@xylabs-promise-npm-4.12.33-02282584fe/package").AnyNonPromise) => BoundWitness | undefined;
8
+ export declare const asOptionalBoundWitness: (value: import(".store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package").AnyNonPromise) => BoundWitness | undefined;
9
9
  export declare const isBoundWitnessWithStorageMeta: (value: unknown) => value is WithStorageMeta<BoundWitness>;
10
- export declare const asBoundWitnessWithStorageMeta: (value: import(".store/@xylabs-promise-npm-4.12.33-02282584fe/package").AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
11
- export declare const asOptionalBoundWitnessWithStorageMeta: (value: import(".store/@xylabs-promise-npm-4.12.33-02282584fe/package").AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
10
+ export declare const asBoundWitnessWithStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package").AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
11
+ export declare const asOptionalBoundWitnessWithStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package").AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
12
12
  export declare const isSigned: (value: unknown) => value is Signed;
13
13
  export declare const isUnsigned: (value: unknown) => value is UnsignedBoundWitness;
14
14
  //# sourceMappingURL=isBoundWitness.d.ts.map
@@ -0,0 +1,45 @@
1
+ import type { Address, Hash, Hex } from '@xylabs/hex';
2
+ import type { EmptyObject, JsonObject } from '@xylabs/object';
3
+ import type { Payload, Schema } from '@xyo-network/payload-model';
4
+ import type { BoundWitnessSchema } from './BoundWitnessSchema.ts';
5
+ export interface BoundWitnessRequiredFields {
6
+ /** @field Array of signatures by the accounts that are listed in addresses */
7
+ addresses: Address[];
8
+ payload_hashes: Hash[];
9
+ payload_schemas: Schema[];
10
+ previous_hashes: (Hash | null)[];
11
+ }
12
+ export interface BoundWitnessMeta {
13
+ /**
14
+ * @field The address to which the query is directed
15
+ */
16
+ $destination?: Address;
17
+ /**
18
+ * @field The query that initiated the bound witness
19
+ */
20
+ $sourceQuery?: Hash;
21
+ }
22
+ export interface BoundWitnessBlockField {
23
+ /** @field sequential number (if this boundwitness is part of a multi-party chain) */
24
+ block: number;
25
+ }
26
+ export interface BoundWitnessChainField {
27
+ /** @field unique id of a multi-party chain (usually staking contract address) */
28
+ chain: Hex;
29
+ }
30
+ export interface BoundWitnessOptionalFields extends Partial<BoundWitnessBlockField>, Partial<BoundWitnessChainField> {
31
+ root: Hash;
32
+ }
33
+ export interface BoundWitnessFields extends BoundWitnessRequiredFields, Partial<BoundWitnessOptionalFields> {
34
+ }
35
+ export type UnsignedBoundWitness<T extends EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, BoundWitnessSchema> & BoundWitnessMeta;
36
+ export type Signed<T extends UnsignedBoundWitness = UnsignedBoundWitness> = T & {
37
+ $signatures: Hex[];
38
+ };
39
+ export type SignedBoundWitness = Signed<UnsignedBoundWitness>;
40
+ export type WithBlock = BoundWitness & BoundWitnessBlockField;
41
+ export declare const hasBlock: (bw: BoundWitness) => bw is WithBlock;
42
+ export declare const asBlock: (bw: BoundWitness) => WithBlock;
43
+ export type BoundWitness<T extends Payload | EmptyObject | void = void> = Signed<UnsignedBoundWitness<T>>;
44
+ export type AnyBoundWitness = BoundWitness<JsonObject>;
45
+ //# sourceMappingURL=BoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoundWitness.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,IAAI,EAAE,GAAG,EACnB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,SAAS,EAAE,OAAO,EAAE,CAAA;IACpB,cAAc,EAAE,IAAI,EAAE,CAAA;IACtB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,eAAe,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAA;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAA;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,iFAAiF;IACjF,KAAK,EAAE,GAAG,CAAA;CACX;AAED,MAAM,WAAW,0BAA2B,SAAQ,OAAO,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC;IAClH,IAAI,EAAE,IAAI,CAAA;CACX;AAED,MAAM,WAAW,kBAAmB,SAAQ,0BAA0B,EAAE,OAAO,CAAC,0BAA0B,CAAC;CAAG;AAE9G,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,WAAW,GAAG,IAAI,GAAG,IAAI,IAAI,OAAO,CAC7E,CAAC,SAAS,IAAI,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,CAAC,EAC5D,kBAAkB,CACnB,GAAG,gBAAgB,CAAA;AAEpB,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,IAAI,CAAC,GAAG;IAC9E,WAAW,EAAE,GAAG,EAAE,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAA;AAE7D,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,sBAAsB,CAAA;AAE7D,eAAO,MAAM,QAAQ,GAAI,IAAI,YAAY,KAAG,EAAE,IAAI,SAAmE,CAAA;AACrH,eAAO,MAAM,OAAO,GAAI,IAAI,YAAY,KAAG,SAA4B,CAAA;AAEvE,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,IAAI,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAA;AAEzG,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA"}
@@ -0,0 +1,37 @@
1
+ export declare const BoundWitnessJsonSchema: () => {
2
+ $id: string;
3
+ additionalProperties: boolean;
4
+ properties: {
5
+ addresses: {
6
+ items: {
7
+ type: string;
8
+ };
9
+ type: string;
10
+ };
11
+ payload_hashes: {
12
+ items: {
13
+ type: string;
14
+ };
15
+ type: string;
16
+ };
17
+ payload_schemas: {
18
+ items: {
19
+ type: string;
20
+ };
21
+ type: string;
22
+ };
23
+ previous_hashes: {
24
+ items: {
25
+ nullable: boolean;
26
+ type: string;
27
+ };
28
+ type: string;
29
+ };
30
+ schema: {
31
+ type: string;
32
+ };
33
+ };
34
+ required: string[];
35
+ type: string;
36
+ };
37
+ //# sourceMappingURL=BoundWitnessJsonSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoundWitnessJsonSchema.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitnessJsonSchema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAclC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const BoundWitnessSchema: "network.xyo.boundwitness";
2
+ export type BoundWitnessSchema = typeof BoundWitnessSchema;
3
+ //# sourceMappingURL=BoundWitnessSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoundWitnessSchema.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitnessSchema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,EAAG,0BAAmC,CAAA;AACrE,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './BoundWitness.ts';
2
+ export * from './BoundWitnessJsonSchema.ts';
3
+ export * from './BoundWitnessSchema.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { Hash } from '@xylabs/hex';
2
+ import type { WithStorageMeta } from '@xyo-network/payload-model';
3
+ import type { BoundWitness } from './BoundWitness/index.ts';
4
+ export type QueryBoundWitnessFields = {
5
+ error_hashes?: Hash[];
6
+ query: Hash;
7
+ };
8
+ export type UnsignedQueryBoundWitness = BoundWitness<QueryBoundWitnessFields>;
9
+ export type QueryBoundWitness = UnsignedQueryBoundWitness;
10
+ export declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
11
+ export declare const isQueryBoundWitnessWithStorageMeta: (x?: unknown) => x is WithStorageMeta<QueryBoundWitness>;
12
+ //# sourceMappingURL=QueryBoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBoundWitness.d.ts","sourceRoot":"","sources":["../../src/QueryBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG3D,MAAM,MAAM,uBAAuB,GAAG;IACpC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAA;IACrB,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAA;AAG7E,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,CAAA;AAEzD,eAAO,MAAM,mBAAmB,GAAI,IAAI,OAAO,KAAG,CAAC,IAAI,iBAAuF,CAAA;AAC9I,eAAO,MAAM,kCAAkC,GAAI,IAAI,OAAO,KAAG,CAAC,IAAI,eAAe,CAAC,iBAAiB,CAA+C,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './BoundWitness/index.ts';
2
+ export * from './isBoundWitness.ts';
3
+ export * from './QueryBoundWitness.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { WithStorageMeta } from '@xyo-network/payload-model';
2
+ import type { BoundWitness, Signed, UnsignedBoundWitness } from './BoundWitness/index.ts';
3
+ export declare const isBoundWitness: (value: unknown) => value is BoundWitness;
4
+ export declare const notBoundWitness: (x?: unknown | null) => x is BoundWitness;
5
+ export declare const asBoundWitness: <T extends BoundWitness<{
6
+ schema: string;
7
+ }> = BoundWitness>(payload?: unknown) => T | undefined;
8
+ export declare const asOptionalBoundWitness: (value: import(".store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package").AnyNonPromise) => BoundWitness | undefined;
9
+ export declare const isBoundWitnessWithStorageMeta: (value: unknown) => value is WithStorageMeta<BoundWitness>;
10
+ export declare const asBoundWitnessWithStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package").AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
11
+ export declare const asOptionalBoundWitnessWithStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package").AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
12
+ export declare const isSigned: (value: unknown) => value is Signed;
13
+ export declare const isUnsigned: (value: unknown) => value is UnsignedBoundWitness;
14
+ //# sourceMappingURL=isBoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isBoundWitness.d.ts","sourceRoot":"","sources":["../../src/isBoundWitness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAKjE,OAAO,KAAK,EACV,YAAY,EAAE,MAAM,EAAE,oBAAoB,EAC3C,MAAM,yBAAyB,CAAA;AAGhC,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,YAA8E,CAAA;AAEvI,eAAO,MAAM,eAAe,2CAA2D,CAAA;AAIvF,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,YAAY,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,YAAY,EAAE,UAAU,OAAO,kBACrD,CAAA;AAEtD,eAAO,MAAM,sBAAsB,oHAA+D,CAAA;AAElG,eAAO,MAAM,6BAA6B,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAAe,CAAC,YAAY,CACZ,CAAA;AACxF,eAAO,MAAM,6BAA6B,qIAA+F,CAAA;AACzI,eAAO,MAAM,qCAAqC,qIAA+F,CAAA;AAEjJ,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAGpB,CAAA;AAE/B,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,oBACV,CAAA"}
@@ -0,0 +1,45 @@
1
+ import type { Address, Hash, Hex } from '@xylabs/hex';
2
+ import type { EmptyObject, JsonObject } from '@xylabs/object';
3
+ import type { Payload, Schema } from '@xyo-network/payload-model';
4
+ import type { BoundWitnessSchema } from './BoundWitnessSchema.ts';
5
+ export interface BoundWitnessRequiredFields {
6
+ /** @field Array of signatures by the accounts that are listed in addresses */
7
+ addresses: Address[];
8
+ payload_hashes: Hash[];
9
+ payload_schemas: Schema[];
10
+ previous_hashes: (Hash | null)[];
11
+ }
12
+ export interface BoundWitnessMeta {
13
+ /**
14
+ * @field The address to which the query is directed
15
+ */
16
+ $destination?: Address;
17
+ /**
18
+ * @field The query that initiated the bound witness
19
+ */
20
+ $sourceQuery?: Hash;
21
+ }
22
+ export interface BoundWitnessBlockField {
23
+ /** @field sequential number (if this boundwitness is part of a multi-party chain) */
24
+ block: number;
25
+ }
26
+ export interface BoundWitnessChainField {
27
+ /** @field unique id of a multi-party chain (usually staking contract address) */
28
+ chain: Hex;
29
+ }
30
+ export interface BoundWitnessOptionalFields extends Partial<BoundWitnessBlockField>, Partial<BoundWitnessChainField> {
31
+ root: Hash;
32
+ }
33
+ export interface BoundWitnessFields extends BoundWitnessRequiredFields, Partial<BoundWitnessOptionalFields> {
34
+ }
35
+ export type UnsignedBoundWitness<T extends EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, BoundWitnessSchema> & BoundWitnessMeta;
36
+ export type Signed<T extends UnsignedBoundWitness = UnsignedBoundWitness> = T & {
37
+ $signatures: Hex[];
38
+ };
39
+ export type SignedBoundWitness = Signed<UnsignedBoundWitness>;
40
+ export type WithBlock = BoundWitness & BoundWitnessBlockField;
41
+ export declare const hasBlock: (bw: BoundWitness) => bw is WithBlock;
42
+ export declare const asBlock: (bw: BoundWitness) => WithBlock;
43
+ export type BoundWitness<T extends Payload | EmptyObject | void = void> = Signed<UnsignedBoundWitness<T>>;
44
+ export type AnyBoundWitness = BoundWitness<JsonObject>;
45
+ //# sourceMappingURL=BoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoundWitness.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,IAAI,EAAE,GAAG,EACnB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,SAAS,EAAE,OAAO,EAAE,CAAA;IACpB,cAAc,EAAE,IAAI,EAAE,CAAA;IACtB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,eAAe,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAA;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAA;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,iFAAiF;IACjF,KAAK,EAAE,GAAG,CAAA;CACX;AAED,MAAM,WAAW,0BAA2B,SAAQ,OAAO,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC;IAClH,IAAI,EAAE,IAAI,CAAA;CACX;AAED,MAAM,WAAW,kBAAmB,SAAQ,0BAA0B,EAAE,OAAO,CAAC,0BAA0B,CAAC;CAAG;AAE9G,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,WAAW,GAAG,IAAI,GAAG,IAAI,IAAI,OAAO,CAC7E,CAAC,SAAS,IAAI,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,CAAC,EAC5D,kBAAkB,CACnB,GAAG,gBAAgB,CAAA;AAEpB,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,IAAI,CAAC,GAAG;IAC9E,WAAW,EAAE,GAAG,EAAE,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAA;AAE7D,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,sBAAsB,CAAA;AAE7D,eAAO,MAAM,QAAQ,GAAI,IAAI,YAAY,KAAG,EAAE,IAAI,SAAmE,CAAA;AACrH,eAAO,MAAM,OAAO,GAAI,IAAI,YAAY,KAAG,SAA4B,CAAA;AAEvE,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,IAAI,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAA;AAEzG,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA"}
@@ -0,0 +1,37 @@
1
+ export declare const BoundWitnessJsonSchema: () => {
2
+ $id: string;
3
+ additionalProperties: boolean;
4
+ properties: {
5
+ addresses: {
6
+ items: {
7
+ type: string;
8
+ };
9
+ type: string;
10
+ };
11
+ payload_hashes: {
12
+ items: {
13
+ type: string;
14
+ };
15
+ type: string;
16
+ };
17
+ payload_schemas: {
18
+ items: {
19
+ type: string;
20
+ };
21
+ type: string;
22
+ };
23
+ previous_hashes: {
24
+ items: {
25
+ nullable: boolean;
26
+ type: string;
27
+ };
28
+ type: string;
29
+ };
30
+ schema: {
31
+ type: string;
32
+ };
33
+ };
34
+ required: string[];
35
+ type: string;
36
+ };
37
+ //# sourceMappingURL=BoundWitnessJsonSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoundWitnessJsonSchema.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitnessJsonSchema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAclC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const BoundWitnessSchema: "network.xyo.boundwitness";
2
+ export type BoundWitnessSchema = typeof BoundWitnessSchema;
3
+ //# sourceMappingURL=BoundWitnessSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoundWitnessSchema.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/BoundWitnessSchema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,EAAG,0BAAmC,CAAA;AACrE,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './BoundWitness.ts';
2
+ export * from './BoundWitnessJsonSchema.ts';
3
+ export * from './BoundWitnessSchema.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/BoundWitness/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { Hash } from '@xylabs/hex';
2
+ import type { WithStorageMeta } from '@xyo-network/payload-model';
3
+ import type { BoundWitness } from './BoundWitness/index.ts';
4
+ export type QueryBoundWitnessFields = {
5
+ error_hashes?: Hash[];
6
+ query: Hash;
7
+ };
8
+ export type UnsignedQueryBoundWitness = BoundWitness<QueryBoundWitnessFields>;
9
+ export type QueryBoundWitness = UnsignedQueryBoundWitness;
10
+ export declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
11
+ export declare const isQueryBoundWitnessWithStorageMeta: (x?: unknown) => x is WithStorageMeta<QueryBoundWitness>;
12
+ //# sourceMappingURL=QueryBoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBoundWitness.d.ts","sourceRoot":"","sources":["../../src/QueryBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAG3D,MAAM,MAAM,uBAAuB,GAAG;IACpC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAA;IACrB,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAAC,uBAAuB,CAAC,CAAA;AAG7E,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,CAAA;AAEzD,eAAO,MAAM,mBAAmB,GAAI,IAAI,OAAO,KAAG,CAAC,IAAI,iBAAuF,CAAA;AAC9I,eAAO,MAAM,kCAAkC,GAAI,IAAI,OAAO,KAAG,CAAC,IAAI,eAAe,CAAC,iBAAiB,CAA+C,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './BoundWitness/index.ts';
2
+ export * from './isBoundWitness.ts';
3
+ export * from './QueryBoundWitness.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { WithStorageMeta } from '@xyo-network/payload-model';
2
+ import type { BoundWitness, Signed, UnsignedBoundWitness } from './BoundWitness/index.ts';
3
+ export declare const isBoundWitness: (value: unknown) => value is BoundWitness;
4
+ export declare const notBoundWitness: (x?: unknown | null) => x is BoundWitness;
5
+ export declare const asBoundWitness: <T extends BoundWitness<{
6
+ schema: string;
7
+ }> = BoundWitness>(payload?: unknown) => T | undefined;
8
+ export declare const asOptionalBoundWitness: (value: import(".store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package").AnyNonPromise) => BoundWitness | undefined;
9
+ export declare const isBoundWitnessWithStorageMeta: (value: unknown) => value is WithStorageMeta<BoundWitness>;
10
+ export declare const asBoundWitnessWithStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package").AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
11
+ export declare const asOptionalBoundWitnessWithStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package").AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
12
+ export declare const isSigned: (value: unknown) => value is Signed;
13
+ export declare const isUnsigned: (value: unknown) => value is UnsignedBoundWitness;
14
+ //# sourceMappingURL=isBoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isBoundWitness.d.ts","sourceRoot":"","sources":["../../src/isBoundWitness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAKjE,OAAO,KAAK,EACV,YAAY,EAAE,MAAM,EAAE,oBAAoB,EAC3C,MAAM,yBAAyB,CAAA;AAGhC,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,YAA8E,CAAA;AAEvI,eAAO,MAAM,eAAe,2CAA2D,CAAA;AAIvF,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,YAAY,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,YAAY,EAAE,UAAU,OAAO,kBACrD,CAAA;AAEtD,eAAO,MAAM,sBAAsB,oHAA+D,CAAA;AAElG,eAAO,MAAM,6BAA6B,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAAe,CAAC,YAAY,CACZ,CAAA;AACxF,eAAO,MAAM,6BAA6B,qIAA+F,CAAA;AACzI,eAAO,MAAM,qCAAqC,qIAA+F,CAAA;AAEjJ,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAGpB,CAAA;AAE/B,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,oBACV,CAAA"}
@@ -0,0 +1,109 @@
1
+ import { Address, Hash, Hex } from '@xylabs/hex';
2
+ import { EmptyObject, JsonObject } from '@xylabs/object';
3
+ import { Schema, Payload, WithStorageMeta } from '@xyo-network/payload-model';
4
+ import * as _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package from '.store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package';
5
+
6
+ declare const BoundWitnessSchema: "network.xyo.boundwitness";
7
+ type BoundWitnessSchema = typeof BoundWitnessSchema;
8
+
9
+ interface BoundWitnessRequiredFields {
10
+ /** @field Array of signatures by the accounts that are listed in addresses */
11
+ addresses: Address[];
12
+ payload_hashes: Hash[];
13
+ payload_schemas: Schema[];
14
+ previous_hashes: (Hash | null)[];
15
+ }
16
+ interface BoundWitnessMeta {
17
+ /**
18
+ * @field The address to which the query is directed
19
+ */
20
+ $destination?: Address;
21
+ /**
22
+ * @field The query that initiated the bound witness
23
+ */
24
+ $sourceQuery?: Hash;
25
+ }
26
+ interface BoundWitnessBlockField {
27
+ /** @field sequential number (if this boundwitness is part of a multi-party chain) */
28
+ block: number;
29
+ }
30
+ interface BoundWitnessChainField {
31
+ /** @field unique id of a multi-party chain (usually staking contract address) */
32
+ chain: Hex;
33
+ }
34
+ interface BoundWitnessOptionalFields extends Partial<BoundWitnessBlockField>, Partial<BoundWitnessChainField> {
35
+ root: Hash;
36
+ }
37
+ interface BoundWitnessFields extends BoundWitnessRequiredFields, Partial<BoundWitnessOptionalFields> {
38
+ }
39
+ type UnsignedBoundWitness<T extends EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, BoundWitnessSchema> & BoundWitnessMeta;
40
+ type Signed<T extends UnsignedBoundWitness = UnsignedBoundWitness> = T & {
41
+ $signatures: Hex[];
42
+ };
43
+ type SignedBoundWitness = Signed<UnsignedBoundWitness>;
44
+ type WithBlock = BoundWitness & BoundWitnessBlockField;
45
+ declare const hasBlock: (bw: BoundWitness) => bw is WithBlock;
46
+ declare const asBlock: (bw: BoundWitness) => WithBlock;
47
+ type BoundWitness<T extends Payload | EmptyObject | void = void> = Signed<UnsignedBoundWitness<T>>;
48
+ type AnyBoundWitness = BoundWitness<JsonObject>;
49
+
50
+ declare const BoundWitnessJsonSchema: () => {
51
+ $id: string;
52
+ additionalProperties: boolean;
53
+ properties: {
54
+ addresses: {
55
+ items: {
56
+ type: string;
57
+ };
58
+ type: string;
59
+ };
60
+ payload_hashes: {
61
+ items: {
62
+ type: string;
63
+ };
64
+ type: string;
65
+ };
66
+ payload_schemas: {
67
+ items: {
68
+ type: string;
69
+ };
70
+ type: string;
71
+ };
72
+ previous_hashes: {
73
+ items: {
74
+ nullable: boolean;
75
+ type: string;
76
+ };
77
+ type: string;
78
+ };
79
+ schema: {
80
+ type: string;
81
+ };
82
+ };
83
+ required: string[];
84
+ type: string;
85
+ };
86
+
87
+ declare const isBoundWitness: (value: unknown) => value is BoundWitness;
88
+ declare const notBoundWitness: (x?: unknown | null) => x is BoundWitness;
89
+ declare const asBoundWitness: <T extends BoundWitness<{
90
+ schema: string;
91
+ }> = BoundWitness>(payload?: unknown) => T | undefined;
92
+ declare const asOptionalBoundWitness: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => BoundWitness | undefined;
93
+ declare const isBoundWitnessWithStorageMeta: (value: unknown) => value is WithStorageMeta<BoundWitness>;
94
+ declare const asBoundWitnessWithStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
95
+ declare const asOptionalBoundWitnessWithStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
96
+ declare const isSigned: (value: unknown) => value is Signed;
97
+ declare const isUnsigned: (value: unknown) => value is UnsignedBoundWitness;
98
+
99
+ type QueryBoundWitnessFields = {
100
+ error_hashes?: Hash[];
101
+ query: Hash;
102
+ };
103
+ type UnsignedQueryBoundWitness = BoundWitness<QueryBoundWitnessFields>;
104
+ type QueryBoundWitness = UnsignedQueryBoundWitness;
105
+ declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
106
+ declare const isQueryBoundWitnessWithStorageMeta: (x?: unknown) => x is WithStorageMeta<QueryBoundWitness>;
107
+
108
+ export { BoundWitnessJsonSchema, BoundWitnessSchema, asBlock, asBoundWitness, asBoundWitnessWithStorageMeta, asOptionalBoundWitness, asOptionalBoundWitnessWithStorageMeta, hasBlock, isBoundWitness, isBoundWitnessWithStorageMeta, isQueryBoundWitness, isQueryBoundWitnessWithStorageMeta, isSigned, isUnsigned, notBoundWitness };
109
+ export type { AnyBoundWitness, BoundWitness, BoundWitnessBlockField, BoundWitnessChainField, BoundWitnessFields, BoundWitnessMeta, BoundWitnessOptionalFields, BoundWitnessRequiredFields, QueryBoundWitness, QueryBoundWitnessFields, Signed, SignedBoundWitness, UnsignedBoundWitness, UnsignedQueryBoundWitness, WithBlock };
@@ -0,0 +1,109 @@
1
+ import { Address, Hash, Hex } from '@xylabs/hex';
2
+ import { EmptyObject, JsonObject } from '@xylabs/object';
3
+ import { Schema, Payload, WithStorageMeta } from '@xyo-network/payload-model';
4
+ import * as _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package from '.store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package';
5
+
6
+ declare const BoundWitnessSchema: "network.xyo.boundwitness";
7
+ type BoundWitnessSchema = typeof BoundWitnessSchema;
8
+
9
+ interface BoundWitnessRequiredFields {
10
+ /** @field Array of signatures by the accounts that are listed in addresses */
11
+ addresses: Address[];
12
+ payload_hashes: Hash[];
13
+ payload_schemas: Schema[];
14
+ previous_hashes: (Hash | null)[];
15
+ }
16
+ interface BoundWitnessMeta {
17
+ /**
18
+ * @field The address to which the query is directed
19
+ */
20
+ $destination?: Address;
21
+ /**
22
+ * @field The query that initiated the bound witness
23
+ */
24
+ $sourceQuery?: Hash;
25
+ }
26
+ interface BoundWitnessBlockField {
27
+ /** @field sequential number (if this boundwitness is part of a multi-party chain) */
28
+ block: number;
29
+ }
30
+ interface BoundWitnessChainField {
31
+ /** @field unique id of a multi-party chain (usually staking contract address) */
32
+ chain: Hex;
33
+ }
34
+ interface BoundWitnessOptionalFields extends Partial<BoundWitnessBlockField>, Partial<BoundWitnessChainField> {
35
+ root: Hash;
36
+ }
37
+ interface BoundWitnessFields extends BoundWitnessRequiredFields, Partial<BoundWitnessOptionalFields> {
38
+ }
39
+ type UnsignedBoundWitness<T extends EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, BoundWitnessSchema> & BoundWitnessMeta;
40
+ type Signed<T extends UnsignedBoundWitness = UnsignedBoundWitness> = T & {
41
+ $signatures: Hex[];
42
+ };
43
+ type SignedBoundWitness = Signed<UnsignedBoundWitness>;
44
+ type WithBlock = BoundWitness & BoundWitnessBlockField;
45
+ declare const hasBlock: (bw: BoundWitness) => bw is WithBlock;
46
+ declare const asBlock: (bw: BoundWitness) => WithBlock;
47
+ type BoundWitness<T extends Payload | EmptyObject | void = void> = Signed<UnsignedBoundWitness<T>>;
48
+ type AnyBoundWitness = BoundWitness<JsonObject>;
49
+
50
+ declare const BoundWitnessJsonSchema: () => {
51
+ $id: string;
52
+ additionalProperties: boolean;
53
+ properties: {
54
+ addresses: {
55
+ items: {
56
+ type: string;
57
+ };
58
+ type: string;
59
+ };
60
+ payload_hashes: {
61
+ items: {
62
+ type: string;
63
+ };
64
+ type: string;
65
+ };
66
+ payload_schemas: {
67
+ items: {
68
+ type: string;
69
+ };
70
+ type: string;
71
+ };
72
+ previous_hashes: {
73
+ items: {
74
+ nullable: boolean;
75
+ type: string;
76
+ };
77
+ type: string;
78
+ };
79
+ schema: {
80
+ type: string;
81
+ };
82
+ };
83
+ required: string[];
84
+ type: string;
85
+ };
86
+
87
+ declare const isBoundWitness: (value: unknown) => value is BoundWitness;
88
+ declare const notBoundWitness: (x?: unknown | null) => x is BoundWitness;
89
+ declare const asBoundWitness: <T extends BoundWitness<{
90
+ schema: string;
91
+ }> = BoundWitness>(payload?: unknown) => T | undefined;
92
+ declare const asOptionalBoundWitness: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => BoundWitness | undefined;
93
+ declare const isBoundWitnessWithStorageMeta: (value: unknown) => value is WithStorageMeta<BoundWitness>;
94
+ declare const asBoundWitnessWithStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
95
+ declare const asOptionalBoundWitnessWithStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
96
+ declare const isSigned: (value: unknown) => value is Signed;
97
+ declare const isUnsigned: (value: unknown) => value is UnsignedBoundWitness;
98
+
99
+ type QueryBoundWitnessFields = {
100
+ error_hashes?: Hash[];
101
+ query: Hash;
102
+ };
103
+ type UnsignedQueryBoundWitness = BoundWitness<QueryBoundWitnessFields>;
104
+ type QueryBoundWitness = UnsignedQueryBoundWitness;
105
+ declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
106
+ declare const isQueryBoundWitnessWithStorageMeta: (x?: unknown) => x is WithStorageMeta<QueryBoundWitness>;
107
+
108
+ export { BoundWitnessJsonSchema, BoundWitnessSchema, asBlock, asBoundWitness, asBoundWitnessWithStorageMeta, asOptionalBoundWitness, asOptionalBoundWitnessWithStorageMeta, hasBlock, isBoundWitness, isBoundWitnessWithStorageMeta, isQueryBoundWitness, isQueryBoundWitnessWithStorageMeta, isSigned, isUnsigned, notBoundWitness };
109
+ export type { AnyBoundWitness, BoundWitness, BoundWitnessBlockField, BoundWitnessChainField, BoundWitnessFields, BoundWitnessMeta, BoundWitnessOptionalFields, BoundWitnessRequiredFields, QueryBoundWitness, QueryBoundWitnessFields, Signed, SignedBoundWitness, UnsignedBoundWitness, UnsignedQueryBoundWitness, WithBlock };
@@ -0,0 +1,109 @@
1
+ import { Address, Hash, Hex } from '@xylabs/hex';
2
+ import { EmptyObject, JsonObject } from '@xylabs/object';
3
+ import { Schema, Payload, WithStorageMeta } from '@xyo-network/payload-model';
4
+ import * as _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package from '.store/@xylabs-promise-npm-4.13.15-8bdb7d384b/package';
5
+
6
+ declare const BoundWitnessSchema: "network.xyo.boundwitness";
7
+ type BoundWitnessSchema = typeof BoundWitnessSchema;
8
+
9
+ interface BoundWitnessRequiredFields {
10
+ /** @field Array of signatures by the accounts that are listed in addresses */
11
+ addresses: Address[];
12
+ payload_hashes: Hash[];
13
+ payload_schemas: Schema[];
14
+ previous_hashes: (Hash | null)[];
15
+ }
16
+ interface BoundWitnessMeta {
17
+ /**
18
+ * @field The address to which the query is directed
19
+ */
20
+ $destination?: Address;
21
+ /**
22
+ * @field The query that initiated the bound witness
23
+ */
24
+ $sourceQuery?: Hash;
25
+ }
26
+ interface BoundWitnessBlockField {
27
+ /** @field sequential number (if this boundwitness is part of a multi-party chain) */
28
+ block: number;
29
+ }
30
+ interface BoundWitnessChainField {
31
+ /** @field unique id of a multi-party chain (usually staking contract address) */
32
+ chain: Hex;
33
+ }
34
+ interface BoundWitnessOptionalFields extends Partial<BoundWitnessBlockField>, Partial<BoundWitnessChainField> {
35
+ root: Hash;
36
+ }
37
+ interface BoundWitnessFields extends BoundWitnessRequiredFields, Partial<BoundWitnessOptionalFields> {
38
+ }
39
+ type UnsignedBoundWitness<T extends EmptyObject | void = void> = Payload<T extends void ? BoundWitnessFields : BoundWitnessFields & T, BoundWitnessSchema> & BoundWitnessMeta;
40
+ type Signed<T extends UnsignedBoundWitness = UnsignedBoundWitness> = T & {
41
+ $signatures: Hex[];
42
+ };
43
+ type SignedBoundWitness = Signed<UnsignedBoundWitness>;
44
+ type WithBlock = BoundWitness & BoundWitnessBlockField;
45
+ declare const hasBlock: (bw: BoundWitness) => bw is WithBlock;
46
+ declare const asBlock: (bw: BoundWitness) => WithBlock;
47
+ type BoundWitness<T extends Payload | EmptyObject | void = void> = Signed<UnsignedBoundWitness<T>>;
48
+ type AnyBoundWitness = BoundWitness<JsonObject>;
49
+
50
+ declare const BoundWitnessJsonSchema: () => {
51
+ $id: string;
52
+ additionalProperties: boolean;
53
+ properties: {
54
+ addresses: {
55
+ items: {
56
+ type: string;
57
+ };
58
+ type: string;
59
+ };
60
+ payload_hashes: {
61
+ items: {
62
+ type: string;
63
+ };
64
+ type: string;
65
+ };
66
+ payload_schemas: {
67
+ items: {
68
+ type: string;
69
+ };
70
+ type: string;
71
+ };
72
+ previous_hashes: {
73
+ items: {
74
+ nullable: boolean;
75
+ type: string;
76
+ };
77
+ type: string;
78
+ };
79
+ schema: {
80
+ type: string;
81
+ };
82
+ };
83
+ required: string[];
84
+ type: string;
85
+ };
86
+
87
+ declare const isBoundWitness: (value: unknown) => value is BoundWitness;
88
+ declare const notBoundWitness: (x?: unknown | null) => x is BoundWitness;
89
+ declare const asBoundWitness: <T extends BoundWitness<{
90
+ schema: string;
91
+ }> = BoundWitness>(payload?: unknown) => T | undefined;
92
+ declare const asOptionalBoundWitness: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => BoundWitness | undefined;
93
+ declare const isBoundWitnessWithStorageMeta: (value: unknown) => value is WithStorageMeta<BoundWitness>;
94
+ declare const asBoundWitnessWithStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
95
+ declare const asOptionalBoundWitnessWithStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => WithStorageMeta<BoundWitness> | undefined;
96
+ declare const isSigned: (value: unknown) => value is Signed;
97
+ declare const isUnsigned: (value: unknown) => value is UnsignedBoundWitness;
98
+
99
+ type QueryBoundWitnessFields = {
100
+ error_hashes?: Hash[];
101
+ query: Hash;
102
+ };
103
+ type UnsignedQueryBoundWitness = BoundWitness<QueryBoundWitnessFields>;
104
+ type QueryBoundWitness = UnsignedQueryBoundWitness;
105
+ declare const isQueryBoundWitness: (x?: unknown) => x is QueryBoundWitness;
106
+ declare const isQueryBoundWitnessWithStorageMeta: (x?: unknown) => x is WithStorageMeta<QueryBoundWitness>;
107
+
108
+ export { BoundWitnessJsonSchema, BoundWitnessSchema, asBlock, asBoundWitness, asBoundWitnessWithStorageMeta, asOptionalBoundWitness, asOptionalBoundWitnessWithStorageMeta, hasBlock, isBoundWitness, isBoundWitnessWithStorageMeta, isQueryBoundWitness, isQueryBoundWitnessWithStorageMeta, isSigned, isUnsigned, notBoundWitness };
109
+ export type { AnyBoundWitness, BoundWitness, BoundWitnessBlockField, BoundWitnessChainField, BoundWitnessFields, BoundWitnessMeta, BoundWitnessOptionalFields, BoundWitnessRequiredFields, QueryBoundWitness, QueryBoundWitnessFields, Signed, SignedBoundWitness, UnsignedBoundWitness, UnsignedQueryBoundWitness, WithBlock };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/boundwitness-model",
3
- "version": "4.0.2",
3
+ "version": "4.1.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,22 +21,22 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/types/index.d.ts",
24
+ "types": "./dist/neutral/index.d.ts",
25
25
  "default": "./dist/neutral/index.mjs"
26
26
  },
27
27
  "./package.json": "./package.json"
28
28
  },
29
29
  "module": "dist/neutral/index.mjs",
30
- "types": "dist/types/index.d.ts",
30
+ "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/hex": "^4.12.33",
33
- "@xylabs/object": "^4.12.33",
34
- "@xyo-network/payload-model": "^4.0.2"
32
+ "@xylabs/hex": "^4.13.15",
33
+ "@xylabs/object": "^4.13.15",
34
+ "@xyo-network/payload-model": "^4.1.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/node": "^24.0.10",
38
- "@xylabs/ts-scripts-yarn3": "^6.5.12",
39
- "@xylabs/tsconfig": "^6.5.12",
37
+ "@types/node": "^24.0.13",
38
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
39
+ "@xylabs/tsconfig": "^7.0.0-rc.20",
40
40
  "typescript": "^5.8.3"
41
41
  },
42
42
  "publishConfig": {
File without changes
File without changes