Constructors
constructor
-
Parameters
-
baseUrl: string
-
chainId: ChainId
-
Methods
getAccount
- getAccount(query: AccountQuery): Promise<Account | undefined>
-
Parameters
Returns Promise<Account | undefined>
getAllTokens
- getAllTokens(): Promise<keyof Token[]>
-
Returns Promise<keyof Token[]>
getBlockHeader
- getBlockHeader(height: number): Promise<BlockHeader>
-
Parameters
Returns Promise<BlockHeader>
getFeeQuote
- getFeeQuote(transaction: UnsignedTransaction): Promise<Fee>
-
Parameters
-
transaction: UnsignedTransaction
Returns Promise<Fee>
getNonce
- getNonce(query: AddressQuery | PubkeyQuery): Promise<Nonce>
-
Parameters
-
query: AddressQuery | PubkeyQuery
Returns Promise<Nonce>
getNonces
- getNonces(query: AddressQuery | PubkeyQuery, count: number): Promise<keyof Nonce[]>
-
Parameters
-
query: AddressQuery | PubkeyQuery
-
count: number
Returns Promise<keyof Nonce[]>
getSwaps
- getSwaps(query: AtomicSwapQuery, minHeight?: number, maxHeight?: number): Promise<keyof AtomicSwap[]>
-
Parameters
-
query: AtomicSwapQuery
-
Default value minHeight: number = 0
-
Default value maxHeight: number = Number.MAX_SAFE_INTEGER
Returns Promise<keyof AtomicSwap[]>
getToken
- getToken(searchTicker: TokenTicker): Promise<Token | undefined>
-
Parameters
-
searchTicker: TokenTicker
Returns Promise<Token | undefined>
getTx
- getTx(id: TransactionId): Promise<ConfirmedAndSignedTransaction<UnsignedTransaction>>
-
Parameters
Returns Promise<ConfirmedAndSignedTransaction<UnsignedTransaction>>
height
- height(): Promise<number>
listenTx
- listenTx(query: TransactionQuery): Stream<ConfirmedTransaction<LightTransaction> | FailedTransaction>
-
Parameters
Returns Stream<ConfirmedTransaction<LightTransaction> | FailedTransaction>
liveTx
- liveTx(query: TransactionQuery): Stream<ConfirmedTransaction<LightTransaction> | FailedTransaction>
-
Parameters
Returns Stream<ConfirmedTransaction<LightTransaction> | FailedTransaction>
postTx
- postTx(bytes: PostableBytes): Promise<PostTxResponse>
-
Parameters
Returns Promise<PostTxResponse>
searchTx
- searchTx(query: TransactionQuery): Promise<keyof ConfirmedTransaction<LightTransaction>[]>
-
Parameters
Returns Promise<keyof ConfirmedTransaction<LightTransaction>[]>
watchAccount
- watchAccount(query: AccountQuery): Stream<Account | undefined>
-
Parameters
Returns Stream<Account | undefined>
watchBlockHeaders
- watchBlockHeaders(): Stream<BlockHeader>
-
Returns Stream<BlockHeader>
watchSwaps
- watchSwaps(_: AtomicSwapQuery): Stream<AtomicSwap>
-
Parameters
Returns Stream<AtomicSwap>
withDefaultFee
- withDefaultFee<T>(transaction: T): Promise<T>
-
Type parameters
Parameters
Returns Promise<T>
Static createErc20SwapId
- createErc20SwapId(): Promise<SwapId>
Static createEtherSwapId
- createEtherSwapId(): Promise<SwapId>