Fetch

Usage

In order to retrieve the Aggregate data of an account, you can use the Get() function provided by the aggregate object given in aleph-sdk-ts import.

import { messages } from 'aleph-sdk-ts';

// Or used optimized import
import { Get as getAggregate } from 'aleph-sdk-ts/dist/messages/aggregate';
import { Get as getAggregate } from 'aleph-sdk-ts/dist/messages/aggregate';


(async () => {
  await getAggregate({
    keys: ['testkey'],
    address: '0x0BBB06C238bE7D4c5Df7BA56b7ad75a09eea5F56',
    APIServer: 'https://api2.aleph.im'
  })
})();

Parameters

ParameterDescription

Address - required string

The account that you want to check data

key - optional string

As an account can have several keys, you can specify the ones you want.

limit - optional number

The maximum amount of parameters to retrieve. Default 50.

APIServer - optional string

The API server endpoint that is used to carry the request to Aleph's network.

Return

Return value for this fetch
{ testkey: { a: 5 } }

Last updated