Account

Interface
Balance and vote information for an Address.
export interface Account { 
  readonly address: Address; 
  readonly getBalance: (asset: Hash256) => Fixed8; 
  readonly [OpaqueTagSymbol0]: unique symbol; 
} 

Properties

address
Address of this Account.

Static Methods

for

(address: Address) => Account 

Methods

getBalance

Retrieve the balance for a first class Asset based on its Hash256.
(asset: Hash256) => Fixed8 

Example

const address = Address.from('ALq7AWrhAueN6mJNqk6FHJjnsEoPRytLdW'); 
const account = Account.for(address); 
const neoBalance = account.getBalance(Hash256.NEO); 
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE