Accounts
Extends:
Static Method Summary
Static Public Methods | ||
public static |
async createVolatile(): Promise<Accounts> Generate an Accounts object that loses it's data after usage. |
|
public static |
async getPersistent(jdb: *): Promise<Accounts> Generate an Accounts object that is persisted to the local storage. |
Constructor Summary
Public Constructor | ||
public |
constructor(accountsTree: AccountsTree) |
Member Summary
Public Members | ||
public get |
|
Method Summary
Public Methods | ||
public |
abort(): Promise |
|
public |
commit(): Promise |
|
public |
async commitBlock(block: Block, transactionCache: TransactionCache): Promise |
|
public |
async commitBlockBody(body: BlockBody, blockHeight: number, transactionCache: TransactionCache): Promise |
|
public |
async gatherToBePrunedAccounts(transactions: Array<Transaction>, blockHeight: number, transactionCache: TransactionCache): Promise<Array<PrunedAccount>> |
|
public |
async get(address: Address, accountType: Account.Type, tree: AccountsTree): Promise<Account> Gets the Account-object for an address. |
|
public |
getAccountsProof(addresses: Array<Address>): Promise<AccountsProof> |
|
public |
getAccountsTreeChunk(startPrefix: string): Promise<AccountsTreeChunk> |
|
public |
|
|
public |
async initialize(genesisBlock: Block, encodedAccounts: string): Promise<void> |
|
public |
partialAccountsTree(): Promise<PartialAccountsTree> |
|
public |
async revertBlock(block: Block, transactionCache: TransactionCache): Promise |
|
public |
async revertBlockBody(body: BlockBody, blockHeight: number, transactionCache: TransactionCache): Promise |
|
public |
|
|
public |
async transaction(enableWatchdog: boolean): Promise<Accounts> |
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 Constructors
public constructor(accountsTree: AccountsTree) source
Override:
Observable#constructorParams:
Name | Type | Attribute | Description |
accountsTree | AccountsTree |
Public Members
public get tx: Transaction source
Public Methods
public async commitBlock(block: Block, transactionCache: TransactionCache): Promise source
Params:
Name | Type | Attribute | Description |
block | Block | ||
transactionCache | TransactionCache |
Return:
Promise |
public async commitBlockBody(body: BlockBody, blockHeight: number, transactionCache: TransactionCache): Promise source
Params:
Name | Type | Attribute | Description |
body | BlockBody | ||
blockHeight | number | ||
transactionCache | TransactionCache |
Return:
Promise |
public async gatherToBePrunedAccounts(transactions: Array<Transaction>, blockHeight: number, transactionCache: TransactionCache): Promise<Array<PrunedAccount>> source
Params:
Name | Type | Attribute | Description |
transactions | Array<Transaction> | ||
blockHeight | number | ||
transactionCache | TransactionCache |
public async get(address: Address, accountType: Account.Type, tree: AccountsTree): Promise<Account> source
Gets the Account-object for an address.
Params:
Name | Type | Attribute | Description |
address | Address | ||
accountType | Account.Type |
|
|
tree | AccountsTree |
|
public getAccountsProof(addresses: Array<Address>): Promise<AccountsProof> source
Params:
Name | Type | Attribute | Description |
addresses | Array<Address> |
public getAccountsTreeChunk(startPrefix: string): Promise<AccountsTreeChunk> source
Params:
Name | Type | Attribute | Description |
startPrefix | string |
public async initialize(genesisBlock: Block, encodedAccounts: string): Promise<void> source
Params:
Name | Type | Attribute | Description |
genesisBlock | Block | ||
encodedAccounts | string |
Return:
Promise<void> |
public partialAccountsTree(): Promise<PartialAccountsTree> source
public async revertBlock(block: Block, transactionCache: TransactionCache): Promise source
Params:
Name | Type | Attribute | Description |
block | Block | ||
transactionCache | TransactionCache |
Return:
Promise |
public async revertBlockBody(body: BlockBody, blockHeight: number, transactionCache: TransactionCache): Promise source
Params:
Name | Type | Attribute | Description |
body | BlockBody | ||
blockHeight | number | ||
transactionCache | TransactionCache |
Return:
Promise |