@kasplex/kiwi-web
Advanced tools
+7
-2
@@ -1,2 +0,7 @@ | ||
| declare function initialize(wasmUrl?: string): Promise<void>; | ||
| export { initialize }; | ||
| /** | ||
| * wasm-bindgen compatible init input | ||
| */ | ||
| export type WasmInitInput = string | URL | RequestInfo | Response | BufferSource | { | ||
| module_or_path: string | URL | RequestInfo | Response | BufferSource; | ||
| }; | ||
| export declare function initialize(input?: WasmInitInput): Promise<void>; |
+1
-1
| { | ||
| "name": "@kasplex/kiwi-web", | ||
| "version": "1.0.16", | ||
| "version": "1.0.17", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
+16
-0
@@ -81,2 +81,18 @@ # Kasplex Wallet SDK for web - Kiwi | ||
| ## WASM Initialization (Web) | ||
| The Kiwi Web SDK depends on a WebAssembly module (`kaspa_bg.wasm`). | ||
| You must initialize it **once** before using any wallet, RPC, or transaction-related functionality. | ||
| ### Recommended Usage (Browser) | ||
| ```ts | ||
| import { initialize } from '@kasplex/kiwi-web' | ||
| // Recommended: use URL-based initialization for browser environments | ||
| await initialize( | ||
| new URL('/wasm/kaspa_bg.wasm', window.location.origin) | ||
| ) | ||
| ## More Examples | ||
@@ -83,0 +99,0 @@ - For more detailed usage examples, check out our [Examples Directory](./examples/) |
Sorry, the diff of this file is too big to display
12372275
0.04%36799
0.09%