solana-go-sdk
solana-go-sdk copied to clipboard
Solana Golang SDK
``` func Test_getMintName_GMT(t *testing.T) { mintName, erc := getMintName(context.TODO(), caseSolana.client2, "7i5KKsX2weiTkry7jA4ZwSuXGhs5eJBEjY8vVxR4pfRx", "unknown") require.Nil(t, erc) t.Log(mintName) } func getMintName(ctx context.Context, client *client.Client, mintAddress string, defaultName string) (string, *cerror.CError) { metadata, ok,...
type TokenInstructParam struct { Instruction token.Instruction Amount uint64 Decimals uint8 } type TransferInstructParam struct { Instruction system.Instruction Lamports uint64 }
I use the code ``` func TransferChecked(param TransferCheckedParam) types.Instruction { data, err := bincode.SerializeData(struct { Instruction Instruction Amount uint64 Decimals uint8 }{ Instruction: InstructionTransferChecked, Amount: param.Amount, Decimals: param.Decimals, }) ```...
I public my wallet address. someone transfer some token to me. how can i know it by use this sdk.
I see the demo: ``` c.GetTokenAccountBalance( context.Background(), "HeCBh32JJ8DxcjTyc6q46tirHR8hd2xj3mGoAcQ7eduL", ) ``` what the value HeCBh32JJ8DxcjTyc6q46tirHR8hd2xj3mGoAcQ7eduL ? where did it come? how to get my account usdt amount?
``` wallet := types.NewAccount() ``` Above code as I realised does not actually create a useable wallet. It only generates an ed25519 keypair locally. Is there example code for how...
I saw that Program ID parsing was added in this [commit](https://github.com/portto/solana-go-sdk/commit/8ced0d2518abbf6a13d0fb3099085a9a40826ae3). Is a new release which includes this change planned soon?
Hey guys I'm back again 😃 I need a way to exchange solana (sol) into tether (usdt). Is there a way that your library can enable this?
Should solana-go-sdk expose something like this on the Client interface? https://github.com/solana-labs/solana/pull/27552/files The way this seems to work is (in order of "resolved" accounts array): 1. Message (static) accounts have source...
an error
Hello, i have been using your library to interact with the solana blockchain and its been working pretty good up to this point. Now when I try and make the...