Options
All
  • Public
  • Public/Protected
  • All
Menu

Listener service

Hierarchy

  • Listener

Implements

Index

Constructors

constructor

Properties

Private SIGINT

SIGINT: boolean = false

Private Optional multisigRepository

multisigRepository: MultisigRepository

Multisig repository for resolving multisig accounts

Private namespaceRepository

namespaceRepository: NamespaceRepository

NamespaceRepository interface for resolving alias.

Readonly url

url: string

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

Private Optional websocketInjected

websocketInjected: any

(Optional) WebSocket injected when using listeners in client.

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: undefined | string

      transactionHash for filtering multiple transactions

    • Default value 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?: undefined | 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: undefined | string

      the transaction hash filter.

    • Default value 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

  • confirmed(unresolvedAddress: UnresolvedAddress, transactionHash?: undefined | string, subscribeMultisig?: boolean): 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

    • unresolvedAddress: UnresolvedAddress

      unresolved address we listen when a transaction is in confirmed state

    • Optional transactionHash: undefined | string

      transactionHash for filtering multiple transactions

    • Default value 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

  • Returns an observable stream of CosignatureSignedTransaction for specific address. Each time a cosigner signs a transaction the address initialized, it emits a new message with the cosignatory signed transaction in the even stream. this.subscribeTo(cosignature/${address.plain()};

    Parameters

    • unresolvedAddress: UnresolvedAddress

      unresolved address we listen when a cosignatory is added to some transaction address sent

    • Default value subscribeMultisig: boolean = false

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

    Returns Observable<CosignatureSignedTransaction>

    an observable stream of CosignatureSignedTransaction

Private filterHash

  • filterHash(transaction: Transaction, transactionHash: string | undefined): 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

  • open(): Promise<void>

status

Private subscribeWithMultig

Private transactionHashSubscription

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

    Parameters

    • channel: ListenerChannelName

      the channel

    • unresolvedAddress: UnresolvedAddress

      the unresolved address

    • transactionHash: string | undefined

      the transaction hash (optional)

    • Default value 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: undefined | string

      the transaction hash filter.

    • Default value 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

  • unconfirmedAdded(unresolvedAddress: UnresolvedAddress, transactionHash?: undefined | string, subscribeMultisig?: boolean): 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

    • unresolvedAddress: UnresolvedAddress

      unresolved address we listen when a transaction is in unconfirmed state

    • Optional transactionHash: undefined | string

      transactionHash for filtering multiple transactions

    • Default value 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?: undefined | 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: undefined | string

      the transaction hash filter.

    • Default value 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