Constructor Summary
Public Constructor | ||
public |
constructor(blockchain: BaseChain, mempool: Observable, network: Network) |
Member Summary
Public Members | ||
public get |
established: boolean |
|
public get |
|
|
public get |
|
Method Summary
Public Methods | ||
public |
subscribe(subscription: Subscription) |
Protected Methods | ||
protected |
_newConsensusAgent(peer: Peer): BaseConsensusAgent |
|
protected |
_onHeadChanged(head: Block) |
|
protected |
_onPeerJoined(peer: Peer): BaseConsensusAgent |
|
protected |
_onPeerLeft(peer: Peer) |
|
protected |
_onPeerOutOfSync(peer: Peer) |
|
protected |
_onPeerSynced(peer: Peer) |
|
protected |
|
|
protected |
|
|
protected |
async _requestBlockProof(blockHashToProve: Hash, blockHeightToProve: number): Promise<Block> |
|
protected |
async _requestTransactionHistory(address: Address): Promise<Array<{transaction: Transaction, header: BlockHeader}>>{transaction:> |
|
protected |
async _requestTransactionReceipts(address: Address): Promise<Array<TransactionReceipt>> |
|
protected |
async _requestTransactionsProof(addresses: Array<Address>, block: Block): Promise<Array<Transaction>> |
|
protected |
|
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: BaseChain, mempool: Observable, network: Network) source
Override:
Observable#constructorParams:
Name | Type | Attribute | Description |
blockchain | BaseChain | ||
mempool | Observable | ||
network | Network |
Public Methods
public subscribe(subscription: Subscription) source
Params:
Name | Type | Attribute | Description |
subscription | Subscription |
Protected Methods
protected _newConsensusAgent(peer: Peer): BaseConsensusAgent source
Params:
Name | Type | Attribute | Description |
peer | Peer |
protected _onPeerJoined(peer: Peer): BaseConsensusAgent source
Params:
Name | Type | Attribute | Description |
peer | Peer |
protected _onTransactionAdded(tx: Transaction) source
Params:
Name | Type | Attribute | Description |
tx | Transaction |
protected _onTransactionRemoved(tx: Transaction) source
Params:
Name | Type | Attribute | Description |
tx | Transaction |
protected async _requestBlockProof(blockHashToProve: Hash, blockHeightToProve: number): Promise<Block> source
Params:
Name | Type | Attribute | Description |
blockHashToProve | Hash | ||
blockHeightToProve | number |
protected async _requestTransactionHistory(address: Address): Promise<Array<{transaction: Transaction, header: BlockHeader}>>{transaction:> source
Params:
Name | Type | Attribute | Description |
address | Address |
protected async _requestTransactionReceipts(address: Address): Promise<Array<TransactionReceipt>> source
Params:
Name | Type | Attribute | Description |
address | Address |