Representable
Represents the part of a Token member that can be accessed through an access token.
Constructor Summary
Public Constructor | ||
public |
constructor(member: Member) Instantiate a representable that acts on behalf of a Token member. |
Method Summary
Public Methods | ||
public |
getAccount(accountId: string): Promise<Account> Looks up an account by the account dd |
|
public |
getAccounts(): Promise<Array<Account>> Looks up linked accounts. |
|
public |
getAddress(addressId: string): Promise<AddressRecord> Gets the member's address |
|
public |
Gets the member's addresses |
|
public |
getBalance(accountId: string, keyLevel: string): Promise<object> Looks up the balance of an account |
|
public |
Looks up the balances of an array of accounts |
|
public |
getTransaction(accountId: string, transactionId: string, keyLevel: string): Promise<Transaction> Looks up a transaction |
|
public |
getTransactions(accountId: string, offset: string, limit: number, keyLevel: string): Promise<object> Looks up all of the member's transactions for an account |
Public Constructors
Public Methods
public getAccount(accountId: string): Promise<Account> source
Looks up an account by the account dd
Params:
Name | Type | Attribute | Description |
accountId | string | the id |
Throw:
* |
error if account not found |
public getAddress(addressId: string): Promise<AddressRecord> source
Gets the member's address
Params:
Name | Type | Attribute | Description |
addressId | string | the address id |
Throw:
* |
error if address not found |
public getBalance(accountId: string, keyLevel: string): Promise<object> source
Looks up the balance of an account
public getBalances(accountIds: Array<string>, keyLevel: string): Promise<Array<object>> source
Looks up the balances of an array of accounts
public getTransaction(accountId: string, transactionId: string, keyLevel: string): Promise<Transaction> source
Looks up a transaction
Throw:
* |
error if transaction not found |