Fix request and comments
This commit is contained in:
parent
b5290cbfb8
commit
b3a107beda
|
@ -7,19 +7,6 @@ import (
|
|||
"github.com/gagliardetto/solana-go"
|
||||
)
|
||||
|
||||
// GetBlock returns identity and transaction information about a confirmed block in the ledger.
|
||||
// NEW: This method is only available in solana-core v1.7 or newer. Please use getConfirmedBlock for solana-core v1.6
|
||||
func (cl *Client) GetBlock(
|
||||
ctx context.Context,
|
||||
slot uint64,
|
||||
) (out *GetBlockResult, err error) {
|
||||
return cl.GetBlockWithOpts(
|
||||
ctx,
|
||||
slot,
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
type TransactionDetailsType string
|
||||
|
||||
const (
|
||||
|
@ -35,6 +22,21 @@ type GetBlockOpts struct {
|
|||
Commitment CommitmentType // "processed" is not supported. If parameter not provided, the default is "finalized".
|
||||
}
|
||||
|
||||
// GetBlock returns identity and transaction information about a confirmed block in the ledger.
|
||||
// NEW: This method is only available in solana-core v1.7 or newer. Please use getConfirmedBlock for solana-core v1.6
|
||||
func (cl *Client) GetBlock(
|
||||
ctx context.Context,
|
||||
slot uint64,
|
||||
) (out *GetBlockResult, err error) {
|
||||
return cl.GetBlockWithOpts(
|
||||
ctx,
|
||||
slot,
|
||||
nil,
|
||||
)
|
||||
}
|
||||
|
||||
// GetBlock returns identity and transaction information about a confirmed block in the ledger.
|
||||
// NEW: This method is only available in solana-core v1.7 or newer. Please use getConfirmedBlock for solana-core v1.6
|
||||
func (cl *Client) GetBlockWithOpts(
|
||||
ctx context.Context,
|
||||
slot uint64,
|
||||
|
|
|
@ -9,6 +9,7 @@ import (
|
|||
type BlocksResult []bin.Uint64
|
||||
|
||||
// GetBlocks returns a list of confirmed blocks between two slots.
|
||||
//
|
||||
// NEW: This method is only available in solana-core v1.7 or newer.
|
||||
// Please use getConfirmedBlocks for solana-core v1.6.
|
||||
// The result will be an array of u64 integers listing confirmed blocks
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
func (cl *Client) GetRecentBlockhash(ctx context.Context, commitment CommitmentType) (out *GetRecentBlockhashResult, err error) {
|
||||
params := []interface{}{}
|
||||
if commitment != "" {
|
||||
params = append(params, M{"commitment": string(commitment)})
|
||||
params = append(params, M{"commitment": commitment})
|
||||
}
|
||||
|
||||
err = cl.rpcClient.CallFor(&out, "getRecentBlockhash", params)
|
||||
|
|
|
@ -16,6 +16,7 @@ type GetSignaturesForAddressOpts struct {
|
|||
// GetSignaturesForAddress returns confirmed signatures for transactions
|
||||
// involving an address backwards in time from the provided signature
|
||||
// or most recent confirmed block.
|
||||
//
|
||||
// NEW: This method is only available in solana-core v1.7 or newer.
|
||||
// Please use getConfirmedSignaturesForAddress2 for solana-core v1.6
|
||||
func (cl *Client) GetSignaturesForAddress(
|
||||
|
|
|
@ -21,6 +21,7 @@ type GetTransactionOpts struct {
|
|||
}
|
||||
|
||||
// GetTransaction returns transaction details for a confirmed transaction.
|
||||
//
|
||||
// NEW: This method is only available in solana-core v1.7 or newer.
|
||||
// Please use getConfirmedTransaction for solana-core v1.6
|
||||
func (cl *Client) GetTransaction(
|
||||
|
|
Loading…
Reference in New Issue