Skip to content

refactor(ffi): expose satscard stepwise wait via wait#63

Merged
notmandatory merged 3 commits intobitcoindevkit:masterfrom
reez:wait-step
Apr 8, 2026
Merged

refactor(ffi): expose satscard stepwise wait via wait#63
notmandatory merged 3 commits intobitcoindevkit:masterfrom
reez:wait-step

Conversation

@reez
Copy link
Copy Markdown
Collaborator

@reez reez commented Mar 24, 2026

Description

This PR updates the SATSCARD FFI wait API to expose the card's existing one-second auth delay step directly, returning the remaining delay after each call. That lets clients render cooldown progress one second at a time instead of estimating locally.

The immediate motivation is SatsBuddy PR #139, which added a UI countdown for SATSCARD cooldown recovery during send/sign. That PR is good enough for now on the app side, and this PR is the upstream follow-up that exposes a cleaner stepwise primitive for that flow.

Notes to the reviewers

This is intentionally scoped to SATSCARD only for now, since that is the current consumer. If we want the same API on TAPSIGNER or SATSCHIP, that can follow in a separate PR.

Changelog notice

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@reez reez marked this pull request as ready for review April 7, 2026 14:41
@reez reez requested a review from notmandatory as a code owner April 7, 2026 14:41
@reez
Copy link
Copy Markdown
Collaborator Author

reez commented Apr 7, 2026

rebase on #64 and pull in changes

@notmandatory
Copy link
Copy Markdown
Member

After #64 should be able to just expose the existing auth_wait for ffi instead of adding the new function wait_step.

@notmandatory notmandatory added this to the Release 0.3.0 milestone Apr 7, 2026
@reez reez changed the title feat(ffi): add satscard waitStep for auth delay progress efactor(ffi): expose satscard stepwise wait via wait Apr 7, 2026
@reez reez changed the title efactor(ffi): expose satscard stepwise wait via wait refactor(ffi): expose satscard stepwise wait via wait Apr 7, 2026
Copy link
Copy Markdown
Member

@notmandatory notmandatory left a comment

Choose a reason for hiding this comment

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

ACK c91b137

I'd prefer to have the same wait FFI function for all three cards but if you need this now go ahead and merge it. I don't mind doing a followup PR for the other card types.

@reez
Copy link
Copy Markdown
Collaborator Author

reez commented Apr 7, 2026

ACK c91b137

I'd prefer to have the same wait FFI function for all three cards but if you need this now go ahead and merge it. I don't mind doing a followup PR for the other card types.

PR updated to add satschip and tapsigner, in 2 new commits

Copy link
Copy Markdown
Member

@notmandatory notmandatory left a comment

Choose a reason for hiding this comment

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

ACK 492ae4c

Thanks for updating the other card types!

@notmandatory notmandatory merged commit 492ae4c into bitcoindevkit:master Apr 8, 2026
18 of 20 checks passed
@reez reez deleted the wait-step branch April 8, 2026 14:29
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