@polkadot/wasm-bridge
Advanced tools
Comparing version 7.2.1 to 7.2.2
@@ -7,3 +7,3 @@ import type { BridgeBase, InitFn, WasmBaseInstance } from './types.js'; | ||
* | ||
* For any bridge it is passed an function white is then called internally at the | ||
* For any bridge it is passed an function which is then called internally at the | ||
* time of initialization. This affectively implements the layer between WASM and | ||
@@ -10,0 +10,0 @@ * the native environment, providing all the plumbing needed for the Wbg classes. |
@@ -8,3 +8,3 @@ import { stringToU8a, u8aToString } from '@polkadot/util'; | ||
* | ||
* For any bridge it is passed an function white is then called internally at the | ||
* For any bridge it is passed an function which is then called internally at the | ||
* time of initialization. This affectively implements the layer between WASM and | ||
@@ -11,0 +11,0 @@ * the native environment, providing all the plumbing needed for the Wbg classes. |
@@ -11,3 +11,3 @@ "use strict"; | ||
* | ||
* For any bridge it is passed an function white is then called internally at the | ||
* For any bridge it is passed an function which is then called internally at the | ||
* time of initialization. This affectively implements the layer between WASM and | ||
@@ -14,0 +14,0 @@ * the native environment, providing all the plumbing needed for the Wbg classes. |
@@ -20,3 +20,3 @@ "use strict"; | ||
try { | ||
if (!wasmBytes || !wasmBytes.length) { | ||
if (!wasmBytes?.length) { | ||
throw new Error('No WebAssembly provided for initialization'); | ||
@@ -23,0 +23,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.packageInfo = void 0; | ||
exports.packageInfo = { name: '@polkadot/wasm-bridge', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '7.2.1' }; | ||
exports.packageInfo = { name: '@polkadot/wasm-bridge', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '7.2.2' }; |
@@ -10,2 +10,2 @@ import type { InitFn, WasmBaseInstance, WasmImports } from './types.js'; | ||
*/ | ||
export declare function createWasmFn<C extends WasmBaseInstance>(root: string, wasmBytes: null | Uint8Array, asmFn: null | ((wbg: WasmImports) => C)): InitFn<C>; | ||
export declare function createWasmFn<C extends WasmBaseInstance>(root: 'crypto', wasmBytes: null | Uint8Array, asmFn: null | ((wbg: WasmImports) => C)): InitFn<C>; |
@@ -17,3 +17,3 @@ /** | ||
try { | ||
if (!wasmBytes || !wasmBytes.length) { | ||
if (!wasmBytes?.length) { | ||
throw new Error('No WebAssembly provided for initialization'); | ||
@@ -20,0 +20,0 @@ } |
@@ -21,3 +21,3 @@ { | ||
"type": "module", | ||
"version": "7.2.1", | ||
"version": "7.2.2", | ||
"main": "./cjs/index.js", | ||
@@ -95,4 +95,4 @@ "module": "./index.js", | ||
"dependencies": { | ||
"@polkadot/wasm-util": "7.2.1", | ||
"tslib": "^2.5.0" | ||
"@polkadot/wasm-util": "7.2.2", | ||
"tslib": "^2.6.1" | ||
}, | ||
@@ -99,0 +99,0 @@ "peerDependencies": { |
@@ -1,1 +0,1 @@ | ||
export const packageInfo = { name: '@polkadot/wasm-bridge', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '7.2.1' }; | ||
export const packageInfo = { name: '@polkadot/wasm-bridge', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '7.2.2' }; |
export type WasmImports = Record<string, (...args: never[]) => unknown>; | ||
export type WasmMemory = { | ||
export interface WasmMemory { | ||
buffer: ArrayBuffer; | ||
}; | ||
} | ||
export declare interface InitResult<C extends WasmBaseInstance> { | ||
@@ -27,4 +27,3 @@ error: string | null; | ||
} | ||
export interface WasmBaseInstance { | ||
memory: WasmMemory; | ||
export interface WasmBindGen { | ||
__wbindgen_exn_store(a: number): void; | ||
@@ -35,1 +34,4 @@ __wbindgen_free(a: number, b: number): void; | ||
} | ||
export interface WasmBaseInstance extends WasmBindGen { | ||
memory: WasmMemory; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39825
741
+ Added@polkadot/wasm-util@7.2.2(transitive)
- Removed@polkadot/wasm-util@7.2.1(transitive)
Updated@polkadot/wasm-util@7.2.2
Updatedtslib@^2.6.1