Options
All
  • Public
  • Public/Protected
  • All
Menu

Listener service

Hierarchy

  • Listener

Implements

Index

Constructors

constructor

Properties

Private SIGINT

SIGINT: boolean = false

Readonly url

url: string

Listener websocket server url. default: rest-gateway's url with ''/ws'' suffix. (e.g. http://localhost:3000/ws)

Methods

aggregateBondedAdded

  • Return an observable of AggregateTransaction for specific address. Each time an aggregate bonded transaction is announced, it emits a new AggregateTransaction in the event stream.

    Parameters

    • unresolvedAddress: UnresolvedAddress

      unresolved address we listen when a transaction with missing signatures state

    • Optional transactionHash: string

      transactionHash for filtering multiple transactions

    • subscribeMultisig: boolean = false

      When true cosigner's multisig account will also be subscribed to the channel

    Returns Observable<AggregateTransaction>

    an observable stream of AggregateTransaction with missing signatures state

aggregateBondedRemoved

  • aggregateBondedRemoved(unresolvedAddress: UnresolvedAddress, transactionHash?: string, subscribeMultisig?: boolean): Observable<string>
  • Returns an observable stream of Transaction Hashes for specific address. Each time an aggregate bonded transaction is announced, it emits a new message with the transaction hash in the event stream.

    Parameters

    • unresolvedAddress: UnresolvedAddress

      unresolved address we listen when a transaction is confirmed or rejected

    • Optional transactionHash: string

      the transaction hash filter.

    • subscribeMultisig: boolean = false

      When true cosigner's multisig account will also be subscribed to the channel

    Returns Observable<string>

    an observable stream of Strings with the transaction hash

close

  • close(): void

confirmed

  • Returns an observable stream of Transaction for a specific address. Each time a transaction is in confirmed state an it involves the address, it emits a new Transaction in the event stream.

    Parameters

    • unresolvedAddress: UnresolvedAddress

      unresolved address we listen when a transaction is in confirmed state

    • Optional transactionHash: string

      transactionHash for filtering multiple transactions

    • subscribeMultisig: boolean = false

      When true cosigner's multisig account will also be subscribed to the channel

    Returns Observable<Transaction>

    an observable stream of Transaction with state confirmed

cosignatureAdded

Private filterHash

  • filterHash(transaction: Transaction, transactionHash: undefined | string): boolean

finalizedBlock

isOpen

  • isOpen(): boolean

newBlock

  • Returns an observable stream of BlockInfo. Each time a new Block is added into the blockchain, it emits a new BlockInfo in the event stream.

    Returns Observable<NewBlock>

    an observable stream of BlockInfo

open

status

Private subscribeWithMultig

Private transactionHashSubscription

  • transactionHashSubscription(channel: ListenerChannelName, unresolvedAddress: UnresolvedAddress, transactionHash: undefined | string, subscribeMultisig?: boolean): Observable<string>
  • Generic subscription for all the transaction hash based channels.

    Parameters

    • channel: ListenerChannelName

      the channel

    • unresolvedAddress: UnresolvedAddress

      the unresolved address

    • transactionHash: undefined | string

      the transaction hash (optional)

    • subscribeMultisig: boolean = false

      When true cosigner's multisig account will also be subscribed to the channel

    Returns Observable<string>

    an observable stream of Strings with the transaction hash

Private transactionSubscription

  • Basic subscription for all the transactions status.

    Type parameters

    Parameters

    • channel: ListenerChannelName

      the transaction based channel

    • unresolvedAddress: UnresolvedAddress

      the unresolved address

    • Optional transactionHash: string

      the transaction hash filter.

    • subscribeMultisig: boolean = false

      When true cosigner's multisig account will also be subscribed to the channel

    Returns Observable<T>

    an observable stream of Transactions

unconfirmedAdded

  • Returns an observable stream of Transaction for a specific address. Each time a transaction is in unconfirmed state an it involves the address, it emits a new Transaction in the event stream.

    Parameters

    • unresolvedAddress: UnresolvedAddress

      unresolved address we listen when a transaction is in unconfirmed state

    • Optional transactionHash: string

      transactionHash for filtering multiple transactions

    • subscribeMultisig: boolean = false

      When true cosigner's multisig account will also be subscribed to the channel

    Returns Observable<Transaction>

    an observable stream of Transaction with state unconfirmed

unconfirmedRemoved

  • unconfirmedRemoved(unresolvedAddress: UnresolvedAddress, transactionHash?: string, subscribeMultisig?: boolean): Observable<string>
  • Returns an observable stream of Transaction Hashes for specific address. Each time a transaction with state unconfirmed changes its state, it emits a new message with the transaction hash in the event stream.

    Parameters

    • unresolvedAddress: UnresolvedAddress

      unresolved address we listen when a transaction is removed from unconfirmed state

    • Optional transactionHash: string

      the transaction hash filter.

    • subscribeMultisig: boolean = false

      When true cosigner's multisig account will also be subscribed to the channel

    Returns Observable<string>

    an observable stream of Strings with the transaction hash

Generated using TypeDoc