fix: add tx nonce information types to definitions

This commit is contained in:
Justin Starry 2020-02-14 22:27:06 +08:00 committed by Michael Vines
parent 6a7115b8bd
commit 38213694bd
2 changed files with 14 additions and 0 deletions

7
web3.js/module.d.ts vendored
View File

@ -386,8 +386,14 @@ declare module '@solana/web3.js' {
publicKey: PublicKey;
};
export type NonceInformation = {
nonce: Blockhash;
nonceInstruction: TransactionInstruction;
};
export type TransactionCtorFields = {
recentBlockhash?: Blockhash;
nonceInfo?: NonceInformation;
signatures?: Array<SignaturePubkeyPair>;
};
@ -396,6 +402,7 @@ declare module '@solana/web3.js' {
signature?: Buffer;
instructions: Array<TransactionInstruction>;
recentBlockhash?: Blockhash;
nonceInfo?: NonceInformation;
constructor(opts?: TransactionCtorFields);
static from(buffer: Buffer | Uint8Array | Array<number>): Transaction;

View File

@ -443,8 +443,14 @@ declare module '@solana/web3.js' {
publicKey: PublicKey,
|};
declare type NonceInformation = {|
nonce: Blockhash,
nonceInstruction: TransactionInstruction,
|};
declare type TransactionCtorFields = {|
recentBlockhash?: Blockhash,
nonceInfo?: NonceInformation,
signatures?: Array<SignaturePubkeyPair>,
|};
@ -453,6 +459,7 @@ declare module '@solana/web3.js' {
signature: ?Buffer;
instructions: Array<TransactionInstruction>;
recentBlockhash: ?Blockhash;
nonceInfo: ?NonceInformation;
constructor(opts?: TransactionCtorFields): Transaction;
static from(buffer: Buffer | Uint8Array | Array<number>): Transaction;