NanoMempool
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(blockchain: IBlockchain) |
Member Summary
Public Members | ||
public get |
length: number |
Method Summary
Public Methods | ||
public |
changeHead(block: Block, transactions: Array<Transaction>) |
|
public |
evictExceptAddresses(addresses: Array<Address>) |
|
public |
getPendingTransactions(address: Address): Array<Transaction> |
|
public |
getTransaction(hash: Hash): Transaction |
|
public |
getTransactions(maxCount: number): Array<Transaction> |
|
public |
async pushTransaction(transaction: Transaction): Promise<boolean> |
|
public |
removeTransaction(transaction: Transaction) |
Inherited Summary
From class Observable | ||
public static get |
WILDCARD: string: string |
|
public |
bubble(observable: Observable, types: ...string) |
|
public |
fire(type: string, args: ...*): Promise | null |
|
public |
off(type: string, id: number) |
|
public |
on(type: string, callback: Function): number |
Public Constructors
public constructor(blockchain: IBlockchain) source
Override:
Observable#constructorParams:
Name | Type | Attribute | Description |
blockchain | IBlockchain |
Public Members
public get length: number source
Public Methods
public changeHead(block: Block, transactions: Array<Transaction>) source
Params:
Name | Type | Attribute | Description |
block | Block | ||
transactions | Array<Transaction> |
public evictExceptAddresses(addresses: Array<Address>) source
Params:
Name | Type | Attribute | Description |
addresses | Array<Address> |
public getPendingTransactions(address: Address): Array<Transaction> source
Params:
Name | Type | Attribute | Description |
address | Address |
public getTransaction(hash: Hash): Transaction source
Params:
Name | Type | Attribute | Description |
hash | Hash |
public getTransactions(maxCount: number): Array<Transaction> source
Params:
Name | Type | Attribute | Description |
maxCount | number |
public async pushTransaction(transaction: Transaction): Promise<boolean> source
Params:
Name | Type | Attribute | Description |
transaction | Transaction |
Return:
Promise<boolean> |
public removeTransaction(transaction: Transaction) source
Params:
Name | Type | Attribute | Description |
transaction | Transaction |