diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index 32eca0075..3f0158a7e 100644 --- a/web3.js/module.flow.js +++ b/web3.js/module.flow.js @@ -143,6 +143,7 @@ declare module '@solana/web3.js' { } // === src/validator-info.js === + declare export var VALIDATOR_INFO_KEY; declare export type Info = {| name: string, website?: string, @@ -159,6 +160,7 @@ declare module '@solana/web3.js' { } // === src/vote-account.js === + declare export var VOTE_ACCOUNT_KEY; declare export type Lockout = {| slot: number, confirmationCount: number, diff --git a/web3.js/src/index.js b/web3.js/src/index.js index 05e25fb47..d642ed282 100644 --- a/web3.js/src/index.js +++ b/web3.js/src/index.js @@ -8,8 +8,8 @@ export {PublicKey} from './publickey'; export {SystemProgram} from './system-program'; export {Token, TokenAmount} from './token-program'; export {Transaction, TransactionInstruction} from './transaction'; -export {ValidatorInfo} from './validator-info'; -export {VoteAccount} from './vote-account'; +export {VALIDATOR_INFO_KEY, ValidatorInfo} from './validator-info'; +export {VOTE_ACCOUNT_KEY, VoteAccount} from './vote-account'; export {sendAndConfirmTransaction} from './util/send-and-confirm-transaction'; export { sendAndConfirmRawTransaction, diff --git a/web3.js/src/validator-info.js b/web3.js/src/validator-info.js index 0b2a0107a..5d6276f5f 100644 --- a/web3.js/src/validator-info.js +++ b/web3.js/src/validator-info.js @@ -6,7 +6,7 @@ import * as Layout from './layout'; import * as shortvec from './util/shortvec-encoding'; import {PublicKey} from './publickey'; -const VALIDATOR_INFO_KEY = new PublicKey( +export const VALIDATOR_INFO_KEY = new PublicKey( 'Va1idator1nfo111111111111111111111111111111', ); diff --git a/web3.js/src/vote-account.js b/web3.js/src/vote-account.js index ca523c541..6a011cfd5 100644 --- a/web3.js/src/vote-account.js +++ b/web3.js/src/vote-account.js @@ -4,6 +4,10 @@ import * as BufferLayout from 'buffer-layout'; import * as Layout from './layout'; import {PublicKey} from './publickey'; +export const VOTE_ACCOUNT_KEY = new PublicKey( + 'Vote111111111111111111111111111111111111111', +); + export type Lockout = {| slot: number, confirmationCount: number,