UNPKG

@ledgerhq/coin-stellar

Version:
9 lines (7 loc) 357 B
import { Balance } from "@ledgerhq/coin-framework/api/types"; import { fetchAccount } from "../network"; import { StellarAsset } from "../types"; export async function getBalance(addr: string): Promise<Balance<StellarAsset>[]> { const { balance } = await fetchAccount(addr); return [{ value: BigInt(balance.toString()), asset: { type: "native" } }]; }