Skip to content

Allow hooks 2 in the Dart bindings - #2052

Merged
spacebear21 merged 1 commit into
payjoin:masterfrom
ethicnology:dart-hooks-2
Nov 11, 2026
Merged

spacebear21 merged 1 commit into
payjoin:masterfrom
ethicnology:dart-hooks-2

Conversation

@ethicnology

Copy link
Copy Markdown
Contributor

The Dart bindings pin hooks: ^1.0.0. Since native_toolchain_rust 1.0.4+0 and code_assets 1.1.0, both require hooks 2, so an app that already resolves hooks 2 cannot depend on payjoin. We hit this in Bull Bitcoin Mobile: flutter_rust_bridge's Native Assets backend (flutter_rust_bridge_hooks 2.13.0) requires hooks: ^2.0.2. bdk-dart is making the same change in bitcoindevkit/bdk-dart#141.

This PR changes only payjoin-ffi/dart/pubspec.yaml:

  • hooks: ^2.0.2
  • code_assets: ">=1.2.1 <3.0.0"
  • native_toolchain_rust: ^1.0.4

hook/build.dart is unchanged. With Dart 3.12.2, dart analyze hook is clean against both the lowest resolution (dart pub downgrade: hooks 2.0.2, code_assets 1.2.1, native_toolchain_rust 1.0.4+0) and the highest (dart pub upgrade: hooks 2.2.0, code_assets 2.2.0, native_toolchain_rust 1.0.7). I did not run dart test or the reproducible-build job locally; CI covers them.

Trade-off: apps still resolving hooks 1 cannot take a release with this change. hooks 2 has been out since May 2026 and the Flutter version pinned in CI (3.44.9) resolves it.

Reviewer: @spacebear21

AI disclosure: the change, the local review against AGENTS.md#code-review (no findings) and this description were produced with an AI assistant (Claude) and checked by me.

Pull Request Checklist

Please confirm the following before requesting review:

native_toolchain_rust 1.0.4+0 and later and code_assets 1.1.0 and
later require hooks 2. An app that already resolves hooks 2, for
example through flutter_rust_bridge_hooks 2.13, cannot depend on
payjoin while it pins hooks ^1.0.0.

hook/build.dart is unchanged. dart analyze hook is clean against the
lowest resolution (hooks 2.0.2, code_assets 1.2.1,
native_toolchain_rust 1.0.4+0) and the highest (hooks 2.2.0,
code_assets 2.2.0, native_toolchain_rust 1.0.7) with Dart 3.12.2.

@spacebear21 spacebear21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 6c39a08

@ethicnology we published https://pub.dev/packages/payjoin/versions/0.26.0 earlier today which still has the old hooks dependencies, do you need a patch release follow-up asap?

@ethicnology

Copy link
Copy Markdown
Contributor Author

Hey @spacebear21 no emergency, since bdk hasn't merge either.

Once you will both compatible with flutter_rust_bridge 2.13 I will push for the update every bindings we use

Thanks for your reactivity

@spacebear21
spacebear21 merged commit e1b3b28 into payjoin:master Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants