Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Solana Actions support for transfer endpoint #24

Conversation

CodeMaverick2
Copy link

Added Solana Actions support for transfer endpoint

Solves Issue -> #16

Description:

This PR introduces support for Solana Actions by implementing a new transfer action handler. It reuses the existing transfer transaction logic to enable seamless token transfers between accounts.

Changes Implemented:

  • Added actions.json entry for the transfer action.
  • Created transfer.rs in crates/rpc/src/actions/ to handle transfer requests.
  • Integrated with existing transfer transaction logic (transfer_transaction).
  • Registered new RPC methods:
    • getTransferMetadata – Retrieves metadata for the transfer action.
    • transferAction – Processes transfer requests via JSON-RPC.
  • Added unit tests (transfer_test.rs) to validate the new transfer flow.

Usage:

The transfer action can be invoked using the following Solana URL format:

solana://transfer?amount=1000000&token=So11111111111111111111111111111111111111112&source=<SOURCE_PUBKEY>&destination=<DESTINATION_PUBKEY>

@CodeMaverick2 CodeMaverick2 deleted the feat/solana-actions branch February 18, 2025 13:11
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