@xstoicunicornx/payjoin_test 0.1.6 → 0.1.8

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 (41) hide show
  1. package/README.md +44 -3
  2. package/dist/{generated/payjoin_ffi.d.ts → nodejs/bindings/payjoin.d.ts} +3078 -324
  3. package/dist/nodejs/bindings/payjoin.d.ts.map +1 -0
  4. package/dist/{generated/payjoin_ffi.js → nodejs/bindings/payjoin.js} +5754 -2165
  5. package/dist/nodejs/bindings/payjoin.js.map +1 -0
  6. package/dist/{generated → nodejs/bindings}/wasm-bindgen/index.d.ts +459 -136
  7. package/dist/{generated → nodejs/bindings}/wasm-bindgen/index.js +2712 -965
  8. package/dist/nodejs/bindings/wasm-bindgen/index_bg.wasm +0 -0
  9. package/dist/{generated → nodejs/bindings}/wasm-bindgen/index_bg.wasm.d.ts +715 -569
  10. package/dist/nodejs/index.d.ts +8 -0
  11. package/dist/nodejs/index.d.ts.map +1 -0
  12. package/dist/{index.js → nodejs/index.js} +3 -7
  13. package/dist/nodejs/index.js.map +1 -0
  14. package/dist/web/bindings/payjoin.d.ts +6865 -0
  15. package/dist/web/bindings/payjoin.d.ts.map +1 -0
  16. package/dist/web/bindings/payjoin.js +14435 -0
  17. package/dist/web/bindings/payjoin.js.map +1 -0
  18. package/dist/web/bindings/wasm-bindgen/index.d.ts +2504 -0
  19. package/dist/web/bindings/wasm-bindgen/index.js +6808 -0
  20. package/dist/web/bindings/wasm-bindgen/index_bg.wasm +0 -0
  21. package/dist/web/bindings/wasm-bindgen/index_bg.wasm.d.ts +1211 -0
  22. package/dist/web/index.d.ts +8 -0
  23. package/dist/web/index.d.ts.map +1 -0
  24. package/dist/web/index.js +20 -0
  25. package/dist/web/index.js.map +1 -0
  26. package/dist/web/vite.index.d.ts +8 -0
  27. package/dist/web/vite.index.d.ts.map +1 -0
  28. package/dist/web/vite.index.js +24 -0
  29. package/dist/web/vite.index.js.map +1 -0
  30. package/package.json +44 -37
  31. package/dist/generated/bitcoin.d.ts +0 -4633
  32. package/dist/generated/bitcoin.d.ts.map +0 -1
  33. package/dist/generated/bitcoin.js +0 -3861
  34. package/dist/generated/bitcoin.js.map +0 -1
  35. package/dist/generated/payjoin_ffi.d.ts.map +0 -1
  36. package/dist/generated/payjoin_ffi.js.map +0 -1
  37. package/dist/generated/wasm-bindgen/index_bg.wasm +0 -0
  38. package/dist/index.d.ts +0 -11
  39. package/dist/index.d.ts.map +0 -1
  40. package/dist/index.js.map +0 -1
  41. package/dist/index.web.js +0 -30
@@ -0,0 +1,8 @@
1
+ export * from "./bindings/payjoin.js";
2
+ import * as payjoin from "./bindings/payjoin.js";
3
+ export declare function uniffiInitAsync(): Promise<void>;
4
+ declare const _default: {
5
+ payjoin: typeof payjoin;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAC;AAKtC,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AAKjD,wBAAsB,eAAe,kBAOpC;;;;AAGD,wBAEE"}
@@ -0,0 +1,20 @@
1
+ // Export the generated bindings to the app.
2
+ export * from "./bindings/payjoin.js";
3
+ // Now import the bindings so we can:
4
+ // - initialize them
5
+ // - export them as namespaced objects as the default export.
6
+ import * as payjoin from "./bindings/payjoin.js";
7
+ import initAsync from "./bindings/wasm-bindgen/index.js";
8
+ import wasmPath from "./bindings/wasm-bindgen/index_bg.wasm";
9
+ export async function uniffiInitAsync() {
10
+ await initAsync({ module_or_path: wasmPath });
11
+ // Initialize the generated bindings: mostly checksums, but also callbacks.
12
+ // - the boolean flag ensures this loads exactly once, even if the JS code
13
+ // is reloaded (e.g. during development with metro).
14
+ payjoin.default.initialize();
15
+ }
16
+ // Export the crates as individually namespaced objects.
17
+ export default {
18
+ payjoin,
19
+ };
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,cAAc,uBAAuB,CAAC;AAEtC,qCAAqC;AACrC,oBAAoB;AACpB,6DAA6D;AAC7D,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AAEjD,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,QAAQ,MAAM,uCAAuC,CAAC;AAE7D,MAAM,CAAC,KAAK,UAAU,eAAe;IACjC,MAAM,SAAS,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE9C,2EAA2E;IAC3E,0EAA0E;IAC1E,sDAAsD;IACtD,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;AACjC,CAAC;AAED,wDAAwD;AACxD,eAAe;IACX,OAAO;CACV,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from "./bindings/payjoin.js";
2
+ import * as payjoin from "./bindings/payjoin.js";
3
+ export declare function uniffiInitAsync(): Promise<void>;
4
+ declare const _default: {
5
+ payjoin: typeof payjoin;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=vite.index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.index.d.ts","sourceRoot":"","sources":["../../src/web/vite.index.ts"],"names":[],"mappings":"AAIA,cAAc,uBAAuB,CAAC;AAKtC,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AAMjD,wBAAsB,eAAe,kBAOpC;;;;AAGD,wBAEE"}
@@ -0,0 +1,24 @@
1
+ // Export the generated bindings to the app.
2
+ // This should be exactly the same as web/index.js
3
+ // except for the `?url` appended to the wasmPath to
4
+ // support limitations of how Vite loads wasm files
5
+ export * from "./bindings/payjoin.js";
6
+ // Now import the bindings so we can:
7
+ // - initialize them
8
+ // - export them as namespaced objects as the default export.
9
+ import * as payjoin from "./bindings/payjoin.js";
10
+ import initAsync from "./bindings/wasm-bindgen/index.js";
11
+ // @ts-ignore
12
+ import wasmPath from "./bindings/wasm-bindgen/index_bg.wasm?url";
13
+ export async function uniffiInitAsync() {
14
+ await initAsync({ module_or_path: wasmPath });
15
+ // Initialize the generated bindings: mostly checksums, but also callbacks.
16
+ // - the boolean flag ensures this loads exactly once, even if the JS code
17
+ // is reloaded (e.g. during development with metro).
18
+ payjoin.default.initialize();
19
+ }
20
+ // Export the crates as individually namespaced objects.
21
+ export default {
22
+ payjoin,
23
+ };
24
+ //# sourceMappingURL=vite.index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.index.js","sourceRoot":"","sources":["../../src/web/vite.index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,kDAAkD;AAClD,oDAAoD;AACpD,mDAAmD;AACnD,cAAc,uBAAuB,CAAC;AAEtC,qCAAqC;AACrC,oBAAoB;AACpB,6DAA6D;AAC7D,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AAEjD,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,aAAa;AACb,OAAO,QAAQ,MAAM,2CAA2C,CAAC;AAEjE,MAAM,CAAC,KAAK,UAAU,eAAe;IACjC,MAAM,SAAS,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE9C,2EAA2E;IAC3E,0EAA0E;IAC1E,sDAAsD;IACtD,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;AACjC,CAAC;AAED,wDAAwD;AACxD,eAAe;IACX,OAAO;CACV,CAAC"}
package/package.json CHANGED
@@ -1,39 +1,46 @@
1
1
  {
2
- "name": "@xstoicunicornx/payjoin_test",
3
- "version": "0.1.6",
4
- "description": "JavaScript/WASM bindings for rust-payjoin",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "browser": "dist/index.web.js",
9
- "scripts": {
10
- "ubrn:web": "ubrn build web --and-generate",
11
- "compile": "tsc",
12
- "copy-wasm": "mkdir -p dist/generated && cp -r src/generated/wasm-bindgen dist/generated/",
13
- "fix-imports": "node scripts/fix-imports.js",
14
- "build": "npm run ubrn:web && npm run compile && npm run copy-wasm && npm run fix-imports",
15
- "build:test-utils": "cd test-utils && npm install && npx @napi-rs/cli build",
16
- "clean": "rm -rf rust_modules dist src/generated",
17
- "test": "tsx --test test/unit.test.ts test/integration.test.ts"
18
- },
19
- "files": [
20
- "dist/**/*"
21
- ],
22
- "keywords": [
23
- "payjoin",
24
- "bitcoin",
25
- "wasm",
26
- "rust"
27
- ],
28
- "devDependencies": {
29
- "prettier": "^3.6.2",
30
- "tsx": "^4.20.6",
31
- "typescript": "^5.9.3",
32
- "uniffi-bindgen-react-native": "github:spacebear21/uniffi-bindgen-react-native#tsconfig-module-nodenext"
33
- },
34
- "repository": {
35
- "type": "git",
36
- "url": "https://github.com/payjoin/rust-payjoin.git",
37
- "directory": "payjoin-ffi/javascript"
38
- }
2
+ "name": "@xstoicunicornx/payjoin_test",
3
+ "version": "0.1.8",
4
+ "description": "JavaScript/WASM bindings for rust-payjoin",
5
+ "scripts": {
6
+ "ubrn:nodejs": "ubrn build web --config ubrn.nodejs.config.yaml --and-generate",
7
+ "copy-wasm:nodejs": "cp -r src/nodejs/bindings/wasm-bindgen dist/nodejs/bindings/",
8
+ "ubrn:web": "ubrn build web --config ubrn.web.config.yaml --and-generate",
9
+ "copy-wasm:web": "cp -r src/web/bindings/wasm-bindgen dist/web/bindings/",
10
+ "ubrn": "npm run ubrn:nodejs && npm run ubrn:web",
11
+ "compile": "tsc",
12
+ "copy-wasm": "npm run copy-wasm:nodejs && npm run copy-wasm:web",
13
+ "build": "npm run ubrn && npm run compile && npm run copy-wasm",
14
+ "build:test-utils": "cd test-utils && npm install && npx @napi-rs/cli build",
15
+ "clean": "rm -rf rust_modules dist src/**/*.js src/*/bindings/",
16
+ "test": "tsx --test test/unit.test.ts test/integration.test.ts"
17
+ },
18
+ "files": [
19
+ "dist/**/*"
20
+ ],
21
+ "keywords": [
22
+ "payjoin",
23
+ "bitcoin",
24
+ "wasm",
25
+ "rust"
26
+ ],
27
+ "devDependencies": {
28
+ "prettier": "^3.6.2",
29
+ "tsx": "^4.20.6",
30
+ "typescript": "^5.9.3"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/payjoin/rust-payjoin.git",
35
+ "directory": "payjoin-ffi/javascript"
36
+ },
37
+ "exports": {
38
+ ".": "./dist/nodejs/index.js",
39
+ "./nodejs": "./dist/nodejs/index.js",
40
+ "./web": "./dist/web/index.js",
41
+ "./web-vite": "./dist/web/vite.index.js"
42
+ },
43
+ "dependencies": {
44
+ "uniffi-bindgen-react-native": "github:spacebear21/uniffi-bindgen-react-native#tsconfig-module-nodenext"
45
+ }
39
46
  }