From 38213694bde880deb56e493df7889598794f5344 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Fri, 14 Feb 2020 22:27:06 +0800 Subject: [PATCH] fix: add tx nonce information types to definitions --- web3.js/module.d.ts | 7 +++++++ web3.js/module.flow.js | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/web3.js/module.d.ts b/web3.js/module.d.ts index 05f3dfd4d6..c2ebf87d50 100644 --- a/web3.js/module.d.ts +++ b/web3.js/module.d.ts @@ -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; }; @@ -396,6 +402,7 @@ declare module '@solana/web3.js' { signature?: Buffer; instructions: Array; recentBlockhash?: Blockhash; + nonceInfo?: NonceInformation; constructor(opts?: TransactionCtorFields); static from(buffer: Buffer | Uint8Array | Array): Transaction; diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index f93caa586d..9ce6746940 100644 --- a/web3.js/module.flow.js +++ b/web3.js/module.flow.js @@ -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, |}; @@ -453,6 +459,7 @@ declare module '@solana/web3.js' { signature: ?Buffer; instructions: Array; recentBlockhash: ?Blockhash; + nonceInfo: ?NonceInformation; constructor(opts?: TransactionCtorFields): Transaction; static from(buffer: Buffer | Uint8Array | Array): Transaction;