-
Notifications
You must be signed in to change notification settings - Fork 28
BitShares.accounts
Nikolay Nozdrin-Plotnitsky edited this page May 10, 2018
·
2 revisions
BitShares.accounts use for get account object.
If you know account name, BitShares.assets
behave like map:
let iam = await BitShares.accounts.scientistnik;
let tradebot = await BitShares.accounts["trade-bot"];
See current accounts in map:
console.log(BitShares.accounts.map); // {}
let bts = await BitShares.accounts.scientistnik;
console.log(BitShares.accounts.map); // { scientistnik: Account {...} }
If you want get by id:
let scientistnik = await BitShares.accounts.id("1.2.440272");
Each Account have update()
method to update account data:
await scientistnik.update();
For update all account in current map:
await BitShares.accounts.update();
If you want get account have reserve name ('id' or 'update'):
let acc = BitShares.accounts.getAccount('update');