@exodus/solana-web3.js
Version:
Solana Javascript API
46 lines (45 loc) • 1.23 kB
TypeScript
/// <reference types="node" />
import { Buffer } from 'buffer';
import { PublicKey } from './publickey.js';
export declare const VALIDATOR_INFO_KEY: PublicKey;
/**
* Info used to identity validators.
*/
export declare type Info = {
/** validator name */
name: string;
/** optional, validator website */
website?: string;
/** optional, extra information the validator chose to share */
details?: string;
/** optional, used to identify validators on keybase.io */
keybaseUsername?: string;
};
/**
* ValidatorInfo class
*/
export declare class ValidatorInfo {
/**
* validator public key
*/
key: PublicKey;
/**
* validator information
*/
info: Info;
/**
* Construct a valid ValidatorInfo
*
* @param key validator public key
* @param info validator information
*/
constructor(key: PublicKey, info: Info);
/**
* Deserialize ValidatorInfo from the config account data. Exactly two config
* keys are required in the data.
*
* @param buffer config account data
* @return null if info was not found
*/
static fromConfigData(buffer: Buffer | Uint8Array | Array<number>): ValidatorInfo | null;
}