getAllOperations(limit?, offset?, reverse?)

Feature

Get all operations information. Note: If no query parameters are provided, the 10 oldest data will be retrieved.

Parameters

number | undefined limit, // limit the number of items to import [number, number] | undefined offset, // [block number, operation index]

true | undefined reverse

data of SuccessResponse

array of operation information

example

// Note: an asynchronous request.
const operationsInfo = async () => {
  // set query parameter offset as [142,0]
  const info = await mitum.operation.getAllOperations(undefined,[142,0]);
  console.log(info.data);
};
operationsInfo();

// output
[
  {
    _hint: 'mitum-currency-hal-v0.0.1',
    _embedded: {
      _hint: 'mitum-currency-operation-value-v0.0.1',
      hash: '8ACf3GMAAsQRsJvnv8yYvWKMLWDdS8fQbo6nDLG22sL2',
      operation: [Object],
      height: 143,
      confirmed_at: '2024-02-23T05:25:18.146Z',
      reason: '',
      in_state: true,
      index: 0
    },
    _links: { block: [Object], self: [Object] }
  },
  {
    _hint: 'mitum-currency-hal-v0.0.1',
    _embedded: {
      _hint: 'mitum-currency-operation-value-v0.0.1',
      hash: 'ELYfUqoF8CknCbaR58165YsSftoDVFfe1g7z3yew1WaK',
      operation: [Object],
      height: 144,
      confirmed_at: '2024-02-23T05:25:21.751Z',
      reason: '',
      in_state: true,
      index: 0
    },
    _links: { block: [Object], self: [Object] }
  },
]

Last updated