fix: add missing apis to flow and ts definitions

This commit is contained in:
Justin Starry
2020-02-12 10:06:34 +08:00
committed by Michael Vines
parent de4f20a569
commit b3aa9fda87
2 changed files with 56 additions and 28 deletions

View File

@ -342,6 +342,19 @@ declare module '@solana/web3.js' {
): Transaction;
}
declare export class SystemInstruction extends TransactionInstruction {
type: InstructionType;
fromPublicKey: PublicKey | null;
toPublicKey: PublicKey | null;
amount: number | null;
constructor(
opts?: TransactionInstructionCtorFields,
type?: InstructionType,
): SystemInstruction;
static from(instruction: TransactionInstruction): SystemInstruction;
}
// === src/validator-info.js ===
declare export var VALIDATOR_INFO_KEY;
declare export type Info = {|
@ -438,6 +451,7 @@ declare module '@solana/web3.js' {
recentBlockhash: ?Blockhash;
constructor(opts?: TransactionCtorFields): Transaction;
static from(buffer: Buffer): Transaction;
add(
...items: Array<
Transaction | TransactionInstruction | TransactionInstructionCtorFields,