Skip to main content

Questions tagged [solana-sdk]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Where this error 'memory allocation failed, out of memory' originates from?

I am developing a program on Solana and also testing few aspects regarding how solana enforces checks on the bpf program. However, I am stuck with the issue that I am getting the error 'memory ...
Ghazanfer Anwar's user avatar
0 votes
0 answers
8 views

I used sea-orm and solana-sdk in my project,dependency conflict

error: failed to select a version for `zeroize`. ... required by package `curve25519-dalek v3.2.1` ... which satisfies dependency `curve25519-dalek = "^3.2.1"` of package `solana-...
fun goit's user avatar
0 votes
0 answers
11 views

Mechanics of DEX limit orders

I want to understand how limit orders work on DEXes, for example on Jupiter. The question is: can I place a limit order in the order book and just wait for a sharp sale on the market? Will it be ...
CoinWiz's user avatar
0 votes
0 answers
6 views

Dependency issues

https://github.com/anza-xyz/agave/issues/612#issuecomment-2241719708 error: failed to select a version for `subtle`. ... required by package `rustls v0.22.2` ... which satisfies dependency `...
Ohad Dahan's user avatar
0 votes
0 answers
8 views

What can I do about sbf.mk Makefile include seeming to be incompatible with solana_sdk.h within the solana repository?

I am just getting started with Solana development. I am a C programmer so I am most comfortable with C. I am just using the most basic code to create a shared object file. I am on Ubuntu 22 x86-64. ...
someone serious's user avatar
0 votes
1 answer
18 views

Is possible to find all SPL Tokens or NFTs Collections where an solana address is the Mint or Update authority only providing this address or keypair?

Is there a way to, for example: I provide an solana address. Find all the SPL Tokens where this solana address is the Mint or Update Authority, or NFT Collections where this solana address is the ...
Eliel's user avatar
  • 21
0 votes
0 answers
26 views

Is there any faster way to getPoolKeys from Solana Raydium?

Currently, I am fetching all liquidity-related data from Raydium API. (https://api.raydium.io/v2/sdk/liquidity/mainnet.json) And then matching with my desired token address to filter the right ...
Shahria Emon's user avatar
0 votes
0 answers
33 views

Solana Wallet in React Native

TLDR; Is there a SDK or a guide to connect a Solana wallet to any dapp, through React Native? Details: So we are developing a wallet app using React Native and we want to connect the wallet to the ...
William's user avatar
0 votes
0 answers
10 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
21 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
1 vote
1 answer
22 views

Cargo complaning about unmatchable version requirements with `pyth-solana-receiver-sdk` and `serde_with` crates

I'm Elio, founder at Intrant Inferis Solana mobile RPG error: failed to select a version for the requirement `serde_with = "^2.3.3"` candidate versions found which didn't match: 1.14.0, 1.13....
devELIOper's user avatar
2 votes
1 answer
71 views

Using `onAccountChange` in Rust

If I want to react to an account changing, I can use the onAccountChange function in web3.js, like described here for example. I'm building a client in rust though, does anchor_client or solana_sdk ...
Ahri's user avatar
  • 4,897
0 votes
0 answers
28 views

AccountNotFound when fetching an address with transactions

I have a bot that finds new pairs on raydium pool. When it finds the innitialize pool transaction, it fetches poolInfo. All is being done within milliseconds. But, when it comes to fetch base_vault ...
Someone1111's user avatar
2 votes
1 answer
25 views

How to Get BlockNumber by tx hash

I am new to solana , I am try to get block info by tx_hash these are my codes: let data = rpc.get_signatures_for_address_with_config(&program_id, config).unwrap(); for data in data { ...
user11258188's user avatar
3 votes
1 answer
174 views

How to decode account data using Rust?

I'm trying to get the account data using Rust and the solana_sdk. I have the following code where account.data is a Vec. let pubkey = Pubkey::from_str("...
lifeInspection's user avatar
2 votes
1 answer
56 views

Solana sdk instruction is not matching my program's instruction

I am facing an issue when using solana-sdk to call a function on my Solana program. I have the following Program, made using Anchor: #[program] pub mod myprogram { // does not write on the ...
Nathan's user avatar
  • 176
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
0 answers
70 views

How to merge 2 Transactions into One?

Could anyone please help me merge 2 transactions into 1? I have followed the answer given in another thread but i cant seam to be able finish the task. I have extracted all instructions but i cant ...
user14044's user avatar
0 votes
0 answers
149 views

Java script code to swap solana coin on Orca

I met issues with Solana trading bot development. I plan to exchange Solana coins using the Orca platform and are using the Whirlpool SDK. This is my current code. But this only works once out of 10 ...
Dev Borealis's user avatar
0 votes
0 answers
61 views

Fetching and processing transaction information

I have this rust code to fetch information about a transaction. In the debugger I can see that the information is recieved, but I can not access it. I keep geting this error: Error { request: Some(...
Chall-T's user avatar
1 vote
0 answers
23 views

Get Accounts involved in a transaction using Rust [duplicate]

Suppose I have the signature of a transaction that has been processed, I want to get the accounts involved in a transaction. Usually I would look at the staticAccounts field of a transaction using the ...
qubitz's user avatar
  • 210
1 vote
0 answers
40 views

Add instruction at the end of transaction in rust

working on adding a tx to a Versionned Transaction do you know how i should proceed using rust // return <jupiter>/swap let mut versioned_transaction: VersionedTransaction = bincode::...
SCcagg5's user avatar
  • 111
0 votes
1 answer
169 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
  • 181
1 vote
1 answer
150 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
  • 181
2 votes
1 answer
261 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
81 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
29 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
40 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
92 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
399 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
1 answer
3k 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
46 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
  • 137
3 votes
2 answers
791 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
  • 105
1 vote
1 answer
155 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
  • 3,967
0 votes
1 answer
110 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
  • 352
1 vote
0 answers
34 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
421 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
223 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
168 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
61 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
445 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
467 views

Partially sign a VersionedTransaction in Rust

What's the recommended way to partially sign a VersionedTransaction in Rust?
KevinH's user avatar
  • 422
3 votes
1 answer
225 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
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
1 answer
149 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
236 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
92 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
34 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
28 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
  • 101