Version: 0.13.0

Cnd

Facilitates access to the [COMIT network daemon (cnd)](@link https://github.com/comit-network/comit-rs) REST API.

Hierarchy

  • Cnd

Index

Constructors

Methods

Constructors

constructor

+ new Cnd(cndUrl: string): Cnd

Defined in cnd/cnd.ts:241

Parameters:

NameType
cndUrlstring

Returns: Cnd

Methods

createHalightLightningBitcoinHanEthereumEther

createHalightLightningBitcoinHanEthereumEther(body?: any): Promise‹string›

Defined in cnd/cnd.ts:347

Post a swap request on the lightning REST API route of cnd /swaps/halight/lightning/bitcoin/han/ethereum/ether

Parameters:

NameTypeDescription
body?anyThe body to set in the request. The design being not yet finalised it is optional and of type any

Returns: Promise‹string›

The location of the swap (href) as returned by the REST API in the location header.


createHalightLightningBitcoinHerc20EthereumErc20

createHalightLightningBitcoinHerc20EthereumErc20(body?: any): Promise‹string›

Defined in cnd/cnd.ts:367

Post a swap request on the lightning REST API route of cnd /swaps/halight/lightning/bitcoin/herc20/ethereum/erc20

Parameters:

NameTypeDescription
body?anyThe body to set in the request. The design being not yet finalised it is optional and of type any

Returns: Promise‹string›

The location of the swap (href) as returned by the REST API in the location header.


createHanEthereumEtherHalightLightningBitcoin

createHanEthereumEtherHalightLightningBitcoin(body?: any): Promise‹string›

Defined in cnd/cnd.ts:307

Post a swap request on the lightning REST API route of cnd /swaps/han/ethereum/ether/halight/lightning/bitcoin

Parameters:

NameTypeDescription
body?anyThe body to set in the request. The design being not yet finalised it is optional and of type any

Returns: Promise‹string›

The location of the swap (href) as returned by the REST API in the location header.


createHerc20EthereumErc20HalightLightningBitcoin

createHerc20EthereumErc20HalightLightningBitcoin(body?: any): Promise‹string›

Defined in cnd/cnd.ts:327

Post a swap request on the lightning REST API route of cnd /swaps/herc20/ethereum/erc20/halight/lightning/bitcoin

Parameters:

NameTypeDescription
body?anyThe body to set in the request. The design being not yet finalised it is optional and of type any

Returns: Promise‹string›

The location of the swap (href) as returned by the REST API in the location header.


executeSirenAction

executeSirenAction(action: Action, resolver?: FieldValueResolverFn): Promise‹AxiosResponse›

Defined in cnd/cnd.ts:290

Parameters:

NameType
actionAction
resolver?FieldValueResolverFn

Returns: Promise‹AxiosResponse›


fetch

fetch<T>(path: string): AxiosPromise‹T›

Defined in cnd/cnd.ts:282

Type parameters:

T

Parameters:

NameType
pathstring

Returns: AxiosPromise‹T›


getPeerId

getPeerId(): Promise‹string›

Defined in cnd/cnd.ts:247

Returns: Promise‹string›


getPeerListenAddresses

getPeerListenAddresses(): Promise‹string[]›

Defined in cnd/cnd.ts:255

Returns: Promise‹string[]›


getSwaps

getSwaps(): Promise‹SwapSubEntity[]›

Defined in cnd/cnd.ts:276

Returns: Promise‹SwapSubEntity[]›


postSwap

postSwap(swap: SwapRequest): Promise‹string›

Defined in cnd/cnd.ts:263

Parameters:

NameType
swapSwapRequest

Returns: Promise‹string›