KIT

GetBlockApi

GetBlockApi = object

Methods

getBlock()

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ rewards: false; transactionDetails: "none"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ rewards?: true; transactionDetails: "none"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ signatures: readonly Base58EncodedBytes[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ rewards: false; transactionDetails: "signatures"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ signatures: readonly Base58EncodedBytes[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ signatures: readonly Base58EncodedBytes[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ rewards?: true; transactionDetails: "signatures"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ signatures: readonly Base58EncodedBytes[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; rewards: false; transactionDetails: "accounts"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configOmit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ rewards: false; transactionDetails: "accounts"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; rewards?: true; transactionDetails: "accounts"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configOmit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ rewards?: true; transactionDetails: "accounts"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ encoding: "base58"; maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; rewards: false; transactionDetails?: "full"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configOmit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ encoding: "base58"; rewards: false; transactionDetails?: "full"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ encoding: "base58"; maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; rewards?: true; transactionDetails?: "full"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configOmit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ encoding: "base58"; rewards?: true; transactionDetails?: "full"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ encoding: "base64"; maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; rewards: false; transactionDetails?: "full"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

Parameters
ParameterType
slotbigint
configOmit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ encoding: "base64"; rewards: false; transactionDetails?: "full"; }>
Returns

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

See

https://solana.com/docs/rpc/http/getblock

Call Signature> getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ encoding: "base64"; maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; rewards?: true; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock

调用签名

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
configOmit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ encoding: "base64"; rewards?: true; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock

调用签名

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ encoding: "jsonParsed"; maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; rewards: false; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock

调用签名

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
configOmit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ encoding: "jsonParsed"; rewards: false; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock

调用签名

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ encoding: "jsonParsed"; maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock

调用签名

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
configOmit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ encoding: "jsonParsed"; rewards: false; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock

调用签名

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ encoding?: "json"; maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; rewards: false; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock

调用签名

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
configOmit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ encoding?: "json"; rewards: false; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock

调用签名

getBlock(slot, config): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
configReadonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }> & Readonly<{ encoding?: "json"; maxSupportedTransactionVersion: GetBlockMaxSupportedTransactionVersion; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock

调用签名

getBlock(slot, config?): null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

返回账本中已确认区块的身份和交易信息

参数
ParameterType
slotbigint
config?Omit<Readonly<{ commitment?: Omit<Commitment, "processed">; encoding?: GetBlockEncoding; maxSupportedTransactionVersion?: GetBlockMaxSupportedTransactionVersion; rewards?: boolean; transactionDetails?: GetBlockTransactionDetailsMode; }>, "maxSupportedTransactionVersion"> & Readonly<{ encoding?: "json"; transactionDetails?: "full"; }>
返回

null | Readonly<{ blockhash: Blockhash; blockHeight: bigint; blockTime: UnixTimestamp; parentSlot: Slot; previousBlockhash: Blockhash; }> & Readonly<{ rewards: readonly Reward[]; }> & Readonly<{ transactions: readonly TTransaction[]; }>

参见

https://solana.com/docs/rpc/http/getblock