@xyo-network/boundwitness-wrapper 4.1.2 → 4.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,56 +1,4 @@
1
- import * as _xylabs_object from '@xylabs/object';
2
- import { Address, Hash } from '@xylabs/hex';
3
- import { BoundWitness, QueryBoundWitness } from '@xyo-network/boundwitness-model';
4
- import { Payload, WithoutPrivateStorageMeta, Query } from '@xyo-network/payload-model';
5
- import { PayloadWrapperBase, PayloadWrapper } from '@xyo-network/payload-wrapper';
6
- import { Promisable } from '@xylabs/promise';
7
- import { JSONSchemaType } from 'ajv';
8
-
9
- declare const isBoundWitnessWrapper: <T extends BoundWitness = BoundWitness, P extends Payload = Payload>(value?: unknown) => value is BoundWitnessWrapper<T, P>;
10
- declare class BoundWitnessWrapper<TBoundWitness extends BoundWitness<{
11
- schema: string;
12
- }> = BoundWitness, TPayload extends Payload = Payload> extends PayloadWrapperBase<TBoundWitness> {
13
- boundwitness: TBoundWitness;
14
- payloads: TPayload[];
15
- moduleErrors?: Payload[] | undefined;
16
- private _payloadDataMap;
17
- private _payloadMap;
18
- protected constructor(boundwitness: TBoundWitness, payloads?: TPayload[], moduleErrors?: Payload[] | undefined);
19
- get addresses(): Lowercase<string>[];
20
- get payloadHashes(): Lowercase<string>[];
21
- get payloadSchemas(): string[];
22
- get previousHashes(): _xylabs_object.DeepRestrictToStringKeys<Lowercase<string> | null>[];
23
- static as<T extends BoundWitness = BoundWitness>(value: unknown): BoundWitnessWrapper<T, Payload> | undefined;
24
- static load(address: Address): Promise<BoundWitnessWrapper<BoundWitness, Payload> | null>;
25
- static parse<T extends BoundWitness = BoundWitness, P extends Payload = Payload>(obj: unknown, payloads?: P[]): BoundWitnessWrapper<T, P>;
26
- static tryParse<T extends BoundWitness, P extends Payload>(obj: unknown, payloads?: P[]): BoundWitnessWrapper<T, P> | undefined;
27
- static wrap<T extends BoundWitness, P extends Payload>(obj: PayloadWrapperBase<T> | WithoutPrivateStorageMeta<T>, payloads?: P[]): BoundWitnessWrapper<T, P>;
28
- static wrappedDataHashMap<T extends BoundWitness>(boundWitnesses: (T | BoundWitnessWrapper<T>)[]): Promise<Record<string, BoundWitnessWrapper<T>>>;
29
- dig(depth?: number): Promise<BoundWitnessWrapper<TBoundWitness>>;
30
- getMissingPayloads(): Promise<Lowercase<string>[]>;
31
- getWrappedPayloads(): Promise<PayloadWrapper<TPayload>[]>;
32
- hashesBySchema(schema: string): string[];
33
- payloadsByDataHashes(hashes: Hash[]): Promise<TPayload[]>;
34
- payloadsByHashes(hashes: Hash[]): Promise<TPayload[]>;
35
- payloadsBySchema<T extends TPayload>(schema: string): T[];
36
- payloadsDataHashMap(): Promise<Record<Hash, TPayload>>;
37
- payloadsHashMap(): Promise<Record<Hash, TPayload>>;
38
- prev(address: Address): _xylabs_object.DeepRestrictToStringKeys<Lowercase<string> | null>;
39
- toResult(): (TBoundWitness | TPayload[])[];
40
- validate(): Promise<Error[]>;
41
- }
42
-
43
- declare class QueryBoundWitnessWrapper<T extends Query = Query> extends BoundWitnessWrapper<QueryBoundWitness> {
44
- private _payloadsWithoutQuery;
45
- private _query;
46
- static parseQuery<T extends Query = Query>(obj: unknown, payloads?: Payload[]): QueryBoundWitnessWrapper<T>;
47
- static tryParseQuery<T extends Query>(obj: unknown): Promisable<QueryBoundWitnessWrapper<T> | undefined>;
48
- getPayloadsWithoutQuery(): Promise<PayloadWrapper<Payload>[]>;
49
- getQuery(): Promise<T>;
50
- }
51
-
52
- declare const SignatureRegEx: string;
53
- declare const boundWitnessProperties: JSONSchemaType<BoundWitness>['properties'];
54
- declare const boundWitnessJsonSchema: JSONSchemaType<BoundWitness>;
55
-
56
- export { BoundWitnessWrapper, QueryBoundWitnessWrapper, SignatureRegEx, boundWitnessJsonSchema, boundWitnessProperties, isBoundWitnessWrapper };
1
+ export * from './BoundWitnessWrapper.ts';
2
+ export * from './QueryBoundWitnessWrapper.ts';
3
+ export * from './SchemaType.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1,56 +1,4 @@
1
- import * as _xylabs_object from '@xylabs/object';
2
- import { Address, Hash } from '@xylabs/hex';
3
- import { BoundWitness, QueryBoundWitness } from '@xyo-network/boundwitness-model';
4
- import { Payload, WithoutPrivateStorageMeta, Query } from '@xyo-network/payload-model';
5
- import { PayloadWrapperBase, PayloadWrapper } from '@xyo-network/payload-wrapper';
6
- import { Promisable } from '@xylabs/promise';
7
- import { JSONSchemaType } from 'ajv';
8
-
9
- declare const isBoundWitnessWrapper: <T extends BoundWitness = BoundWitness, P extends Payload = Payload>(value?: unknown) => value is BoundWitnessWrapper<T, P>;
10
- declare class BoundWitnessWrapper<TBoundWitness extends BoundWitness<{
11
- schema: string;
12
- }> = BoundWitness, TPayload extends Payload = Payload> extends PayloadWrapperBase<TBoundWitness> {
13
- boundwitness: TBoundWitness;
14
- payloads: TPayload[];
15
- moduleErrors?: Payload[] | undefined;
16
- private _payloadDataMap;
17
- private _payloadMap;
18
- protected constructor(boundwitness: TBoundWitness, payloads?: TPayload[], moduleErrors?: Payload[] | undefined);
19
- get addresses(): Lowercase<string>[];
20
- get payloadHashes(): Lowercase<string>[];
21
- get payloadSchemas(): string[];
22
- get previousHashes(): _xylabs_object.DeepRestrictToStringKeys<Lowercase<string> | null>[];
23
- static as<T extends BoundWitness = BoundWitness>(value: unknown): BoundWitnessWrapper<T, Payload> | undefined;
24
- static load(address: Address): Promise<BoundWitnessWrapper<BoundWitness, Payload> | null>;
25
- static parse<T extends BoundWitness = BoundWitness, P extends Payload = Payload>(obj: unknown, payloads?: P[]): BoundWitnessWrapper<T, P>;
26
- static tryParse<T extends BoundWitness, P extends Payload>(obj: unknown, payloads?: P[]): BoundWitnessWrapper<T, P> | undefined;
27
- static wrap<T extends BoundWitness, P extends Payload>(obj: PayloadWrapperBase<T> | WithoutPrivateStorageMeta<T>, payloads?: P[]): BoundWitnessWrapper<T, P>;
28
- static wrappedDataHashMap<T extends BoundWitness>(boundWitnesses: (T | BoundWitnessWrapper<T>)[]): Promise<Record<string, BoundWitnessWrapper<T>>>;
29
- dig(depth?: number): Promise<BoundWitnessWrapper<TBoundWitness>>;
30
- getMissingPayloads(): Promise<Lowercase<string>[]>;
31
- getWrappedPayloads(): Promise<PayloadWrapper<TPayload>[]>;
32
- hashesBySchema(schema: string): string[];
33
- payloadsByDataHashes(hashes: Hash[]): Promise<TPayload[]>;
34
- payloadsByHashes(hashes: Hash[]): Promise<TPayload[]>;
35
- payloadsBySchema<T extends TPayload>(schema: string): T[];
36
- payloadsDataHashMap(): Promise<Record<Hash, TPayload>>;
37
- payloadsHashMap(): Promise<Record<Hash, TPayload>>;
38
- prev(address: Address): _xylabs_object.DeepRestrictToStringKeys<Lowercase<string> | null>;
39
- toResult(): (TBoundWitness | TPayload[])[];
40
- validate(): Promise<Error[]>;
41
- }
42
-
43
- declare class QueryBoundWitnessWrapper<T extends Query = Query> extends BoundWitnessWrapper<QueryBoundWitness> {
44
- private _payloadsWithoutQuery;
45
- private _query;
46
- static parseQuery<T extends Query = Query>(obj: unknown, payloads?: Payload[]): QueryBoundWitnessWrapper<T>;
47
- static tryParseQuery<T extends Query>(obj: unknown): Promisable<QueryBoundWitnessWrapper<T> | undefined>;
48
- getPayloadsWithoutQuery(): Promise<PayloadWrapper<Payload>[]>;
49
- getQuery(): Promise<T>;
50
- }
51
-
52
- declare const SignatureRegEx: string;
53
- declare const boundWitnessProperties: JSONSchemaType<BoundWitness>['properties'];
54
- declare const boundWitnessJsonSchema: JSONSchemaType<BoundWitness>;
55
-
56
- export { BoundWitnessWrapper, QueryBoundWitnessWrapper, SignatureRegEx, boundWitnessJsonSchema, boundWitnessProperties, isBoundWitnessWrapper };
1
+ export * from './BoundWitnessWrapper.ts';
2
+ export * from './QueryBoundWitnessWrapper.ts';
3
+ export * from './SchemaType.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1,56 +1,4 @@
1
- import * as _xylabs_object from '@xylabs/object';
2
- import { Address, Hash } from '@xylabs/hex';
3
- import { BoundWitness, QueryBoundWitness } from '@xyo-network/boundwitness-model';
4
- import { Payload, WithoutPrivateStorageMeta, Query } from '@xyo-network/payload-model';
5
- import { PayloadWrapperBase, PayloadWrapper } from '@xyo-network/payload-wrapper';
6
- import { Promisable } from '@xylabs/promise';
7
- import { JSONSchemaType } from 'ajv';
8
-
9
- declare const isBoundWitnessWrapper: <T extends BoundWitness = BoundWitness, P extends Payload = Payload>(value?: unknown) => value is BoundWitnessWrapper<T, P>;
10
- declare class BoundWitnessWrapper<TBoundWitness extends BoundWitness<{
11
- schema: string;
12
- }> = BoundWitness, TPayload extends Payload = Payload> extends PayloadWrapperBase<TBoundWitness> {
13
- boundwitness: TBoundWitness;
14
- payloads: TPayload[];
15
- moduleErrors?: Payload[] | undefined;
16
- private _payloadDataMap;
17
- private _payloadMap;
18
- protected constructor(boundwitness: TBoundWitness, payloads?: TPayload[], moduleErrors?: Payload[] | undefined);
19
- get addresses(): Lowercase<string>[];
20
- get payloadHashes(): Lowercase<string>[];
21
- get payloadSchemas(): string[];
22
- get previousHashes(): _xylabs_object.DeepRestrictToStringKeys<Lowercase<string> | null>[];
23
- static as<T extends BoundWitness = BoundWitness>(value: unknown): BoundWitnessWrapper<T, Payload> | undefined;
24
- static load(address: Address): Promise<BoundWitnessWrapper<BoundWitness, Payload> | null>;
25
- static parse<T extends BoundWitness = BoundWitness, P extends Payload = Payload>(obj: unknown, payloads?: P[]): BoundWitnessWrapper<T, P>;
26
- static tryParse<T extends BoundWitness, P extends Payload>(obj: unknown, payloads?: P[]): BoundWitnessWrapper<T, P> | undefined;
27
- static wrap<T extends BoundWitness, P extends Payload>(obj: PayloadWrapperBase<T> | WithoutPrivateStorageMeta<T>, payloads?: P[]): BoundWitnessWrapper<T, P>;
28
- static wrappedDataHashMap<T extends BoundWitness>(boundWitnesses: (T | BoundWitnessWrapper<T>)[]): Promise<Record<string, BoundWitnessWrapper<T>>>;
29
- dig(depth?: number): Promise<BoundWitnessWrapper<TBoundWitness>>;
30
- getMissingPayloads(): Promise<Lowercase<string>[]>;
31
- getWrappedPayloads(): Promise<PayloadWrapper<TPayload>[]>;
32
- hashesBySchema(schema: string): string[];
33
- payloadsByDataHashes(hashes: Hash[]): Promise<TPayload[]>;
34
- payloadsByHashes(hashes: Hash[]): Promise<TPayload[]>;
35
- payloadsBySchema<T extends TPayload>(schema: string): T[];
36
- payloadsDataHashMap(): Promise<Record<Hash, TPayload>>;
37
- payloadsHashMap(): Promise<Record<Hash, TPayload>>;
38
- prev(address: Address): _xylabs_object.DeepRestrictToStringKeys<Lowercase<string> | null>;
39
- toResult(): (TBoundWitness | TPayload[])[];
40
- validate(): Promise<Error[]>;
41
- }
42
-
43
- declare class QueryBoundWitnessWrapper<T extends Query = Query> extends BoundWitnessWrapper<QueryBoundWitness> {
44
- private _payloadsWithoutQuery;
45
- private _query;
46
- static parseQuery<T extends Query = Query>(obj: unknown, payloads?: Payload[]): QueryBoundWitnessWrapper<T>;
47
- static tryParseQuery<T extends Query>(obj: unknown): Promisable<QueryBoundWitnessWrapper<T> | undefined>;
48
- getPayloadsWithoutQuery(): Promise<PayloadWrapper<Payload>[]>;
49
- getQuery(): Promise<T>;
50
- }
51
-
52
- declare const SignatureRegEx: string;
53
- declare const boundWitnessProperties: JSONSchemaType<BoundWitness>['properties'];
54
- declare const boundWitnessJsonSchema: JSONSchemaType<BoundWitness>;
55
-
56
- export { BoundWitnessWrapper, QueryBoundWitnessWrapper, SignatureRegEx, boundWitnessJsonSchema, boundWitnessProperties, isBoundWitnessWrapper };
1
+ export * from './BoundWitnessWrapper.ts';
2
+ export * from './QueryBoundWitnessWrapper.ts';
3
+ export * from './SchemaType.ts';
4
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/boundwitness-wrapper",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,23 +29,23 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/assert": "^4.13.15",
33
- "@xylabs/exists": "^4.13.15",
34
- "@xylabs/hex": "^4.13.15",
35
- "@xylabs/object": "^4.13.15",
36
- "@xylabs/promise": "^4.13.15",
37
- "@xyo-network/boundwitness-model": "^4.1.2",
38
- "@xyo-network/boundwitness-validator": "^4.1.2",
39
- "@xyo-network/payload": "^4.1.2",
40
- "@xyo-network/payload-builder": "^4.1.2",
41
- "@xyo-network/payload-model": "^4.1.2",
42
- "@xyo-network/payload-wrapper": "^4.1.2",
32
+ "@xylabs/assert": "^4.13.16",
33
+ "@xylabs/exists": "^4.13.16",
34
+ "@xylabs/hex": "^4.13.16",
35
+ "@xylabs/object": "^4.13.16",
36
+ "@xylabs/promise": "^4.13.16",
37
+ "@xyo-network/boundwitness-model": "^4.1.3",
38
+ "@xyo-network/boundwitness-validator": "^4.1.3",
39
+ "@xyo-network/payload": "^4.1.3",
40
+ "@xyo-network/payload-builder": "^4.1.3",
41
+ "@xyo-network/payload-model": "^4.1.3",
42
+ "@xyo-network/payload-wrapper": "^4.1.3",
43
43
  "ajv": "^8.17.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.23",
47
- "@xylabs/tsconfig": "^7.0.0-rc.23",
48
- "@xylabs/vitest-extended": "^4.13.15",
46
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
47
+ "@xylabs/tsconfig": "^7.0.0-rc.27",
48
+ "@xylabs/vitest-extended": "^4.13.16",
49
49
  "typescript": "^5.8.3",
50
50
  "vitest": "^3.2.4"
51
51
  },