pshenmic-dpp 1.1.0-dev.7 → 1.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.
- package/dist/wasm/index.d.ts +3 -3
- package/dist/wasm/index.js +1 -1
- package/dist/wasm/initAsync.d.ts +2 -4
- package/dist/wasm/initAsync.js +5 -5
- package/dist/wasm/initInterface.d.ts +1 -3
- package/dist/wasm/initInterface.js +4 -3
- package/dist/wasm/initWASM.d.ts +1 -2
- package/dist/wasm/initWASM.js +4 -4
- package/dist/wasm/pshenmic_dpp.d.ts +2139 -2018
- package/dist/wasm/pshenmic_dpp.js +7716 -7568
- package/dist/wasm/pshenmic_dpp_bg.d.ts +3 -0
- package/dist/wasm/pshenmic_dpp_bg.js +2 -1
- package/dist/wasm/pshenmic_dpp_bg.wasm.d.ts +1011 -1008
- package/dist/wasm/pshenmic_dpp_zipped.d.ts +3 -0
- package/dist/wasm/pshenmic_dpp_zipped.js +2 -1
- package/package.json +7 -2
- package/tests/AsyncImportTest.spec.cjs +2 -2
package/dist/wasm/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as DPP from './pshenmic_dpp.js';
|
|
2
2
|
|
|
3
|
-
export * from './pshenmic_dpp.js'
|
|
3
|
+
export * from './pshenmic_dpp.js';
|
|
4
4
|
|
|
5
|
-
export * from './base122.js'
|
|
5
|
+
export * from './base122.js';
|
|
6
6
|
|
|
7
|
-
export default dpp;
|
|
8
7
|
|
|
9
8
|
declare const dpp: DashPlatformProtocolWASM;
|
|
9
|
+
export default dpp;
|
|
10
10
|
|
|
11
11
|
export class DashPlatformProtocolWASM {
|
|
12
12
|
// CLASSES
|
package/dist/wasm/index.js
CHANGED
package/dist/wasm/initAsync.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type {DashPlatformProtocolWASM} from "./index.d.ts";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default initModule;
|
|
6
|
-
export type { DashPlatformProtocolWASM } from './index.d.ts';
|
|
3
|
+
export type { DashPlatformProtocolWASM } from './index.d.ts';
|
|
4
|
+
export function initModule(): Promise<DashPlatformProtocolWASM>
|
package/dist/wasm/initAsync.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import initWASM from './initWASM.js'
|
|
2
|
-
import
|
|
1
|
+
import {initWASM} from './initWASM.js'
|
|
2
|
+
import {initInterface} from './initInterface.js'
|
|
3
3
|
|
|
4
4
|
// eslint-disable-next-line
|
|
5
5
|
let dpp
|
|
@@ -8,13 +8,13 @@ let dpp
|
|
|
8
8
|
* Asynchronously initialization for compressed module (reduced size)
|
|
9
9
|
* @returns {Promise<*>}
|
|
10
10
|
*/
|
|
11
|
-
async function initModule
|
|
11
|
+
async function initModule() {
|
|
12
12
|
const wasm = await initWASM()
|
|
13
|
-
const wasmInterface = await
|
|
13
|
+
const wasmInterface = await initInterface()
|
|
14
14
|
|
|
15
15
|
dpp = wasmInterface.initSync(wasm)
|
|
16
16
|
|
|
17
17
|
return wasmInterface
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export
|
|
20
|
+
export {initModule}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import wasmInterfaceBytes from './pshenmic_dpp_zipped.js'
|
|
1
|
+
import {bytes as wasmInterfaceBytes} from './pshenmic_dpp_zipped.js'
|
|
2
2
|
import { decode } from './base122.js'
|
|
3
3
|
|
|
4
4
|
export * from './base122.js'
|
|
@@ -23,7 +23,8 @@ async function initInterface () {
|
|
|
23
23
|
|
|
24
24
|
const context = vm.createContext({
|
|
25
25
|
crypto,
|
|
26
|
-
TextDecoder
|
|
26
|
+
TextDecoder,
|
|
27
|
+
TextEncoder
|
|
27
28
|
})
|
|
28
29
|
const vmModule = new vm.Script(moduleText)
|
|
29
30
|
|
|
@@ -42,4 +43,4 @@ async function initInterface () {
|
|
|
42
43
|
return module
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
export
|
|
46
|
+
export { initInterface }
|
package/dist/wasm/initWASM.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default _default;
|
|
1
|
+
export function initWASM(): Promise<ArrayBuffer>;
|
package/dist/wasm/initWASM.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import wasmBytes from './pshenmic_dpp_bg.js'
|
|
2
|
-
import {
|
|
1
|
+
import {bytes as wasmBytes} from './pshenmic_dpp_bg.js'
|
|
2
|
+
import {decode} from './base122.js'
|
|
3
3
|
|
|
4
4
|
export * from './base122.js'
|
|
5
5
|
|
|
@@ -16,7 +16,7 @@ const interfaceBlob = new Blob([interfaceBytes])
|
|
|
16
16
|
* Convert wasm bin string to Uint8Array with decompression via DecompressionStream
|
|
17
17
|
* @returns {Promise<ArrayBuffer>}
|
|
18
18
|
*/
|
|
19
|
-
async function initWASM
|
|
19
|
+
async function initWASM() {
|
|
20
20
|
const decompressionStream = new DecompressionStream('gzip')
|
|
21
21
|
const decompressedStream = interfaceBlob.stream().pipeThrough(decompressionStream)
|
|
22
22
|
const decompressedResponse = new Response(decompressedStream)
|
|
@@ -25,4 +25,4 @@ async function initWASM () {
|
|
|
25
25
|
return module
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export
|
|
28
|
+
export {initWASM}
|