Skip to content

Cannot get Balance of a list of addresses #99

@pshaddel

Description

@pshaddel

I know that we can get balance of one address using this:

import { nodeInteractions } from '@waves/waves-transactions'
const data = await balance(
      address,
      'node1.sample.com'
)

Is there a way to get balance of a list of addresses?
I can do this directly with node api:

const balances = await fetch(`addresses/balance?${addresses.map((n) => `address=${n}`).join('&')}`)

I saw the implementation of balance function:

function fetchBalance(base, address, options) {
    if (options === void 0) { options = Object.create(null); }
    return request_1.default({
        base: base,
        url: "/addresses/balance/" + address,
        options: options
    });
}

If there is no way to do this please let me know if I can send a pull request for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions