diff --git a/web3.js/module.d.ts b/web3.js/module.d.ts index 03076b75b..97e8d66e0 100644 --- a/web3.js/module.d.ts +++ b/web3.js/module.d.ts @@ -185,6 +185,7 @@ declare module '@solana/web3.js' { export type ParsedAccountData = { program: string; parsed: any; + space: number; }; export type KeyedAccountInfo = { diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index f936be159..d67491579 100644 --- a/web3.js/module.flow.js +++ b/web3.js/module.flow.js @@ -174,6 +174,7 @@ declare module '@solana/web3.js' { declare export type ParsedAccountData = { program: string, parsed: any, + space: number, }; declare export type ParsedMessageAccount = { diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index 927e70ac0..10907472f 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -712,6 +712,7 @@ const GetParsedTokenAccountsByOwner = jsonRpcResultAndContext( data: struct.pick({ program: 'string', parsed: 'any', + space: 'number', }), rentEpoch: 'number?', }), @@ -776,6 +777,7 @@ const ParsedAccountInfoResult = struct.object({ struct.pick({ program: 'string', parsed: 'any', + space: 'number', }), ]), rentEpoch: 'number?', @@ -1168,10 +1170,12 @@ type SlotInfo = { * @typedef {Object} ParsedAccountData * @property {string} program Name of the program that owns this account * @property {any} parsed Parsed account data + * @property {number} space Space used by account data */ type ParsedAccountData = { program: string, parsed: any, + space: number, }; /**