Cnd
Facilitates access to the [COMIT network daemon (cnd)](@link https://github.com/comit-network/comit-rs) REST API.
Hierarchy
- Cnd
Index
Constructors
Methods
- createHalightLightningBitcoinHanEthereumEther
- createHalightLightningBitcoinHerc20EthereumErc20
- createHanEthereumEtherHalightLightningBitcoin
- createHerc20EthereumErc20HalightLightningBitcoin
- executeSirenAction
- fetch
- getPeerId
- getPeerListenAddresses
- getSwaps
- postSwap
Constructors
constructor
+ new Cnd(cndUrl
: string): Cnd
Defined in cnd/cnd.ts:241
Parameters:
Name | Type |
---|---|
cndUrl | string |
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:
Name | Type | Description |
---|---|---|
body? | any | The 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:
Name | Type | Description |
---|---|---|
body? | any | The 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:
Name | Type | Description |
---|---|---|
body? | any | The 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:
Name | Type | Description |
---|---|---|
body? | any | The 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:
Name | Type |
---|---|
action | Action |
resolver? | FieldValueResolverFn |
Returns: Promise‹AxiosResponse›
fetch
▸ fetch<T>(path
: string): AxiosPromise‹T›
Defined in cnd/cnd.ts:282
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
path | string |
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:
Name | Type |
---|---|
swap | SwapRequest |
Returns: Promise‹string›