Interface IListener

Listener service

Hierarchy

  • IListener

Implemented by

Index

Properties

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

    • address: Address

      address we listen when a transaction with missing signatures state

    • Optional transactionHash: undefined | string

      transactionHash for filtering multiple transactions

    Returns Observable<AggregateTransaction>

    an observable stream of AggregateTransaction with missing signatures state

aggregateBondedRemoved

  • aggregateBondedRemoved(addressAddress, transactionHash?: undefined | string)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

    • address: Address

      address we listen when a transaction is confirmed or rejected

    • Optional transactionHash: undefined | string

      the transaction hash filter.

    Returns Observable<string>

    an observable stream of Strings with the transaction hash

close

  • close()void

confirmed

  • confirmed(addressAddress, transactionHash?: undefined | string)Observable<Transaction>
  • 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

    • address: Address

      address we listen when a transaction is in confirmed state

    • Optional transactionHash: undefined | string

      transactionHash for filtering multiple transactions

    Returns Observable<Transaction>

    an observable stream of Transaction with state confirmed

cosignatureAdded

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 NewBlock

open

  • open()Promise<void>

status

  • Returns an observable stream of TransactionStatusError for specific address. Each time a transaction contains an error, it emits a new message with the transaction status error in the event stream.

    Parameters

    • address: Address

      address we listen to be notified when some error happened

    • Optional transactionHash: undefined | string

      transactionHash for filtering multiple transactions

    Returns Observable<TransactionStatusError>

    an observable stream of TransactionStatusError

unconfirmedAdded

  • unconfirmedAdded(addressAddress, transactionHash?: undefined | string)Observable<Transaction>
  • 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

    • address: Address

      address we listen when a transaction is in unconfirmed state

    • Optional transactionHash: undefined | string

      transactionHash for filtering multiple transactions

    Returns Observable<Transaction>

    an observable stream of Transaction with state unconfirmed

unconfirmedRemoved

  • unconfirmedRemoved(addressAddress, transactionHash?: undefined | string)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

    • address: Address

      address we listen when a transaction is removed from unconfirmed state

    • Optional transactionHash: undefined | string

      the transaction hash filter.

    Returns Observable<string>

    an observable stream of Strings with the transaction hash