zkverifyjs
Version:
Submit proofs to zkVerify and query proof state with ease using our npm package.
13 lines (12 loc) • 415 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.accountInfo = accountInfo;
async function accountInfo(api, account) {
const { nonce, data } = await api.query.system.account(account.address);
return {
address: account.address,
nonce: nonce.toNumber(),
freeBalance: data.free.toString(),
reservedBalance: data.reserved.toString(),
};
}