Questions tagged [solana-sdk]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

TpuClient.send_transaction gets dropped occasionally

I want to send a transaction using the following code: let blockhash = tpu_client.rpc_client().get_latest_blockhash().unwrap(); let tx = Transaction::new_signed_with_payer( &instructions, ...
Stefan D.'s user avatar
  • 171
1 vote
1 answer
30 views

Access transaction instructions from get_transaction_with_config()

I call the get_transaction_with_config() the following way: let parsed_transaction = rpc_client.get_transaction_with_config( &Signature::from_str("{__SIGNATURE__}").unwrap(), ...
Stefan D.'s user avatar
  • 171
2 votes
1 answer
44 views

mismatched types solana_sdk::pubkey::Pubkey, found Pubkey

I am having trouble compiling my solana project.. I seem to have a clash of publicKey types which i presume are caused by the solana_program and solana_sdk pubkey. here is the error error[E0308]: ...
MHCH's user avatar
  • 45
0 votes
1 answer
39 views

Sol Unity SDK Questions-

I am trying to create a game and integrate the unity SDK + soar into it for accounts / leaderboards ETC, and I'd like to make it so that the "play" button is unlocked for each turn by paying ...
noot's user avatar
  • 1
0 votes
0 answers
22 views

how get RAY stake amount and reward details

i need to get details of staked RAY on raydium program for my app and im using: .getParsedProgramAccounts( new PublicKey( "EhhTKczWMGQt46ynNeRX1WfeagwwJd7ufHvCDjRxjo5Q") , { ...
Mehran Mollahoseini's user avatar
2 votes
1 answer
21 views

using solana-sdk in no-std environment

I am writing a client side application using the solana-sdk to create/sign transaction in a no-std environment. Since a lot a dependencies in the solana sdk and/or the dependencies of dependencies and ...
Ramiz's user avatar
  • 21
1 vote
2 answers
67 views

Best way to get SPL tokens generated from site?

I'm working on a website where a user can create their own SPL token with metaplex metadata attached to it. Something that I want to keep track of is all the SPL tokens that were created using my DApp....
0x0x0x0's user avatar
  • 31
2 votes
1 answer
111 views

Is there a way to batch together spl-token sdk transactions?

I have a program that is creating a mint account, the associated token account, the meta data account. Right now I'm just testing it out without a frontend, but eventually I want to batch them all ...
0x0x0x0's user avatar
  • 31
1 vote
0 answers
1k views

How to swap in raydium as fast as possible?

Question is on the title; How to swap tokens as fast as possible. I am using raydium sdk but in that, i need lp infos and market info. Can I make a swap without getting them? Or if i need them, what ...
blockchainlover's user avatar
0 votes
0 answers
36 views

Is it possible to deploy program with Solana SDK

There are many examples and tutorials on how to deploy Solana account using anchor framework or the native way. I can successfully deploy account and update its field with anchor SDK & IDL. ...
johnhckuo's user avatar
  • 135
3 votes
2 answers
308 views

How to deploy a Solana program using Solana JavaScript SDK?

The documentations explain how to deploy a Solana program using the CLI tools. Is there a way to achieve that in JS/TS using the @solana/spl-token client? Edit: What I actually meant is @solana/spl-...
iMrDJAi's user avatar
  • 65
1 vote
1 answer
70 views

Error When trying to use Solana-SDK

I am getting this error this struct takes 0 lifetime arguments but 1 lifetime argument was supplied when trying to use the solana-sdk = { version = "1.16.9" } crate. For my CLI environment, ...
Jimii's user avatar
  • 1,438
0 votes
0 answers
125 views

failed to deserialize solana_sdk::transaction::versioned::VersionedTransaction: io error: failed to fill whole buffer

I am using C++to interact with Solana. Specifically, the Jsonrpc: HTTP method is used. When I created a transaction (an old-fashioned Solana transaction), packaged the transaction information and ...
user5111's user avatar
0 votes
1 answer
89 views

Is solana_sdk wasm incompatible with @solana/web3.js?

I'm trying to create a rust wasm crate that takes a TransactionInstruction from js, mutates it, and return it. I'm trying to use serde-wasm-bindgen to handle the js-wasm interop. As a test, I have ...
billy's user avatar
  • 313
1 vote
0 answers
30 views

Solana - SolPlay issues within Uniity [closed]

I have several of the below errors and I cannot figure out how to fix this. Is anyone able to assist me? Failed to extract Solana.Unity.Rpc.Converters.TransactionErrorJsonConverter class of base type ...
Dedrick Whipple's user avatar
3 votes
1 answer
349 views

Borsh, pubkey & COption

#[derive(BorshSerialize, BorshDeserialize)] pub struct Mint_instruction_data { pub tag: u8, pub decimals: u8, pub mint_authority: Pubkey, pub freeze_authority: COption<Pubkey>, }...
0xZiyad's user avatar
  • 31
2 votes
1 answer
146 views

Phantom wallet extension URL?

I am currently developing a Unity game with a component in it that allows you to log in to the game using the Phantom Wallet extension. However, I have been unsuccessful in finding the Phanton Wallet ...
Luke Fitch's user avatar
1 vote
0 answers
144 views

Convert rust struct to be used in python using pyo3 in solders

i am using trying to make python bindings for the solana rust sdk, on the solders repo https://github.com/kevinheavey/solders there's a crate called primitive here that https://github.com/kevinheavey/...
eth_sign's user avatar
0 votes
1 answer
46 views

How to identify the mechanism that makes the program read only data (content of .rodata section) starting address to be 0x100000000 during execution?

Quoting the Solana documentation [1]; The virtual address memory map used by Solana BPF programs is fixed and laid out as follows Program code starts at 0x100000000 Stack data starts at 0x200000000 ...
dsauvage's user avatar
2 votes
1 answer
251 views

How to fix "ELF error: Relative jump out of bounds at instruction" on example-helloworld deploy (target sbf-solana-solana cpu sbfv2)?

We are using the latest Solana monorepo [1] and our goal is to run the Solana example-helloworld [2] Using sbf-solana-solana target and sbfv2 CPU. First, we patched programs/bpf_loader/src/syscalls/...
dsauvage's user avatar
2 votes
2 answers
277 views

Partially sign a VersionedTransaction in Rust

What's the recommended way to partially sign a VersionedTransaction in Rust?
KevinH's user avatar
  • 402
3 votes
1 answer
170 views

Not enough tokens to mint a limited edition

const freezeTx = await createFreezeDelegatedAccountInstruction( { delegate: WALLET.publicKey, tokenAccount: new PublicKey("...
Nguyễn Quang Huy's user avatar
2 votes
1 answer
114 views

Depencencies in Cargo.toml file Solana-SDK and Solana-Client doesn't work

Hello I am trying desperately to use solana-sdk and solana-client but when I do cargo build-bpf it doesn't work. Can someone help me please? When I use only solana-client as a dependency the ...
RevOneX9's user avatar
1 vote
1 answer
89 views

Solana-SDK and Solana-Client doesn't work as a dependencies

Hello I am trying desperately to use solana-sdk and solana-client but when I do cargo build-bpf it doesn't work. Can someone help me please? If I specify only solana-client and solana-sdk, I get this ...
RevOneX9's user avatar
3 votes
1 answer
140 views

Connection to solana cluster using the ThinClient of the rust client library giving timeout error?

I am trying to connect to solana using the ThinClient provided by the solana client library: https://docs.rs/solana-client/latest/solana_client/thin_client/struct.ThinClient.html It requires a Rpc ...
LionCatDev Studio's user avatar
1 vote
2 answers
76 views

How can I fetch a NFT's token account (associated account)?

I am trying to fetch an NFT's token account through Metaplex, and I am not sure which function works. I've tried const nft = await metaplex.nfts().findByMint({ mintAddress: nftMint }); But that doesn'...
incog's user avatar
  • 567
1 vote
1 answer
30 views

Is there a reason why pubkey in `Reward` struct is `String` instead of `&[u8]` or `Pubkey`

In most places pubkey is represented by &[u8] or Pubkey is there any particular reason why Reward struct inside ReplicaBlockInfo use this "fronted/json friendly" representation? Similar ...
S.R's user avatar
  • 141
1 vote
1 answer
18 views

Orao Oracle: fail to import JS SDK

When loading the node module @orao-network/solana-vrf to interact with the Orao oracle, I receive this error: Uncaught ReferenceError: Buffer is not defined at ./node_modules/@orao-network/solana-vrf/...
dawka's user avatar
  • 91
3 votes
1 answer
90 views

Working in Rust with signers across threads -- T: Signer + Send + Sync

I'm working with the Shadow Drive Rust SDK and would like to pass a Box<dyn Signer> to it (I'd like to allow for keypair, remote wallet, or presign), which requires that I wrap it order to make ...
HelmetFace's user avatar
  • 1,677
6 votes
1 answer
111 views

Transaction getEstimatedFee returning null

I am trying to use the sdk to estimate gas fees on a transaction. However, transaction.getEstimatedFee(connection) sometimes returns null. I cannot figure out why and there is no error message. Would ...
Zebra's user avatar
  • 61
4 votes
1 answer
89 views

Does Solana have an official Python implementation?

I wonder if Solana has an "official" Python implementation; specially for Keypairs, or everyone is just using this repo: https://github.com/michaelhly/solana-py/blob/master/src/solana/...
Alex Ramirez's user avatar
1 vote
1 answer
339 views

Testing Anchor program with solana-program-test crate

I was trying to test my anchor program with rust tests. Test written in Typescript are working fine. I am getting with cargo test: note: run with `RUST_BACKTRACE=1` environment variable to display a ...
Sushant Chandla's user avatar