Questions tagged [solana-program-library]

90 questions
1
vote
1 answer

Sign the payer of the transaction through an API

What I would like to achieve is to make the user use the solana program for "free" and make the company pay for the transaction, what I have in mind is: Extrapolate the transaction in the frontend Send it to my backend server through an api Use the…
1
vote
0 answers

SOLANA Rent and Rent Exemption | Which accounts they are taking rent from

Hi I'm new to SOLANA Blockchain , While gazing through the charges inside Solana, I found there is a fee associated with transaction like , minting tokens , transferring them , creating token accounts etc.. But there is another charge called Rent…
1
vote
1 answer

Access and iterate over account metadata within a Solana(Anchor) Program?

To access and iterate over Solana account metadata on the client one can simply use solana/web3.js. But how can I access the same data within the solana(Anchor) program itself. How can I get the number of tweet accounts created and access the…
1
vote
1 answer

Coption usage on solana spl-token program

can someone give me a explanation of the usage of repr(C) macro, since in my understanding it simply acts for bridging up the compilation in C, is not wrong? Further, why does COption keep 4 bytes for only matching the appended tags, shouldn't it…
Jarek Lin
  • 11
  • 2
1
vote
1 answer

Module '"@solana/spl-token"' has no exported member 'createAssociatedTokenAccountInstruction'

version: "@solana/spl-token": "0.1.8" Tried with version 0.2.0 too but didnt work
Anoushk
  • 551
  • 7
  • 20
1
vote
1 answer

Is it possible to close an account which was create using SystemProgram.createAccountWithSeed?

I made an error creating an account with seeds. A program is the owner of this account. Is it possible for me to close this or only the program?
wxecqz123
  • 325
  • 1
  • 5
  • 12
1
vote
1 answer

Get token list from connected solana wallet and create an array

I'm trying to figure out how to take the connected wallet, from the solana wallet-adapter and grab all the spl-tokens (NFTs specifically but that filter doesn't have to happen) and create an array with the token mint addresses. I'm fairly new to…
TyGuy
  • 11
  • 1
1
vote
0 answers

Retrying failed custom token transaction with '@solana/web3.js'

I want to send my deployed token other than sol using solana web3.js. My code works most of the time but sometimes the transaction fails. I put a while loop so that when the transaction fails the client retries it with the sendRawTransaction…
augustin
  • 69
  • 5
1
vote
1 answer

How to freeze an SPL token?

so confused with the spl token docs here - https://spl.solana.com/token. Can someone tell me if it's possible, using the js lib - to create a spl token (specifying minter and freezer authorities), then mint some tokens to a token account and finally…
1977
  • 2,580
  • 6
  • 26
  • 37
1
vote
1 answer

Calling solana (anchor) program . No Errors, But lamports not transferring between accounts as requested

My code runs fine when using bump + seeds. All tests are passing. But Please see below the code of a Crowdfunding campaign, created using Anchor. The problem is that I have to use 'invoke' inside my donate function in order to transfer funds from…
1
vote
1 answer

How to integrate contract (program) with web3 in Solana?

I am using @solana/web3.js library and have tested to create new account and get balance. Now I am going to integrate the contract (Raydium Liqudity PoolV4) with web3. I have googled and can not find good material to learn. Can you help me how to…
Makar
  • 13
  • 3
1
vote
1 answer

How to extend Solana spl_token program to add more functionality?

SPL_Token program contains lots of features, but I want to add more additional checks as per customer requirement. So I want to create custom spl_token program by extending original spl_token code e.g. Lets say, I want to limit maximum token that…
1
vote
1 answer

Cannot create token account for destination address for solana spl token transfer android

I am using https://github.com/ajamaica/Solana.kt this library for Solana SPL token transfer. I can successfully create a Token Account address using this library by using …
Hemangi
  • 11
  • 1
1
vote
1 answer

What is the alternative of "approve" in evm on Solana?

I have several wallets in evm. I give their X token access to my main wallet by calling Contract(x).approve() function. Thus i can make operations with these wallets. Now i want to do same thing on solana with solana web3 library. However i cannot…
1
vote
2 answers

NotImplementedError in publickey.PublicKey().find_program_address() solana-py

I am trying to get the PDA for a mint account in order to get NFT metadata. I am using solana-py library. from solana import publickey pda =…