Skip to content

Commit

Permalink
fix: add tx nonce information types to definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarry authored and mergify[bot] committed Feb 14, 2020
1 parent 1fedb6a commit b17979a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions module.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
};

Expand All @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions module.flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
|};

Expand All @@ -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;
Expand Down

0 comments on commit b17979a

Please sign in to comment.