@ledgerhq/coin-tezos
Version:
10 lines • 367 B
JavaScript
import api from "../network/tzkt";
/**
* Retunrs the balance of the given address.
* If the address is an empty account, returns -1.
*/
export async function getBalance(address) {
const apiAccount = await api.getAccountByAddress(address);
return apiAccount.type === "user" ? BigInt(apiAccount.balance) : BigInt(-1);
}
//# sourceMappingURL=getBalance.js.map