@xyo-network/wasm 4.1.1 → 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,112 +1,2 @@
1
- declare const WasmFeatureDetectors: {
2
- readonly bigInt: () => Promise<boolean>;
3
- readonly bulkMemory: () => Promise<boolean>;
4
- readonly exceptions: () => Promise<boolean>;
5
- readonly extendedConst: () => Promise<boolean>;
6
- readonly gc: () => Promise<boolean>;
7
- readonly memory64: () => Promise<boolean>;
8
- readonly multiValue: () => Promise<boolean>;
9
- readonly mutableGlobals: () => Promise<boolean>;
10
- readonly referenceTypes: () => {
11
- new (executor: (resolve: (value: boolean | PromiseLike<boolean>) => void, reject: (reason?: any) => void) => void): Promise<boolean>;
12
- all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
13
- all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
14
- race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
15
- race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
16
- readonly prototype: Promise<any>;
17
- reject<T = never>(reason?: any): Promise<T>;
18
- resolve(): Promise<void>;
19
- resolve<T>(value: T): Promise<Awaited<T>>;
20
- resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
21
- allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
22
- allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
23
- any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
24
- any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
25
- withResolvers<T>(): PromiseWithResolvers<T>;
26
- try<T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U): Promise<Awaited<T>>;
27
- readonly [Symbol.species]: PromiseConstructor;
28
- };
29
- readonly relaxedSimd: () => Promise<boolean>;
30
- readonly saturatedFloatToInt: () => Promise<boolean>;
31
- readonly signExtensions: () => Promise<boolean>;
32
- readonly simd: () => Promise<boolean>;
33
- readonly streamingCompilation: () => Promise<boolean>;
34
- readonly tailCall: () => Promise<boolean>;
35
- readonly threads: () => Promise<boolean>;
36
- };
37
- type WasmFeature = keyof typeof WasmFeatureDetectors;
38
- declare class WasmSupport {
39
- protected desiredFeatures: WasmFeature[];
40
- private _allowWasm;
41
- private _featureSupport;
42
- private _forceWasm;
43
- private _isInitialized;
44
- private _isWasmFeatureSetSupported;
45
- /**
46
- * Instance constructor for use where async instantiation
47
- * is not possible. Where possible, prefer the static
48
- * create method over use of this constructor directly
49
- * as no initialization (feature detection) is able to
50
- * be done here
51
- * @param desiredFeatures The desired feature set
52
- */
53
- constructor(desiredFeatures: WasmFeature[]);
54
- /**
55
- * Is Wasm allowed
56
- */
57
- get allowWasm(): boolean;
58
- /**
59
- * Whether or not to allow WASM usage
60
- */
61
- set allowWasm(v: boolean);
62
- /**
63
- * Whether or not Wasm should be used based on the desired
64
- * feature set, initialization state, or force-use settings
65
- */
66
- get canUseWasm(): boolean;
67
- /**
68
- * Returns a object containing a property for each desired wasm feature
69
- * with a boolean value indicating whether or not the feature is supported
70
- */
71
- get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
72
- /**
73
- * Force use of Wasm
74
- */
75
- get forceWasm(): boolean;
76
- /**
77
- * Whether or not to force Wasm usage
78
- */
79
- set forceWasm(v: boolean);
80
- /**
81
- * Whether or not Wasm is supported based
82
- * on the desired feature set
83
- */
84
- get isDesiredFeatureSetSupported(): boolean;
85
- /**
86
- * Whether or not Wasm detection has been run
87
- * for the desired feature set
88
- */
89
- get isInitialized(): boolean;
90
- /**
91
- * Static creation & async initialization for use where
92
- * async instantiation is possible
93
- * @param desiredFeatures The desired feature set
94
- * @returns An initialized instance of the class with detection
95
- * for the desired feature set
96
- */
97
- static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
98
- /**
99
- * Checks for specific wasm features
100
- * @param features The list of features to check for
101
- * @returns True if all the features are supported, false otherwise
102
- */
103
- featureCheck(features: WasmFeature[]): Promise<boolean>;
104
- /**
105
- * Does feature detection for the desired feature set
106
- */
107
- initialize(): Promise<void>;
108
- protected detectDesiredFeatures(): Promise<void>;
109
- }
110
-
111
- export { WasmFeatureDetectors, WasmSupport };
112
- export type { WasmFeature };
1
+ export * from './WasmSupport.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,112 +1,2 @@
1
- declare const WasmFeatureDetectors: {
2
- readonly bigInt: () => Promise<boolean>;
3
- readonly bulkMemory: () => Promise<boolean>;
4
- readonly exceptions: () => Promise<boolean>;
5
- readonly extendedConst: () => Promise<boolean>;
6
- readonly gc: () => Promise<boolean>;
7
- readonly memory64: () => Promise<boolean>;
8
- readonly multiValue: () => Promise<boolean>;
9
- readonly mutableGlobals: () => Promise<boolean>;
10
- readonly referenceTypes: () => {
11
- new (executor: (resolve: (value: boolean | PromiseLike<boolean>) => void, reject: (reason?: any) => void) => void): Promise<boolean>;
12
- all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
13
- all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
14
- race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
15
- race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
16
- readonly prototype: Promise<any>;
17
- reject<T = never>(reason?: any): Promise<T>;
18
- resolve(): Promise<void>;
19
- resolve<T>(value: T): Promise<Awaited<T>>;
20
- resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
21
- allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
22
- allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
23
- any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
24
- any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
25
- withResolvers<T>(): PromiseWithResolvers<T>;
26
- try<T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U): Promise<Awaited<T>>;
27
- readonly [Symbol.species]: PromiseConstructor;
28
- };
29
- readonly relaxedSimd: () => Promise<boolean>;
30
- readonly saturatedFloatToInt: () => Promise<boolean>;
31
- readonly signExtensions: () => Promise<boolean>;
32
- readonly simd: () => Promise<boolean>;
33
- readonly streamingCompilation: () => Promise<boolean>;
34
- readonly tailCall: () => Promise<boolean>;
35
- readonly threads: () => Promise<boolean>;
36
- };
37
- type WasmFeature = keyof typeof WasmFeatureDetectors;
38
- declare class WasmSupport {
39
- protected desiredFeatures: WasmFeature[];
40
- private _allowWasm;
41
- private _featureSupport;
42
- private _forceWasm;
43
- private _isInitialized;
44
- private _isWasmFeatureSetSupported;
45
- /**
46
- * Instance constructor for use where async instantiation
47
- * is not possible. Where possible, prefer the static
48
- * create method over use of this constructor directly
49
- * as no initialization (feature detection) is able to
50
- * be done here
51
- * @param desiredFeatures The desired feature set
52
- */
53
- constructor(desiredFeatures: WasmFeature[]);
54
- /**
55
- * Is Wasm allowed
56
- */
57
- get allowWasm(): boolean;
58
- /**
59
- * Whether or not to allow WASM usage
60
- */
61
- set allowWasm(v: boolean);
62
- /**
63
- * Whether or not Wasm should be used based on the desired
64
- * feature set, initialization state, or force-use settings
65
- */
66
- get canUseWasm(): boolean;
67
- /**
68
- * Returns a object containing a property for each desired wasm feature
69
- * with a boolean value indicating whether or not the feature is supported
70
- */
71
- get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
72
- /**
73
- * Force use of Wasm
74
- */
75
- get forceWasm(): boolean;
76
- /**
77
- * Whether or not to force Wasm usage
78
- */
79
- set forceWasm(v: boolean);
80
- /**
81
- * Whether or not Wasm is supported based
82
- * on the desired feature set
83
- */
84
- get isDesiredFeatureSetSupported(): boolean;
85
- /**
86
- * Whether or not Wasm detection has been run
87
- * for the desired feature set
88
- */
89
- get isInitialized(): boolean;
90
- /**
91
- * Static creation & async initialization for use where
92
- * async instantiation is possible
93
- * @param desiredFeatures The desired feature set
94
- * @returns An initialized instance of the class with detection
95
- * for the desired feature set
96
- */
97
- static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
98
- /**
99
- * Checks for specific wasm features
100
- * @param features The list of features to check for
101
- * @returns True if all the features are supported, false otherwise
102
- */
103
- featureCheck(features: WasmFeature[]): Promise<boolean>;
104
- /**
105
- * Does feature detection for the desired feature set
106
- */
107
- initialize(): Promise<void>;
108
- protected detectDesiredFeatures(): Promise<void>;
109
- }
110
-
111
- export { WasmFeatureDetectors, WasmSupport };
112
- export type { WasmFeature };
1
+ export * from './WasmSupport.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,112 +1,2 @@
1
- declare const WasmFeatureDetectors: {
2
- readonly bigInt: () => Promise<boolean>;
3
- readonly bulkMemory: () => Promise<boolean>;
4
- readonly exceptions: () => Promise<boolean>;
5
- readonly extendedConst: () => Promise<boolean>;
6
- readonly gc: () => Promise<boolean>;
7
- readonly memory64: () => Promise<boolean>;
8
- readonly multiValue: () => Promise<boolean>;
9
- readonly mutableGlobals: () => Promise<boolean>;
10
- readonly referenceTypes: () => {
11
- new (executor: (resolve: (value: boolean | PromiseLike<boolean>) => void, reject: (reason?: any) => void) => void): Promise<boolean>;
12
- all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
13
- all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]>; }>;
14
- race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
15
- race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
16
- readonly prototype: Promise<any>;
17
- reject<T = never>(reason?: any): Promise<T>;
18
- resolve(): Promise<void>;
19
- resolve<T>(value: T): Promise<Awaited<T>>;
20
- resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
21
- allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
22
- allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
23
- any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
24
- any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
25
- withResolvers<T>(): PromiseWithResolvers<T>;
26
- try<T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U): Promise<Awaited<T>>;
27
- readonly [Symbol.species]: PromiseConstructor;
28
- };
29
- readonly relaxedSimd: () => Promise<boolean>;
30
- readonly saturatedFloatToInt: () => Promise<boolean>;
31
- readonly signExtensions: () => Promise<boolean>;
32
- readonly simd: () => Promise<boolean>;
33
- readonly streamingCompilation: () => Promise<boolean>;
34
- readonly tailCall: () => Promise<boolean>;
35
- readonly threads: () => Promise<boolean>;
36
- };
37
- type WasmFeature = keyof typeof WasmFeatureDetectors;
38
- declare class WasmSupport {
39
- protected desiredFeatures: WasmFeature[];
40
- private _allowWasm;
41
- private _featureSupport;
42
- private _forceWasm;
43
- private _isInitialized;
44
- private _isWasmFeatureSetSupported;
45
- /**
46
- * Instance constructor for use where async instantiation
47
- * is not possible. Where possible, prefer the static
48
- * create method over use of this constructor directly
49
- * as no initialization (feature detection) is able to
50
- * be done here
51
- * @param desiredFeatures The desired feature set
52
- */
53
- constructor(desiredFeatures: WasmFeature[]);
54
- /**
55
- * Is Wasm allowed
56
- */
57
- get allowWasm(): boolean;
58
- /**
59
- * Whether or not to allow WASM usage
60
- */
61
- set allowWasm(v: boolean);
62
- /**
63
- * Whether or not Wasm should be used based on the desired
64
- * feature set, initialization state, or force-use settings
65
- */
66
- get canUseWasm(): boolean;
67
- /**
68
- * Returns a object containing a property for each desired wasm feature
69
- * with a boolean value indicating whether or not the feature is supported
70
- */
71
- get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>>;
72
- /**
73
- * Force use of Wasm
74
- */
75
- get forceWasm(): boolean;
76
- /**
77
- * Whether or not to force Wasm usage
78
- */
79
- set forceWasm(v: boolean);
80
- /**
81
- * Whether or not Wasm is supported based
82
- * on the desired feature set
83
- */
84
- get isDesiredFeatureSetSupported(): boolean;
85
- /**
86
- * Whether or not Wasm detection has been run
87
- * for the desired feature set
88
- */
89
- get isInitialized(): boolean;
90
- /**
91
- * Static creation & async initialization for use where
92
- * async instantiation is possible
93
- * @param desiredFeatures The desired feature set
94
- * @returns An initialized instance of the class with detection
95
- * for the desired feature set
96
- */
97
- static create(desiredFeatures: WasmFeature[]): Promise<WasmSupport>;
98
- /**
99
- * Checks for specific wasm features
100
- * @param features The list of features to check for
101
- * @returns True if all the features are supported, false otherwise
102
- */
103
- featureCheck(features: WasmFeature[]): Promise<boolean>;
104
- /**
105
- * Does feature detection for the desired feature set
106
- */
107
- initialize(): Promise<void>;
108
- protected detectDesiredFeatures(): Promise<void>;
109
- }
110
-
111
- export { WasmFeatureDetectors, WasmSupport };
112
- export type { WasmFeature };
1
+ export * from './WasmSupport.ts';
2
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/wasm",
3
- "version": "4.1.1",
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,13 +29,13 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/typeof": "^4.13.15",
32
+ "@xylabs/typeof": "^4.13.16",
33
33
  "wasm-feature-detect": "^1.8.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.23",
37
- "@xylabs/tsconfig": "^7.0.0-rc.23",
38
- "@xylabs/vitest-extended": "^4.13.15",
36
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
37
+ "@xylabs/tsconfig": "^7.0.0-rc.27",
38
+ "@xylabs/vitest-extended": "^4.13.16",
39
39
  "typescript": "^5.8.3",
40
40
  "vitest": "^3.2.4"
41
41
  },