ergoplatform / explorer-backend

Ergo Blockchain Explorer
22 stars 31 forks source link

Flag for API addresses/.../transactions to restrict output to boxes for the address #187

Closed MrStahlfelge closed 2 years ago

MrStahlfelge commented 2 years ago

Problem

The latest Mi Goreng drops have shown that api/v1/addresses/.../transactions returning all boxes is disadventageous for certain use cases. Wallet app uses this API to get the list of latest transactions, but input and output boxes are only needed for the given address. A flag to omit all other inputs and outputs would save a lot of traffic for airdrops.

Solution

Add boolean flag onlyAddressBoxes with default value false. If set to true, input and output lists only contain boxes for the given address.