diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 910d977..b3fc7e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -263,7 +263,12 @@ jobs: node-version-file: .nvmrc registry-url: "https://registry.npmjs.org" - # Trusted publishing needs npm 11.5.1 or later. + # Trusted publishing needs npm 11.5.1 or later, and Node 22.14.0 or later + # (pinned in .nvmrc). Neither shows up in a dry run, which never + # authenticates. When the token exchange fails, npm falls back to the + # placeholder NODE_AUTH_TOKEN that setup-node writes and the registry + # answers "404 Not Found" on the PUT: the same error as a mismatched + # trusted publisher configuration on npmjs.com. - name: "Update npm" run: npm install --global npm@^11.5.1 @@ -288,12 +293,12 @@ jobs: pattern: bindings-* path: bindings - # Both build jobs generate the bindings. They embed checksums of the Rust - # API that uniffi checks at startup, so one set has to be right for both - # platforms. Ship the Android copy only after confirming the two match. + # Both build jobs generate the bindings, and only the Android copy ships. + # The expected API checksums that uniffi verifies at startup live in the + # TypeScript, so that is what has to match. - name: "Check both platforms generated the same bindings" run: | - diff --recursive bindings/bindings-android bindings/bindings-ios + diff --recursive bindings/bindings-android/src bindings/bindings-ios/src cp -R bindings/bindings-android/cpp . mkdir -p src/generated cp -R bindings/bindings-android/src/generated/. src/generated/ diff --git a/.nvmrc b/.nvmrc index 5f53e87..166aae1 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.19.0 +v24.21.0 diff --git a/docs/overview.md b/docs/overview.md index 46ecbc0..da90968 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -10,7 +10,7 @@ npm install bdk-rn The package ships prebuilt native libraries for iOS and Android, so you do not need a Rust toolchain, and nothing is compiled or downloaded at install time. -While 1.x is in prerelease, versions are published under the `next` tag. Install one with `npm install bdk-rn@next`. +Prereleases (betas and release candidates) are published under the `next` tag instead of `latest`, so `npm install bdk-rn` never picks one up. To try the most recent one, run `npm install bdk-rn@next`. ### Requirements diff --git a/example/package.json b/example/package.json index 060271f..b2dab8d 100644 --- a/example/package.json +++ b/example/package.json @@ -9,7 +9,7 @@ "web": "expo start --web" }, "dependencies": { - "bdk-rn": "file:../bdk-rn-1.1.0-alpha.0.tgz", + "bdk-rn": "1.1.0", "expo": "~54.0.33", "expo-status-bar": "~3.0.9", "react": "19.1.0", diff --git a/example/pnpm-lock.yaml b/example/pnpm-lock.yaml index a2df2db..c7b57ed 100644 --- a/example/pnpm-lock.yaml +++ b/example/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: bdk-rn: - specifier: file:../bdk-rn-1.1.0-alpha.0.tgz - version: file:../bdk-rn-1.1.0-alpha.0.tgz(react-native@0.81.5(@babel/core@7.29.0(supports-color@8.1.1))(react@19.1.0)(supports-color@8.1.1))(react@19.1.0) + specifier: 1.1.0 + version: 1.1.0(react-native@0.81.5(@babel/core@7.29.0(supports-color@8.1.1))(react@19.1.0)(supports-color@8.1.1))(react@19.1.0) expo: specifier: ~54.0.33 version: 54.0.34(@babel/core@7.29.0(supports-color@8.1.1))(react-native@0.81.5(@babel/core@7.29.0(supports-color@8.1.1))(react@19.1.0)(supports-color@8.1.1))(react@19.1.0)(supports-color@8.1.1) @@ -830,10 +830,12 @@ packages: '@xmldom/xmldom@0.8.13': resolution: {integrity: sha512-KRYzxepc14G/CEpEGc3Yn+JKaAeT63smlDr+vjB8jRfgTBBI9wRj/nkQEO+ucV8p8I9bfKLWp37uHgFrbntPvw==} engines: {node: '>=10.0.0'} + deprecated: this version has critical issues, please update to the latest version '@xmldom/xmldom@0.9.10': resolution: {integrity: sha512-A9gOqLdi6cV4ibazAjcQufGj0B1y/vDqYrcuP6d/6x8P27gRS8643Dj9o1dEKtB6O7fwxb2FgBmJS2mX7gpvdw==} engines: {node: '>=14.6'} + deprecated: this version has critical issues, please update to the latest version abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} @@ -984,9 +986,8 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - bdk-rn@file:../bdk-rn-1.1.0-alpha.0.tgz: - resolution: {integrity: sha512-Xed2lu5C6D3QuaILPqyg5YiUZ9GCuMUERx6mZ0m28GodOPyCXhJr7JJ5+QvRIkCUqaZklN6ywv1VtDFpOndLbg==, tarball: file:../bdk-rn-1.1.0-alpha.0.tgz} - version: 1.1.0-alpha.0 + bdk-rn@1.1.0: + resolution: {integrity: sha512-Ejnv37Y3oC1i4yQZai1V2M13Ehd8cFexgSsG/9VunZqDO4k7iKUNtXHCvENbQUFhILeawoIRk5ejELnd0gPWQw==} peerDependencies: react: '*' react-native: '*' @@ -3953,7 +3954,7 @@ snapshots: baseline-browser-mapping@2.10.31: {} - bdk-rn@file:../bdk-rn-1.1.0-alpha.0.tgz(react-native@0.81.5(@babel/core@7.29.0(supports-color@8.1.1))(react@19.1.0)(supports-color@8.1.1))(react@19.1.0): + bdk-rn@1.1.0(react-native@0.81.5(@babel/core@7.29.0(supports-color@8.1.1))(react@19.1.0)(supports-color@8.1.1))(react@19.1.0): dependencies: '@ubjs/core': 0.31.0-5 react: 19.1.0 diff --git a/package.json b/package.json index 2345404..e56dc62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bdk-rn", - "version": "1.1.0-alpha.0", + "version": "1.2.0-dev", "description": "React Native language bindings for the bitcoin development kit", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..7a5aa07 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,9 @@ +# Keep in sync with bdk-ffi/bdk-ffi/rust-toolchain.toml. +# +# ubrn runs `cargo run` from this directory, and rustup passes the toolchain it +# picks here to child processes through RUSTUP_TOOLCHAIN, which overrides +# bdk-ffi's own rust-toolchain.toml. This file is what actually pins the +# toolchain that builds bdk-ffi. +[toolchain] +channel = "1.90.0" +components = ["clippy", "rustfmt"] diff --git a/tests/package.json b/tests/package.json index 17bf616..730c8d7 100644 --- a/tests/package.json +++ b/tests/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@react-native/new-app-screen": "0.82.1", - "bdk-rn": "file:../bdk-rn-1.1.0-alpha.0.tgz", + "bdk-rn": "file:../bdk-rn-1.2.0-dev.tgz", "react": "19.1.1", "react-native": "0.82.1", "react-native-fs": "^2.20.0", diff --git a/tests/pnpm-lock.yaml b/tests/pnpm-lock.yaml index f6530b8..95f069f 100644 --- a/tests/pnpm-lock.yaml +++ b/tests/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: 0.82.1 version: 0.82.1(@types/react@19.2.14)(react-native@0.82.1(@babel/core@7.29.0)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.82.1(@babel/core@7.29.0))(@types/react@19.2.14)(react@19.1.1))(react@19.1.1) bdk-rn: - specifier: file:../bdk-rn-1.1.0-alpha.0.tgz - version: file:../bdk-rn-1.1.0-alpha.0.tgz(react-native@0.82.1(@babel/core@7.29.0)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.82.1(@babel/core@7.29.0))(@types/react@19.2.14)(react@19.1.1))(react@19.1.1) + specifier: file:../bdk-rn-1.2.0-dev.tgz + version: file:../bdk-rn-1.2.0-dev.tgz(react-native@0.82.1(@babel/core@7.29.0)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.82.1(@babel/core@7.29.0))(@types/react@19.2.14)(react@19.1.1))(react@19.1.1) react: specifier: 19.1.1 version: 19.1.1 @@ -1358,9 +1358,9 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - bdk-rn@file:../bdk-rn-1.1.0-alpha.0.tgz: - resolution: {integrity: sha512-Xed2lu5C6D3QuaILPqyg5YiUZ9GCuMUERx6mZ0m28GodOPyCXhJr7JJ5+QvRIkCUqaZklN6ywv1VtDFpOndLbg==, tarball: file:../bdk-rn-1.1.0-alpha.0.tgz} - version: 1.1.0-alpha.0 + bdk-rn@file:../bdk-rn-1.2.0-dev.tgz: + resolution: {integrity: sha512-15UPGFerU1MMfdCUinTeUO0eqw7OmHetVi63itAcH6C68w3b7bTp+Yvr776+mAaVPZAjeFG3cqnaqRYgJ/QXkw==, tarball: file:../bdk-rn-1.2.0-dev.tgz} + version: 1.2.0-dev peerDependencies: react: '*' react-native: '*' @@ -5333,7 +5333,7 @@ snapshots: baseline-browser-mapping@2.10.29: {} - bdk-rn@file:../bdk-rn-1.1.0-alpha.0.tgz(react-native@0.82.1(@babel/core@7.29.0)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.82.1(@babel/core@7.29.0))(@types/react@19.2.14)(react@19.1.1))(react@19.1.1): + bdk-rn@file:../bdk-rn-1.2.0-dev.tgz(react-native@0.82.1(@babel/core@7.29.0)(@react-native-community/cli@20.0.0(typescript@5.9.3))(@react-native/metro-config@0.82.1(@babel/core@7.29.0))(@types/react@19.2.14)(react@19.1.1))(react@19.1.1): dependencies: '@ubjs/core': 0.31.0-5 react: 19.1.1