diff --git a/web3.js/module.d.ts b/web3.js/module.d.ts index f4acad1932..338a34d596 100644 --- a/web3.js/module.d.ts +++ b/web3.js/module.d.ts @@ -141,6 +141,7 @@ declare module '@solana/web3.js' { fee: number; preBalances: Array; postBalances: Array; + logMessages?: Array; err: TransactionError | null; }; diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index cf03e04522..d8a8fc0f5f 100644 --- a/web3.js/module.flow.js +++ b/web3.js/module.flow.js @@ -155,6 +155,7 @@ declare module '@solana/web3.js' { fee: number, preBalances: Array, postBalances: Array, + logMessages?: Array, err: TransactionError | null, }; diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index 840aa4b1e1..8d9a378010 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -374,12 +374,14 @@ const SimulatedTransactionResponseValidator = jsonRpcResultAndContext( * @property {number} fee The fee charged for processing the transaction * @property {Array} preBalances The balances of the transaction accounts before processing * @property {Array} postBalances The balances of the transaction accounts after processing + * @property {Array} logMessages An array of program log messages emitted during a transaction * @property {object|null} err The error result of transaction processing */ type ConfirmedTransactionMeta = { fee: number, preBalances: Array, postBalances: Array, + logMessages?: Array, err: TransactionError | null, }; @@ -1107,6 +1109,7 @@ const ConfirmedTransactionMetaResult = struct.union([ fee: 'number', preBalances: struct.array(['number']), postBalances: struct.array(['number']), + logMessages: struct.union([struct.array(['string']), 'undefined']), }), ]);