Home Reference Source Test
public class | source

AccountsTree

Extends:

Observable → AccountsTree

Direct Subclass:

SynchronousAccountsTree

Indirect Subclass:

PartialAccountsTree

Static Method Summary

Static Public Methods
public static

async createVolatile(): Promise<AccountsTree>

public static

async getPersistent(jdb: *): Promise<AccountsTree>

Member Summary

Public Members
public get

Method Summary

Public Methods
public

abort(): Promise

public

async commit(): Promise

public

async get(address: Address): PromiseAccount>

public

async getAccountsProof(addresses: Array<Address>): Promise<AccountsProof>

public

async getChunk(startPrefix: string, size: number): Promise<AccountsTreeChunk>

public

async isEmpty(): Promise<boolean>

public

async partialTree(): Promise<PartialAccountsTree>

public

put(address: Address, account: Account): Promise

public

async root(): Promise<Hash>

public
public

synchronousTransaction(enableWatchdog: boolean): Promise<SynchronousAccountsTree>

public

transaction(enableWatchdog: boolean): Promise<AccountsTree>

Protected Methods
protected

async _init(): Promise<AccountsTree>

Inherited Summary

From class Observable
public static get

WILDCARD: string: string

public

bubble(observable: Observable, types: ...string)

public

fire(type: string, args: ...*): Promise

public

off(type: string, id: number)

public

on(type: string, callback: Function): number

Static Public Methods

public static async createVolatile(): Promise<AccountsTree> source

Return:

Promise<AccountsTree>

public static async getPersistent(jdb: *): Promise<AccountsTree> source

Params:

NameTypeAttributeDescription
jdb *

Return:

Promise<AccountsTree>

Public Members

public get tx: Transaction source

Public Methods

public abort(): Promise source

Return:

Promise

public async commit(): Promise source

Return:

Promise

public async get(address: Address): PromiseAccount> source

Params:

NameTypeAttributeDescription
address Address

Return:

PromiseAccount>

public async getAccountsProof(addresses: Array<Address>): Promise<AccountsProof> source

Params:

NameTypeAttributeDescription
addresses Array<Address>

Return:

Promise<AccountsProof>

public async getChunk(startPrefix: string, size: number): Promise<AccountsTreeChunk> source

Params:

NameTypeAttributeDescription
startPrefix string

The prefix to start with.

size number

The maximum number of terminal nodes to include.

Return:

Promise<AccountsTreeChunk>

public async isEmpty(): Promise<boolean> source

Return:

Promise<boolean>

public async partialTree(): Promise<PartialAccountsTree> source

Return:

Promise<PartialAccountsTree>

public put(address: Address, account: Account): Promise source

Params:

NameTypeAttributeDescription
address Address
account Account

Return:

Promise

public async root(): Promise<Hash> source

Return:

Promise<Hash>

public snapshot(tx: AccountsTree): Promise<AccountsTree> source

Params:

NameTypeAttributeDescription
tx AccountsTree
  • optional

Return:

Promise<AccountsTree>

public synchronousTransaction(enableWatchdog: boolean): Promise<SynchronousAccountsTree> source

Params:

NameTypeAttributeDescription
enableWatchdog boolean
  • optional

Return:

Promise<SynchronousAccountsTree>

public transaction(enableWatchdog: boolean): Promise<AccountsTree> source

Params:

NameTypeAttributeDescription
enableWatchdog boolean
  • optional

Return:

Promise<AccountsTree>

Protected Methods

protected async _init(): Promise<AccountsTree> source

Return:

Promise<AccountsTree>