From 6c32bca04d23001b3da843ec933d4e18d30bb37f Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Wed, 24 Jul 2019 16:01:07 -0700 Subject: [PATCH] fix: export VOTE_ACCOUNT_KEY (#422) --- web3.js/module.flow.js | 2 ++ web3.js/src/index.js | 4 ++-- web3.js/src/validator-info.js | 2 +- web3.js/src/vote-account.js | 4 ++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index 32eca0075c..3f0158a7e2 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 05e25fb477..d642ed2827 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 0b2a0107a4..5d6276f5f5 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 ca523c5415..6a011cfd5f 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,