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:211

Parameters:

NameType
cndUrlstring

Returns: Cnd

Methods

executeSirenAction

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

Defined in cnd/cnd.ts:260

Parameters:

NameType
actionAction
resolver?FieldValueResolverFn

Returns: Promise‹AxiosResponse›


fetch

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

Defined in cnd/cnd.ts:252

Type parameters:

T

Parameters:

NameType
pathstring

Returns: AxiosPromise‹T›


getPeerId

getPeerId(): Promise‹string›

Defined in cnd/cnd.ts:217

Returns: Promise‹string›


getPeerListenAddresses

getPeerListenAddresses(): Promise‹string[]›

Defined in cnd/cnd.ts:225

Returns: Promise‹string[]›


getSwaps

getSwaps(): Promise‹SwapSubEntity[]›

Defined in cnd/cnd.ts:246

Returns: Promise‹SwapSubEntity[]›


postHalightLightningBitcoinHanEthereumEther

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

Defined in cnd/cnd.ts:317

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.


postHalightLightningBitcoinHerc20EthereumErc20

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

Defined in cnd/cnd.ts:337

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.


postHanEthereumEtherHalightLightningBitcoin

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

Defined in cnd/cnd.ts:277

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.


postHerc20EthereumErc20HalightLightningBitcoin

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

Defined in cnd/cnd.ts:297

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.


postSwap

postSwap(swap: SwapRequest): Promise‹string›

Defined in cnd/cnd.ts:233

Parameters:

NameType
swapSwapRequest

Returns: Promise‹string›