Skip to content

Create automated script for testing bull bitcoin mobile against payjoin-cli#1978

Draft
benalleng wants to merge 22 commits into
SatoshiPortal:developfrom
benalleng:payjoin-cli-integration-test
Draft

Create automated script for testing bull bitcoin mobile against payjoin-cli#1978
benalleng wants to merge 22 commits into
SatoshiPortal:developfrom
benalleng:payjoin-cli-integration-test

Conversation

@benalleng
Copy link
Copy Markdown

@benalleng benalleng commented Mar 24, 2026

This creates a script to automate the integration test between the payjoin-cli and bull bitcoin. This first test is using bull bitcoin as the sender and payjoin-cli as the receiver.

Claude Opus had a heavy hand in porting over the payjoin_test.dart to work with this new format

Blocked until #2041 is merged. Though this is also working with the current payjoin-flutter sdk I think it is probably more useful to wait until it is merged.

spacebear21 and others added 16 commits May 11, 2026 15:10
Switch from payjoin_flutter to dart payjoin bindings, which are actively
maintained and support the latest rust-payjoin versions.
These pre-load the wallet and return a synchronous callback compatible
with the synchronous payjoin interface, for isMine and signPsbtSync.
These session persisters hold payjoin events in memory as a transitive
step, so that DB migrations and complete event persistence may be
implemented in a follow-up step.
Implements a chaining pattern with processReceiveSession to process and
advance a session from any state to its terminal state.

BBM needs the proposal PSBT to save to its model, so it needs to be
extracted before transitioning to the Monitor typestate to be returned
alongside the session.
This should be droppable once isolates architecture is replaced
Move receiver/sender polling onto the main isolate, keyed by session
idin two Timer.periodic maps.

The old isolate indirection existed because frb async FFI could block
the UI isolate. With sync uniffi, `Timer.periodic` on the main isolate
works and removes ~150 lines of accidental complexity.

Co-Authored-By: Dan Gould <d@ngould.dev>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@benalleng benalleng force-pushed the payjoin-cli-integration-test branch 2 times, most recently from 6e75df4 to c0949dd Compare May 11, 2026 20:02
benalleng added 6 commits May 11, 2026 16:03
payjoin-cli

This creates a script to automate the integration test between the
payjoin-cli and bull bitcoin. This first test is using bull bitcoin as
the sender and payjoin-cli as the receiver.

TODO:
- create the inverse where the payjoin-cli is the sender and bull
  bitcoin is the receiver
- create a workflow that wraps this script so that there is a way to
  keep live track of any regressions
Due to the nature of the tests it might be required that the test
wallets have some more funds than necessary for a single test flow
assuming the transaction is not mined before the next test commences.
@benalleng
Copy link
Copy Markdown
Author

benalleng commented May 12, 2026

A note about the cli integration: As it is using testnet the funding wallets need to have enough utxos to do both tests at the same time since there is no guarantee that the first tx will confirm before the next test starts. perhaps there is some conditional logic to choose unconfirmed utxos but it is simple enough to just get some more funds in the relevant wallets

@benalleng benalleng mentioned this pull request May 12, 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