fix: add version to ContactInfo
This commit is contained in:
parent
c584fbdf39
commit
02a278b3b2
|
@ -78,9 +78,10 @@ declare module '@solana/web3.js' {
|
|||
|
||||
export type ContactInfo = {
|
||||
pubkey: string;
|
||||
gossip: string;
|
||||
gossip?: string;
|
||||
tpu?: string;
|
||||
rpc?: string;
|
||||
version?: string;
|
||||
};
|
||||
|
||||
export type ConfirmedTransactionMeta = {
|
||||
|
|
|
@ -91,9 +91,10 @@ declare module '@solana/web3.js' {
|
|||
|
||||
declare export type ContactInfo = {
|
||||
pubkey: string,
|
||||
gossip: string,
|
||||
gossip: string | null,
|
||||
tpu: string | null,
|
||||
rpc: string | null,
|
||||
version: string | null,
|
||||
};
|
||||
|
||||
declare export type ConfirmedTransactionMeta = {
|
||||
|
|
|
@ -111,15 +111,17 @@ export type SignatureStatusConfig = {
|
|||
*
|
||||
* @typedef {Object} ContactInfo
|
||||
* @property {string} pubkey Identity public key of the node
|
||||
* @property {string} gossip Gossip network address for the node
|
||||
* @property {string} tpu TPU network address for the node (null if not available)
|
||||
* @property {string|null} gossip Gossip network address for the node
|
||||
* @property {string|null} tpu TPU network address for the node (null if not available)
|
||||
* @property {string|null} rpc JSON RPC network address for the node (null if not available)
|
||||
* @property {string|null} version Software version of the node (null if not available)
|
||||
*/
|
||||
type ContactInfo = {
|
||||
pubkey: string,
|
||||
gossip: string,
|
||||
gossip: string | null,
|
||||
tpu: string | null,
|
||||
rpc: string | null,
|
||||
version: string | null,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -477,9 +479,10 @@ const GetClusterNodes = jsonRpcResult(
|
|||
struct.array([
|
||||
struct({
|
||||
pubkey: 'string',
|
||||
gossip: 'string',
|
||||
gossip: struct.union(['null', 'string']),
|
||||
tpu: struct.union(['null', 'string']),
|
||||
rpc: struct.union(['null', 'string']),
|
||||
version: struct.union(['null', 'string']),
|
||||
}),
|
||||
]),
|
||||
);
|
||||
|
|
|
@ -453,6 +453,7 @@ test('get cluster nodes', async () => {
|
|||
gossip: '127.0.0.0:1234',
|
||||
tpu: '127.0.0.0:1235',
|
||||
rpc: null,
|
||||
version: '1.1.10',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue