onekey-monero-runtime 0.1.0-alpha.1 → 0.1.0-alpha.2

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.
@@ -143,6 +143,7 @@ export function rewindTo(account_id: bigint, height: bigint, tip: bigint): strin
143
143
  *
144
144
  * The old node is dropped before connecting the new one: a replaced or disabled
145
145
  * node must receive no further requests, even if the new one fails to connect.
146
+ * If calls overlap, the last one wins.
146
147
  */
147
148
  export function setNodeUrl(url: string): Promise<void>;
148
149
 
@@ -173,6 +174,11 @@ export function signTransaction(signable_hex: string, spend_private_key_hex: str
173
174
  */
174
175
  export function spendScalar(bip32_private_key_hex: string): string;
175
176
 
177
+ /**
178
+ * Preserve a failed call's result, then retire its poisoned storage owner.
179
+ */
180
+ export function storageRequiresWorkerRestart(): boolean;
181
+
176
182
  /**
177
183
  * Read-only scan progress; no network requests. Shows which ranges sync intends to scan.
178
184
  */
@@ -231,6 +237,7 @@ export interface InitOutput {
231
237
  readonly setRequestHandler: (a: number) => void;
232
238
  readonly signTransaction: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
233
239
  readonly spendScalar: (a: number, b: number) => [number, number, number, number];
240
+ readonly storageRequiresWorkerRestart: () => number;
234
241
  readonly syncPeek: (a: bigint) => [number, number, number, number];
235
242
  readonly syncStep: (a: bigint, b: bigint) => any;
236
243
  readonly transactionDetails: (a: bigint, b: number, c: number) => [number, number, number, number];
@@ -525,6 +525,7 @@ export function rewindTo(account_id, height, tip) {
525
525
  *
526
526
  * The old node is dropped before connecting the new one: a replaced or disabled
527
527
  * node must receive no further requests, even if the new one fails to connect.
528
+ * If calls overlap, the last one wins.
528
529
  * @param {string} url
529
530
  * @returns {Promise<void>}
530
531
  */
@@ -613,6 +614,15 @@ export function spendScalar(bip32_private_key_hex) {
613
614
  }
614
615
  }
615
616
 
617
+ /**
618
+ * Preserve a failed call's result, then retire its poisoned storage owner.
619
+ * @returns {boolean}
620
+ */
621
+ export function storageRequiresWorkerRestart() {
622
+ const ret = wasm.storageRequiresWorkerRestart();
623
+ return ret !== 0;
624
+ }
625
+
616
626
  /**
617
627
  * Read-only scan progress; no network requests. Shows which ranges sync intends to scan.
618
628
  * @param {bigint} account_id
@@ -807,6 +817,9 @@ function __wbg_get_imports() {
807
817
  const ret = clearTimeout(arg0);
808
818
  return ret;
809
819
  },
820
+ __wbg_close_cffebe146c546247: function(arg0) {
821
+ arg0.close();
822
+ },
810
823
  __wbg_createSyncAccessHandle_e383ed6b08d0e3ee: function(arg0) {
811
824
  const ret = arg0.createSyncAccessHandle();
812
825
  return ret;
@@ -1161,7 +1174,7 @@ function __wbg_get_imports() {
1161
1174
  return ret;
1162
1175
  }, arguments); },
1163
1176
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1164
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 956, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1177
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 941, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1165
1178
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h7657f6f35500acf9);
1166
1179
  return ret;
1167
1180
  },
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "onekey-monero-runtime",
3
3
  "type": "module",
4
4
  "description": "OneKey Monero Runtime: wallet state over monero-oxide, persisted in SQLite",
5
- "version": "0.1.0-alpha.1",
5
+ "version": "0.1.0-alpha.2",
6
6
  "license": "Apache-2.0",
7
7
  "files": [
8
8
  "onekey_monero_runtime.js",