Skip to content

Conversation

@tilo-14
Copy link
Contributor

@tilo-14 tilo-14 commented Jan 15, 2026

Summary

  • Adds Rust client examples for light-token SDK
  • Includes tests for all major operations: create_mint, create_ata, mint_to, transfer_interface, burn, approve, revoke, freeze, thaw, close
  • Adds scenario test for SPL to light-token flow
  • Adds GitHub Actions workflow for Rust tests

Test plan

  • Run cargo test in rust-client directory
  • Verify all tests pass against localnet

@tilo-14 tilo-14 force-pushed the chore/add-rust-client branch from 3202304 to 31c7176 Compare January 15, 2026 22:44
@tilo-14 tilo-14 force-pushed the chore/add-rust-client branch from 31c7176 to f51fd06 Compare January 15, 2026 22:50
@tilo-14 tilo-14 force-pushed the chore/add-rust-client branch from d97dcb2 to fa941d2 Compare January 15, 2026 23:36
@tilo-14 tilo-14 force-pushed the chore/add-rust-client branch from 13fa136 to 912ae0f Compare January 21, 2026 23:14
tilo-14 and others added 5 commits January 22, 2026 02:10
- Add mint_to_checked, transfer_checked, burn_checked instruction examples
- Add action examples: approve, revoke, create_mint, create_ata, mint_to,
  transfer_checked, transfer_interface, wrap, unwrap
- Restructure tests/ to examples-instructions/ and examples-actions/
- Add decimals field to SetupContext
- Update README to match TypeScript client style
- Rename examples-actions → example-actions
- Rename examples-instructions → example-instructions
- Fix setup_for_unwrap to use Wrap action (SPL mints can't mint directly to Light ATAs)
- Update Cargo.toml and README.md paths
- Remove verbose "using action API" / "using instruction API" from comments
- Simplify setup comments to match instruction style
- Rename transfer.rs -> transfer_interface.rs for consistency
- Merge TypeScript and Rust examples into unified list
- Add all Rust-only examples (burn, freeze, thaw, close, etc.)
- Update create_mint action to show TokenMetadata usage
- Fix SDK compatibility: add token_metadata field, remove fee_payer
- Fix rust-client README links and description
..
} = setup().await;

let delegate = Pubkey::new_unique();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

take keypair

freeze_authority: None,
token_metadata: None,
}
.execute(&mut rpc, &payer, &payer)
Copy link
Contributor Author

@tilo-14 tilo-14 Jan 23, 2026

Choose a reason for hiding this comment

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

payer rename to mint seed?

}
.execute(&mut rpc, &payer)
.await
.unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

add result and exchange unwrap w/ ?

Comment on lines +34 to +35
spl_token_program: None,
restricted: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should not be exposed.

// Unwrap tokens from Light Token ATA to SPL ATA
Unwrap {
source: light_ata,
destination_spl_ata: spl_ata,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

reame to destination_ata

in line 11

here only destination

use solana_sdk::{signature::Keypair, signer::Signer};

#[tokio::main]
async fn main() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

amend to only 1 transfer

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