Skip to content

[wip] add Sui signer#1387

Draft
williamrobertson13 wants to merge 4 commits intoLedgerHQ:developfrom
williamrobertson13:williamrobertson13/sui-signer
Draft

[wip] add Sui signer#1387
williamrobertson13 wants to merge 4 commits intoLedgerHQ:developfrom
williamrobertson13:williamrobertson13/sui-signer

Conversation

@williamrobertson13
Copy link
Copy Markdown

📝 Description

Replace this text by a clear and concise description of what this pull request is about and why it is needed. Be sure to explain the problem you're addressing and the solution you're proposing.
For libraries, you can add a code sample of how to use it.
For bugfixes, you can explain the previous behavior and how it was fixed.
In case of visual features, please attach screenshots or video recordings to demonstrate the changes.

❓ Context

  • JIRA or GitHub link:
  • Feature:

✅ Checklist

Pull Requests must pass CI checks and undergo code review. Set the PR as Draft if it is not yet ready for review.

  • Covered by automatic tests
  • Changeset is provided
  • Documentation is up-to-date
  • Impact of the changes:
    • list of the changes

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.

williamrobertson13 and others added 4 commits March 20, 2026 14:43
Implements a complete Sui signer for the device SDK, replacing the
@mysten/ledgerjs-hw-app-sui library. The core challenge is the Sui
Ledger app's unique block protocol -- a content-addressed linked-list
chunking scheme that differs from the P1/P2 chunking used by other
signers.

Features:
- BlockProtocolTask: SHA256-chained block protocol with multi-turn
  APDU conversation (GET_CHUNK, PUT_CHUNK, RESULT_ACCUMULATING,
  RESULT_FINAL)
- GetVersion, GetAddress, SignTransaction, SignPersonalMessage tasks
- ProvideTrustedDynamicDescriptor for clear signing (INS 0x22)
- Little-endian u32 BIP44 path encoding (Sui-specific)
- Full DI wiring (Inversify), use cases, app binder, public API
- 27 unit tests covering block protocol, path encoding, and all tasks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Sui to the signers page with support for all four operations:
- Get version
- Get address (with optional on-device verification)
- Sign transaction (hex-encoded intent-wrapped bytes)
- Sign personal message (hex-encoded intent-wrapped bytes)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nd ContextModule

Wire ContextModule through DI infrastructure (builder, container, app binder)
for clear signing support. Replace CallTaskInAppDeviceAction with XState-based
SignTransactionDeviceAction that supports: OpenApp → ProvideDescriptor → SignTransaction.

- Add @ledgerhq/context-module and xstate dependencies
- Add ContextModule to externalTypes, DI container, and SignerSuiBuilder
- Add withContextModule() and originToken to SignerSuiBuilder
- Add descriptor field to TransactionOptions and wire through use case
- Create XState SignTransactionDeviceAction with descriptor support
- Export DescriptorInput type and signTransactionDAStateSteps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

@williamrobertson13 is attempting to deploy a commit to the LedgerHQ Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant