@spirobel/monero-wallet-api 0.3.18 → 0.4.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.
Files changed (49) hide show
  1. package/dist/api.d.ts +5 -2
  2. package/dist/api.js +5 -1
  3. package/dist/io/atomicWrite.js +2 -1
  4. package/dist/io/indexedDB.js +7 -2
  5. package/dist/keypairs-seeds/keypairs.d.ts +21 -0
  6. package/dist/keypairs-seeds/keypairs.js +21 -0
  7. package/dist/node-interaction/binaryEndpoints.d.ts +31 -2
  8. package/dist/node-interaction/binaryEndpoints.js +61 -43
  9. package/dist/node-interaction/jsonEndpoints.d.ts +257 -130
  10. package/dist/node-interaction/jsonEndpoints.js +159 -119
  11. package/dist/node-interaction/nodeUrl.d.ts +21 -6
  12. package/dist/node-interaction/nodeUrl.js +50 -8
  13. package/dist/scanning-syncing/backgroundWorker.d.ts +9 -6
  14. package/dist/scanning-syncing/backgroundWorker.js +76 -39
  15. package/dist/scanning-syncing/blocksbuffer/blocksBufferFetchLoop.d.ts +44 -0
  16. package/dist/scanning-syncing/blocksbuffer/blocksBufferFetchLoop.js +353 -0
  17. package/dist/scanning-syncing/blocksbuffer/blocksbufferCoordination.d.ts +15 -0
  18. package/dist/scanning-syncing/blocksbuffer/blocksbufferCoordination.js +27 -0
  19. package/dist/scanning-syncing/{scanresult → blocksbuffer}/getBlocksbinBuffer.d.ts +5 -5
  20. package/dist/scanning-syncing/{scanresult → blocksbuffer}/getBlocksbinBuffer.js +7 -5
  21. package/dist/scanning-syncing/connectionStatus.d.ts +33 -9
  22. package/dist/scanning-syncing/connectionStatus.js +89 -19
  23. package/dist/scanning-syncing/scanSettings.d.ts +11 -0
  24. package/dist/scanning-syncing/scanSettings.js +20 -0
  25. package/dist/scanning-syncing/scanresult/reorg.d.ts +0 -11
  26. package/dist/scanning-syncing/scanresult/reorg.js +39 -16
  27. package/dist/scanning-syncing/scanresult/scanCache.d.ts +16 -2
  28. package/dist/scanning-syncing/scanresult/scanCache.js +58 -2
  29. package/dist/scanning-syncing/scanresult/scanCacheOpened.d.ts +18 -0
  30. package/dist/scanning-syncing/scanresult/scanCacheOpened.js +56 -11
  31. package/dist/scanning-syncing/scanresult/scanCoordination.d.ts +127 -0
  32. package/dist/scanning-syncing/scanresult/scanCoordination.js +611 -0
  33. package/dist/scanning-syncing/scanresult/scanLoop.d.ts +20 -0
  34. package/dist/scanning-syncing/scanresult/scanLoop.js +116 -0
  35. package/dist/scanning-syncing/scanresult/scanResult.d.ts +24 -3
  36. package/dist/scanning-syncing/scanresult/scanResult.js +151 -98
  37. package/dist/scanning-syncing/worker-entrypoints/worker.js +1 -1
  38. package/dist/scanning-syncing/worker-mains/coordinator-main.d.ts +1 -0
  39. package/dist/scanning-syncing/worker-mains/coordinator-main.js +23 -0
  40. package/dist/scanning-syncing/worker-mains/cpubound-main.d.ts +5 -0
  41. package/dist/scanning-syncing/worker-mains/cpubound-main.js +112 -0
  42. package/dist/scanning-syncing/worker-mains/worker.d.ts +1 -1
  43. package/dist/scanning-syncing/worker-mains/worker.js +58 -6
  44. package/dist/viewpair/ViewPair.d.ts +30 -7
  45. package/dist/viewpair/ViewPair.js +56 -118
  46. package/dist/wasm-processing/wasmFile.js +1 -1
  47. package/package.json +22 -24
  48. package/dist/io/extension.d.ts +0 -18
  49. package/dist/io/extension.js +0 -11
package/package.json CHANGED
@@ -1,20 +1,26 @@
1
1
  {
2
2
  "name": "@spirobel/monero-wallet-api",
3
- "license": "MIT",
4
- "module": "dist/api.js",
5
- "type": "module",
3
+ "version": "0.4.0",
6
4
  "main": "dist/api.js",
7
- "types": "dist/api.d.ts",
5
+ "module": "dist/api.js",
6
+ "devDependencies": {
7
+ "@types/bun": "latest"
8
+ },
9
+ "peerDependencies": {
10
+ "typescript": "5.9.3"
11
+ },
8
12
  "exports": {
9
- ".": {
10
- "types": "./dist/api.d.ts",
11
- "import": "./dist/api.js"
13
+ ".": {
14
+ "types": "./dist/api.d.ts",
15
+ "import": "./dist/api.js"
16
+ },
17
+ "./tools": {
18
+ "types": "./dist/tools/monero-tools.d.ts",
19
+ "import": "./dist/tools/monero-tools.js"
20
+ }
12
21
  },
13
- "./tools": {
14
- "types": "./dist/tools/monero-tools.d.ts",
15
- "import": "./dist/tools/monero-tools.js"
16
- }
17
- },
22
+ "files": ["dist"],
23
+ "license": "MIT",
18
24
  "publishConfig": {
19
25
  "access": "public"
20
26
  },
@@ -29,6 +35,7 @@
29
35
  "sumworker": "cat dist/scanning-syncing/worker-entrypoints/worker.js | sha256sum > worker_checksum.txt",
30
36
  "inlinesumworker": "bun run inlinesumwasm && bun run safewasm && bun run copydevwasm && bun run inlineworker && bun run sumworker && bun run restorewasm",
31
37
  "inlinesum": "bun run inlinesumworker",
38
+ "buildtypescript": "tsc",
32
39
  "safeworker": "cp wallet-api/scanning-syncing/worker-entrypoints/worker.ts wallet-api/scanning-syncing/worker-entrypoints/worker.ts.backup",
33
40
  "restoreworker": "mv wallet-api/scanning-syncing/worker-entrypoints/worker.ts.backup wallet-api/scanning-syncing/worker-entrypoints/worker.ts",
34
41
  "copydevworker": "cp dist/scanning-syncing/worker-entrypoints/worker.js wallet-api/scanning-syncing/worker-entrypoints/worker.ts",
@@ -36,18 +43,9 @@
36
43
  "copydev": "bun run safewasm && bun run safeworker && bun run copydevworker && bun run copydevwasm",
37
44
  "restoredev": "bun run restorewasm && bun run restoreworker",
38
45
  "refreshdev": "bun run restoredev && bun run inlinesum && bun run copydev",
39
- "build": "tsc",
46
+ "build": "bun run buildtypescript && bun run inlinesum",
40
47
  "clean": "rm -rf ./dist"
41
48
  },
42
- "files": ["dist"],
43
- "version": "0.3.18",
44
- "devDependencies": {
45
- "@types/bun": "latest"
46
- },
47
- "peerDependencies": {
48
- "typescript": "5.9.3"
49
- },
50
- "dependencies": {
51
- "zod": "4.3.6"
52
- }
49
+ "type": "module",
50
+ "types": "dist/api.d.ts"
53
51
  }
@@ -1,18 +0,0 @@
1
- interface ExtensionRuntime {
2
- id: string;
3
- connect?: (extensionId?: string) => any;
4
- sendMessage?: (message: any) => Promise<any> | ((callback: (response: any) => void) => void);
5
- }
6
- interface Chrome {
7
- runtime?: ExtensionRuntime;
8
- }
9
- interface Browser {
10
- runtime?: ExtensionRuntime;
11
- }
12
- declare global {
13
- var chrome: Chrome | undefined;
14
- var browser: Browser | undefined;
15
- }
16
- export declare function isExtensionContext(): boolean;
17
- export declare function getRuntime(): ExtensionRuntime | null;
18
- export {};
@@ -1,11 +0,0 @@
1
- export function isExtensionContext() {
2
- return !!((typeof chrome !== "undefined" && chrome.runtime?.id) ||
3
- (typeof browser !== "undefined" && browser.runtime?.id));
4
- }
5
- export function getRuntime() {
6
- if (chrome?.runtime?.id)
7
- return chrome.runtime;
8
- if (browser?.runtime?.id)
9
- return browser.runtime;
10
- return null;
11
- }