Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AtomicSwapConnection

An optional extension to the base BlockchainConnection that allows querying and watching atomic swaps

Hierarchy

Index

Properties

chainId

chainId: function

Type declaration

disconnect

disconnect: function

Type declaration

    • (): void
    • Returns void

getAccount

getAccount: function

Get the current account information (e.g. balance)

If an account is not found on the blockchain, this returns undefined.

Type declaration

getAllTokens

getAllTokens: function

Type declaration

    • (): Promise<keyof Token[]>
    • Returns Promise<keyof Token[]>

getBlockHeader

getBlockHeader: function

Type declaration

getFeeQuote

getFeeQuote: function

Type declaration

getNonce

getNonce: function

Get a nonce for the next transaction signature.

Implementation defines a default value if blockchain does not provide a nonce.

Type declaration

getNonces

getNonces: function

Get multiple nonces at once to sign multiple transactions

This avoids querying the blockchain for every nonce and removes the need to wait for blocks before getting updated nonces.

Type declaration

getSwaps

getSwaps: function

returns all matching swaps in their current state

Type declaration

getToken

getToken: function

Type declaration

getTx

getTx: function

height

height: function

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

listenTx

listenTx: function

Subscribes to all newly added transactions that match the query

liveTx

liveTx: function

Returns a stream for all historical transactions that match the query, along with all new transactions arriving from listenTx

postTx

postTx: function

Type declaration

searchTx

searchTx: function

Type declaration

    • (query: TransactionQuery): Promise<keyof (FailedTransaction | ConfirmedTransaction<LightTransaction>)[]>
    • Parameters

      Returns Promise<keyof (FailedTransaction | ConfirmedTransaction<LightTransaction>)[]>

watchAccount

watchAccount: function

Type declaration

watchBlockHeaders

watchBlockHeaders: function

Type declaration

watchSwaps

watchSwaps: function

Emits currentState (getSwaps) as a stream, then sends updates for any matching swap.

This includes an open swap beind claimed/expired as well as a new matching swap being offered

Type declaration

withDefaultFee

withDefaultFee: function

Type declaration

    • <T>(tx: T): Promise<T>

Generated using TypeDoc