fix: ignore unknown fields in more RPC responses
This commit is contained in:
committed by
mergify[bot]
parent
f0b22b1b23
commit
427d0ff0b5
@ -615,7 +615,7 @@ const GetSlotLeader = jsonRpcResult('string');
|
|||||||
*/
|
*/
|
||||||
const GetClusterNodes = jsonRpcResult(
|
const GetClusterNodes = jsonRpcResult(
|
||||||
struct.array([
|
struct.array([
|
||||||
struct({
|
struct.pick({
|
||||||
pubkey: 'string',
|
pubkey: 'string',
|
||||||
gossip: struct.union(['null', 'string']),
|
gossip: struct.union(['null', 'string']),
|
||||||
tpu: struct.union(['null', 'string']),
|
tpu: struct.union(['null', 'string']),
|
||||||
@ -631,7 +631,7 @@ const GetClusterNodes = jsonRpcResult(
|
|||||||
const GetVoteAccounts = jsonRpcResult(
|
const GetVoteAccounts = jsonRpcResult(
|
||||||
struct({
|
struct({
|
||||||
current: struct.array([
|
current: struct.array([
|
||||||
struct({
|
struct.pick({
|
||||||
votePubkey: 'string',
|
votePubkey: 'string',
|
||||||
nodePubkey: 'string',
|
nodePubkey: 'string',
|
||||||
activatedStake: 'number',
|
activatedStake: 'number',
|
||||||
@ -645,7 +645,7 @@ const GetVoteAccounts = jsonRpcResult(
|
|||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
delinquent: struct.array([
|
delinquent: struct.array([
|
||||||
struct({
|
struct.pick({
|
||||||
votePubkey: 'string',
|
votePubkey: 'string',
|
||||||
nodePubkey: 'string',
|
nodePubkey: 'string',
|
||||||
activatedStake: 'number',
|
activatedStake: 'number',
|
||||||
@ -737,7 +737,7 @@ const ConfirmedTransactionMetaResult = struct.union([
|
|||||||
export const GetConfirmedBlockRpcResult = jsonRpcResult(
|
export const GetConfirmedBlockRpcResult = jsonRpcResult(
|
||||||
struct.union([
|
struct.union([
|
||||||
'null',
|
'null',
|
||||||
struct({
|
struct.pick({
|
||||||
blockhash: 'string',
|
blockhash: 'string',
|
||||||
previousBlockhash: 'string',
|
previousBlockhash: 'string',
|
||||||
parentSlot: 'number',
|
parentSlot: 'number',
|
||||||
@ -766,7 +766,7 @@ export const GetConfirmedBlockRpcResult = jsonRpcResult(
|
|||||||
const GetConfirmedTransactionRpcResult = jsonRpcResult(
|
const GetConfirmedTransactionRpcResult = jsonRpcResult(
|
||||||
struct.union([
|
struct.union([
|
||||||
'null',
|
'null',
|
||||||
struct({
|
struct.pick({
|
||||||
slot: 'number',
|
slot: 'number',
|
||||||
transaction: ConfirmedTransactionResult,
|
transaction: ConfirmedTransactionResult,
|
||||||
meta: ConfirmedTransactionMetaResult,
|
meta: ConfirmedTransactionMetaResult,
|
||||||
|
Reference in New Issue
Block a user