v1.4.0
What's new
RPC
make api interface more friendly
- getBalance
- getAccountInfo
- getRecentBlockhash
- sendTransaction
Client
add a more quick send tx func, sendTransaction
now you can send tx like
c := client.NewClient(rpc.DevnetRPCEndpoint)
sig, err := c.SendTransaction(
context.Background(),
client.SendTransactionParam{
Instructions: []types.Instruction{
sysprog.Transfer(
feePayer.PublicKey,
to.PublicKey,
1, // 1 lamports
),
},
Signers: []types.Account{feePayer},
FeePayer: feePayer.PublicKey,
},
)
I will wrap tx for you in the client 🎉
If you need more custom way, you can also use c.RpcClient.SendTransaction or c.RpcClient.SendTransactionWithConfig to send !