Skip to main content

Questions tagged [solana-client]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
14 views

Can I update the FEE and Withheld authority if I'm only the Update Authority?

I have a SPL Solana Token and I set as Fee manager and Withheld withdraw authority an EX team member. I haven't the keypair of their account but I'm the only Update Authority of the token. Mint and ...
Eliel's user avatar
  • 11
0 votes
0 answers
6 views

How can I create user and user associated token account (ATA) in rust test case?

I am currently creating a mint address , user and its ata address using spl library in contrast with solana-sdk and solana-client. The code involves airdrops too to fund wallet (payer) before the ata ...
hammad ali's user avatar
2 votes
0 answers
20 views

Unable to generate build in anchor , want to know the stable version of solana-sdk and solana-client compaitable

what should be the version of crates, since I am getting error of async-trait all time error: failed to select a version for the requirement `async-trait = "^0.1.77"` The version ...
hammad ali's user avatar
0 votes
0 answers
10 views

How to airdrop sols in Rust test case using tokio framework

I am working over the airdrop over a particular Keypair to perform testing using rust. Signature is being generated but Transaction is not confirmed #[cfg(test)] // pub mod utils; mod tests { use ...
hammad ali's user avatar
0 votes
1 answer
63 views

error: could not compile `spl-type-length-value`

Running cargo build with the following dependencies: [dependencies] solana-sdk = "1.18.17" solana-client = "1.18.17" Results in the following compile errors: error[E0659]: `...
john's user avatar
  • 7,497
1 vote
0 answers
134 views

Sending transaction via QUIC (ConnectionError(TimedOut))

I am developing a Rust application that sends transactions on the Solana blockchain using QUIC. My code works perfectly on the devnet, but when I switch to the mainnet, the transaction sending fails ...
RAprogramm's user avatar
0 votes
0 answers
126 views

Struggling to get a transaction included in the blockchain using official Solana Rust TPU client

I'm trying to write a proof of concept rust program to try to send a transaction using the TPU client provided by the official GitHub solana repo, with the goal of reducing the time between intially ...
Petar Petrov's user avatar
1 vote
1 answer
43 views

How can I get the program_id from the last transaction response Solana Blockchain Rust

I have a code fn main() { let rpc_url = String::from("https://api.mainnet-beta.solana.com/"); let client = RpcClient::new(rpc_url); let pk = Pubkey::from_str("adresshere").unwrap();...
AlexFromMolokovo's user avatar
1 vote
1 answer
87 views

How to use solana-client from a tokio async runtime?

I am working in a tokio async environment, built from tokio::runtime::Runtime::block_on. fn start() { ... enter preformatted text here let runtime = tokio::runtime::Runtime::...
Nathan's user avatar
  • 176
0 votes
1 answer
135 views

Loading lookup table accounts with rust RPC client

I'm struggling to understand how do I get all accounts (static + dynamic) from executed on chain transaction using rust RPC client (get_transaction). I kinda figured out that I can just make another ...
Nerver Corameiro's user avatar
1 vote
1 answer
42 views

How to fetch constants from a program?

So to fetch the current state of given account I'd do: let acc = await program.account.<ACCOUNT_TYPE>.fetch(<ADDRESS>); Programs can have hardcoded constants (which can be changed upon ...
mega_creamery's user avatar
0 votes
1 answer
733 views

Solana TPU client and sending versioned transactions

The solana tpu client (rust) takes a &Transaction argument however I deal with VersionedTransaction's. I would like to know 2 things.. How can I send a VersionedTransaction via the tpu client. ...
MHCH's user avatar
  • 45
1 vote
1 answer
198 views

websocket_url for solana_client::tpu_client::TpuClient

I'm wondering which URL I need to provide as websocket_url when I call TpuClient::new()? use solana_client::tpu_client::{TpuClient, TpuClientConfig}; use solana_client::rpc_client::RpcClient; fn main(...
Stefan D.'s user avatar
  • 181
1 vote
2 answers
229 views

Can't get solana client working [duplicate]

I'm running into a ton of issues with solana dependencies unfortunately. I created a new crate with cargo init --bin rust_client and edited my Cargo.toml file to contain [package] name = "...
Curious 's user avatar
3 votes
2 answers
694 views

how can i check / verify past events of my smartcontract?

I want to check my past event emitted by smart contract during function call so that I can verify that the function is actually called. ``program.addEventListner()``` is used only for real-time I need ...
vipin saini's user avatar
1 vote
1 answer
78 views

How to retrieve a FileSystem Wallet in a .ts file

I am new to learning Solana development. Is there any way to retrieve the keypair from a Filesystem path? I am doing a tutorial and I want to use the same keypair to sign transactions, instead of ...
LAUR_NASA's user avatar
  • 183
1 vote
1 answer
716 views

Getting an error when attempting to send transactions to the TPU from a Rust client

When attempting to send transactions to the TPU from a Rust client using a TpuClient connection, I am encountering the following error: panicked at 'QuicLazyInitializedEndpoint::create_endpoint ...
guillermo's user avatar
3 votes
2 answers
2k views

How can I get the transaction history of a wallet with more than 1000 transactions/signatures?

Trying to get the full transaction history of a wallet address, but get_signatures_for_address() has a limit of 1000 most recent signatures. How can I get the entire chain of transactions? Thanks!
jfaz1's user avatar
  • 33
1 vote
1 answer
222 views

How to verify data on chain with Solana

I am currently facing a big problem with Solana. I will start with a very simple example for the explanation: In fact I want to create a smart contract, in this smart contract there will be the name ...
RevOneX9's user avatar
1 vote
2 answers
1k views

How to obtain transaction logs via RPC?

My off-chain program is sending transactions to Solana, and I want to inspect the logs of the transaction inside this program. // Send transaction let transaction_signature = client.send_transaction(&...
totikom's user avatar
  • 375
2 votes
1 answer
144 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
2 answers
182 views

Build solana-client for wasm target

Has anyone been able to build solana-client for a wasm32-unknown-unknown target (wasm-pack build --target web)? Getting the following error building gethostname dependency error[E0425]: cannot find ...
floorsweeper's user avatar
1 vote
1 answer
148 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
1 vote
1 answer
155 views

Trouble initializing solana contract on front-end client

I have a very simple program which stores GIFs in a solana contract. Before I can get the gifs, however, I believe I need to call the "initialize" function in my front-end. I have created ...
user2487's user avatar
3 votes
1 answer
233 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
3 votes
1 answer
191 views

Is there a rust equivalent of onProgramAccountChange()?

What I am trying to do is listen to some onchain program accounts being changed. I could do this pretty easily in typescript with onProgramAccountChange() method provided in the Connection class in @...
Farrukh Raza's user avatar
1 vote
1 answer
139 views

Sometimes receiving duplicate logs using solana_client::nonblocking::pubsub_client::PubsubClient

I am using solana_client v1.10.34 nonblocking PubsubClient to subscribe to program logs and I am sometimes seeing duplicate logs with the same metadata but 1 slot apart. Is this a bug? Ps: Must use ...
Jayyunit's user avatar
5 votes
1 answer
401 views

How to use Solana rust client to request SOL balance?

I am trying to use Rust (not Typescript) to query Solana and retrieve the SOL balance of a given account. But I can't seem to be able to do this. What I have thus far. As dependencies I have the ...
Finlay Weber's user avatar
0 votes
1 answer
25 views

Get transactionID string with Transaction object

I currently have a buffer that I deserialized into a Transaction Object. I need the transaction ID to search on lets say Solscan.
Michael Beer's user avatar
2 votes
1 answer
434 views

"Error: receiving on an empty and disconnected channel" from `solana_client::PubsubClient`

Consider this simple bit of code: use anyhow::Result; use solana_client::pubsub_client::PubsubClient; const WS_URL: &str = "wss://api.devnet.solana.com"; fn main() -> Result<()&...
TovarishFin's user avatar