Skip to content

How to swap on SPL tokens using Wallet core #4189

Answered by satoshiotomakan
aminsato asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @aminsato, you should integrate a DEX that supports Solana, and then sign the raw transaction bytes using WalletCore.
Something like that

#[test]
fn test_solana_sign_raw_message_v0() {
let v0 = Proto::mod_RawMessage::MessageV0 {
header: Some(Proto::mod_RawMessage::MessageHeader {
num_required_signatures: 1,
num_readonly_signed_accounts: 0,
num_readonly_unsigned_accounts: 1,
}),
account_keys: vec![
"6pEfiZjMycJY4VA2FtAbKgYvRwzXDpxY58Xp4b7FQCz9".into(),
"11111111111111111111111111111111".into(),
],
recent_blockhash: "HxKwWFTHixCu…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aminsato
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants