@spirobel/monero-wallet-api 0.4.1 → 0.5.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/README.md +80 -8
- package/dist/api.d.ts +4 -0
- package/dist/api.js +4 -0
- package/dist/io/logging.d.ts +4 -4
- package/dist/io/logging.js +2 -0
- package/dist/keypairs-seeds/keypairs.d.ts +8 -0
- package/dist/keypairs-seeds/keypairs.js +31 -3
- package/dist/multisig/DistributedKeyGenerator.d.ts +125 -0
- package/dist/multisig/DistributedKeyGenerator.js +197 -0
- package/dist/multisig/MultiSigTxSigner.d.ts +68 -0
- package/dist/multisig/MultiSigTxSigner.js +123 -0
- package/dist/multisig/escrow.d.ts +58 -0
- package/dist/multisig/escrow.js +104 -0
- package/dist/multisig/multisig.d.ts +36 -0
- package/dist/multisig/multisig.js +140 -0
- package/dist/node-interaction/nodeUrl.js +2 -1
- package/dist/scanning-syncing/backgroundWorker.d.ts +1 -0
- package/dist/scanning-syncing/backgroundWorker.js +1 -1
- package/dist/scanning-syncing/scanSettings.d.ts +1 -0
- package/dist/scanning-syncing/scanSettings.js +9 -3
- package/dist/scanning-syncing/scanresult/computeKeyImage.d.ts +2 -1
- package/dist/scanning-syncing/scanresult/computeKeyImage.js +4 -2
- package/dist/scanning-syncing/scanresult/scanCacheOpened.d.ts +11 -0
- package/dist/scanning-syncing/scanresult/scanCacheOpened.js +104 -11
- package/dist/scanning-syncing/scanresult/scanResult.js +7 -3
- package/dist/scanning-syncing/worker-entrypoints/worker.js +1 -1
- package/dist/scanning-syncing/worker-mains/multisig-main.d.ts +13 -0
- package/dist/scanning-syncing/worker-mains/multisig-main.js +31 -0
- package/dist/scanning-syncing/worker-mains/worker.js +12 -0
- package/dist/send-functionality/multisig.d.ts +72 -0
- package/dist/send-functionality/multisig.js +97 -0
- package/dist/send-functionality/transactionBuilding.d.ts +1 -0
- package/dist/send-functionality/transactionBuilding.js +23 -2
- package/dist/viewpair/ViewPair.d.ts +8 -0
- package/dist/viewpair/ViewPair.js +16 -8
- package/dist/wasm-processing/wasmFile.d.ts +1 -0
- package/dist/wasm-processing/wasmFile.js +8 -3
- package/dist/wasm-processing/wasmProcessor.d.ts +2 -2
- package/dist/wasm-processing/wasmProcessor.js +4 -5
- package/package.json +6 -2
|
@@ -85,6 +85,6 @@ export declare class WasmProcessor {
|
|
|
85
85
|
readString: (ptr: number, len: number) => string;
|
|
86
86
|
tinywasi: TinyWASI;
|
|
87
87
|
protected constructor();
|
|
88
|
-
initWasmModule(): Promise<TinyWASI>;
|
|
89
|
-
static init(): Promise<WasmProcessor>;
|
|
88
|
+
initWasmModule(wasm_module: Uint8Array<ArrayBuffer>): Promise<TinyWASI>;
|
|
89
|
+
static init(wasm_module: Uint8Array<ArrayBuffer>): Promise<WasmProcessor>;
|
|
90
90
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TinyWASI } from "./wasi";
|
|
2
|
-
import { monero_wallet_api_wasm } from "./wasmFile";
|
|
3
2
|
export class WasmProcessor {
|
|
4
3
|
/**
|
|
5
4
|
* This method is invoked whenever a Rust function expects an array or string parameter.
|
|
@@ -103,7 +102,7 @@ export class WasmProcessor {
|
|
|
103
102
|
};
|
|
104
103
|
tinywasi;
|
|
105
104
|
constructor() { }
|
|
106
|
-
async initWasmModule() {
|
|
105
|
+
async initWasmModule(wasm_module) {
|
|
107
106
|
const tinywasi = new TinyWASI();
|
|
108
107
|
this.tinywasi = tinywasi;
|
|
109
108
|
const imports = {
|
|
@@ -120,13 +119,13 @@ export class WasmProcessor {
|
|
|
120
119
|
},
|
|
121
120
|
...tinywasi.imports,
|
|
122
121
|
};
|
|
123
|
-
const { module, instance } = await WebAssembly.instantiate(
|
|
122
|
+
const { module, instance } = await WebAssembly.instantiate(wasm_module, imports);
|
|
124
123
|
tinywasi.initialize(instance);
|
|
125
124
|
return tinywasi;
|
|
126
125
|
}
|
|
127
|
-
static async init() {
|
|
126
|
+
static async init(wasm_module) {
|
|
128
127
|
const wasmProcessor = new WasmProcessor();
|
|
129
|
-
await wasmProcessor.initWasmModule();
|
|
128
|
+
await wasmProcessor.initWasmModule(wasm_module);
|
|
130
129
|
return wasmProcessor;
|
|
131
130
|
}
|
|
132
131
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spirobel/monero-wallet-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"main": "dist/api.js",
|
|
5
5
|
"module": "dist/api.js",
|
|
6
6
|
"devDependencies": {
|
|
@@ -47,5 +47,9 @@
|
|
|
47
47
|
"clean": "rm -rf ./dist"
|
|
48
48
|
},
|
|
49
49
|
"type": "module",
|
|
50
|
-
"types": "dist/api.d.ts"
|
|
50
|
+
"types": "dist/api.d.ts",
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@noble/curves": "2.2.0",
|
|
53
|
+
"@noble/hashes": "2.2.0"
|
|
54
|
+
}
|
|
51
55
|
}
|