Skip to content

Conversation

@gomesalexandre
Copy link
Contributor

Allowing arbitrary Solana signing for e.g but not limited to, Bebop gasless solana swaps

Adds solanaSignMessage method to hdwallet-core and implements it in
hdwallet-native to support signing raw Solana message bytes.

This enables protocols like Bebop that require signing transaction messages
for submission to their API (gasless mode).

Implementation:
- hdwallet-core: Add SolanaSignMessage interface and optional method
- hdwallet-native: Implement using adapter's signMessage method
- Returns base64-encoded signature

Native wallet only for now, other wallets can be added later.
@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat_sol_things

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Add signMessage method to PhantomSolanaProvider type
- Implement solanaSignMessage using Phantom's Ed25519 signing
- Returns signature as base64 string (following native wallet pattern)
- Enables Bebop gasless Solana swaps with message signing
- Add solanaSignRawTransaction to SolanaWallet interface
- Implement in Phantom using provider.signTransaction
- Implement in Native using adapter.signTransaction
- Returns signature as base64 string
- Enables signing prebuilt Bebop transactions
- Native: use adapter.signMessage(messageBytes) - exact equivalent of signBytes
- Phantom: add logging to verify message integrity
- Both extract tx.messageBytes and sign without modifying transaction
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