All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.17.1 - 2020-07-30
- Do not throw if an unsupported channel update message is received from lnd when opening a channel, instead, wait for a new message.
0.17.0 - 2020-06-03
- Support for
hbit-herc20
andherc20-hbit
swaps. - New
Swap.nextAction
interface, allows to get and execute the next recommended action returned by cnd 0.8.0 and above. - Breaking API Change: Add Bitcoin support for
Transaction
meaning thatAction.execute()
now returnsTransaction
if it's an action on the Bitcoin ledger.
- Breaking API Change: All the
create
routes for creating swaps were reduced to protocol names; ledger and asset were removed from the name. - Breaking API Change: All the
*RequestBody
s for creating swaps were reduced to protocol names; ledger and asset were removed from the name. - Breaking API Change: Siren types are now exported as
siren
to avoid unsuspected name conflicts.
- Remove deprecated
InMemoryBitcoinWallet
.
0.16.1 - 2020-06-02
- New
Swap.nextAction
interface, allows to get and execute the next recommended action returned by cnd 0.8.0 and above.
0.16.0 - 2020-05-05
- Add new function (
getAllSwaps
) toComitClient
which provides the means of retrieving all swaps regardless of their state.
- Breaking API Change: The promise returned by
LightningWallet.sendPayment
now resolves when the payment isin flight
, previously resolving whensettled
.
0.15.6 - 2020-04-27
- Reverted accidental breaking change introduced in version
0.15.3
. Now correctly exporting deprecatedInMemoryBitcoinWallet
.
0.15.5 - 2020-04-24
0.15.4 - 2020-04-24
0.15.3 - 2020-04-20
- Implemented
BitcoinWallet
usingbitcoind
.
- Implementation of
BitcoinWallet
usingbcoin
.
0.15.2 - 2020-03-30
- Method to close
InMemoryBitcoinWallet
.
0.15.1 - 2020-03-26
- Do not throw when attempting to retrieve the status of unconfirmed Ethereum transactions.
- Added optional parameter to
Transaction.status()
to allow to wait for a transaction to be confirmed or rejected before returning.
0.15.0 - 2020-03-25
- Export interfaces of cnd lightning body requests.
Transaction.transactionId
is now public and renamed toTransaction.id
.- Breaking API Change: Correct the type for
alpha_cltv_expiry
&beta_cltv_expiry
. - Mark
address_hint
as optional in cnd Swap Request, as per cnd's API. - Use number chain id instead of string network for Ethereum in lighting routes body request.
- Nest Alpha and Beta parameters in lighting routes body request.
- Breaking API Change: Rename
SwapTransactionStatus
toTransactionStatus
.
0.14.1 - 2020-03-23
- Fix the possible swap status values returned by cnd.
- Cnd's error responses follow the RFC7807 format.
The SDK now recognizes this: Promises returned from calls on
Cnd
will now reject with an instance ofProblem
that contains more detailed information, why the request failed. - New
Transaction
class to easily check the status of a given blockchain transaction.
0.14.0 - 2020-03-05
- Breaking API Change: Changed the
Swap
constructor to simplify internal code. - Expect more fields to be returned in the lightning actions on cnd REST API to confirm the lnd instances to which cnd and the app are connected are the same.
- Breaking API Change:
LightningWallet.SendPayment
helper function now accepts acltvExpiry
argument,memo
has been removed. - Internal improvements on how wallets are handled by introducing the
Wallets
class.
0.13.0 - 2020-03-03
- Add lightning support for swap actions.
0.12.0 - 2020-02-25
- Functions to submit swap request to cnd using the new routes created for Lightning.
- Added lints to enforce
async
keyword and declaration of returned types.
Breaking API Change
: RenameSwap.tryExecuteAction
toSwap.tryExecuteSirenAction
. This should make it more explicit that we are only making an HTTP request to cnd here which might return a ledger action.
0.11.1 - 2020-02-19
- Do not gitignore the
dist/
folder to ensure it is included in the published package, add a CI test to test it.
0.11.0 - 2020-02-19
- Set all files names to snake_case.
Order
interface renamed toOrderParams
,Order
is now a class that allows the taker to check it against criteria.- Replaced
TakerNegotiator.getOrderByTradingPair()
withTakerNegotiator.getOrder()
. - Internal split of
negotiation
module intaker
andmaker
.
0.10.1 - 2020-02-06
- Expose
tryExecuteAction
anddoLedgerAction
of theSwap
class.
0.10.0 - 2020-01-31
Breaking API Change
: No need to initialise aMakerClient
anymore,TakerNegotiator
's constructor directly accept URL to Maker.Breaking API Change
: No need to initialise aMakerHttpApi
, it will be done as part ofMakerNegotiator
and thelisten()
method is moved toMakerNegotiator
too.MakerNegotiator.listen()
now accepts an optional hostname.
MakerNegotiator.getUrl()
returns a string to the maker negotiator external API.
0.9.1 - 2020-01-21
InMemoryBitcoinWallet.getBalance()
correctly returns anumber
instead of astring
.- Typing issues related to the abi in
EthereumWallet
are fixed.
0.9.0 - 2019-12-17
Breaking API
of the negotiation protocol: simplified and renamed interfaces. Make getOrder/takeOrder more explicit for the clientBreaking API
of the Bitcoin wallet. Made the provided wallet to an in-memory wallet only and extracted an interface so that developers can implement their own wallet.
0.8.0 - 2019-12-11
Breaking API
: UseBigNumber
from bignumber.js instead of ethers to support floats
- Support float amount for Ether and ERC20 tokens.
0.7.2 - 2019-12-05
- New function
createActor
to setup an actor'scomitClient
, retrieve itsID
and bundle it with btc/eth wallets.
0.7.1 - 2019-11-29
- Improve negotiation protocol to allow maker to identify a taken order by swap id.
- Auto-accept introduced with negotiation protocol.
0.7.0 - 2019-11-27
- Make alpha and beta expiries optional in
SwapRequest
. ExecutionParams.ledgers
is now optional and defaulted to mainnet values.chain_id
is used for Ethereum meaning thatcomit-rs:^0.4.0
is needed.- Improve
TakerNegotiator
API. - Change
Order
to have all fields in camelCase. - Rename
Swap.getEntity()
&SwapEntity
toSwap.fetchDetails()
&SwapDetails
for clarity. - Improve
TryParams
terminology, use of seconds. - Use nominal amounts (Bitcoin, Ether instead of Satoshi or Wei) in
Order
.
0.6.0 - 2019-11-25
- Return the tx-id instead of the tx-hash for Bitcoin because it is the canonical way of identifying a transaction.
- An order negotiation protocol over HTTP.
0.5.6 - 2019-11-05
- Issue with generated files when publishing.
Swap.getEntity()
to get details of the swap.ComitClient.getPeerId()
to get peer id of cnd.ComitClient.getPeerListenAddresses()
to get addresses on which cnd is listening (comit-p2p protocol).EthereumWallet.getErc20Balance()
to retrieve any ERC20 balance.
- Replace Siren types with Expect Swap types to improve interfaces accuracy.
0.4.1 - 2019-10-29
- Allow creation of Ethereum wallet without HD key. Instead a random HD key is used.
- Make field
self
on classSwap
public to allow for logging of swap identifiers.
0.4.0 - 2019-10-29
- Facade class
ComitClient
that wraps communication with cnd to create and get swaps. - Class
Swap
that provides functions to interact with individual swaps, i.e. accept, decline, deploy, fund, redeem and refund.
- Function
postSwap
in classCnd
actually returns the URL of the swap.
- Method
getSwap
which assumed on classCnd
which assumed a certain path structure that should not be publicly exposed.
0.3.2 - 2019-10-03
- Return swap identifier when sending a swap request.
0.3.1 - 2019-09-26
- Bitcoin wallet: watch the next 100 receive and change addresses.
0.2.0 - 2019-09-25
- Bitcoin wallet: now initialised using a HD key.
- Ethereum wallet: now initialised using a HD key.
0.1.2 - 2019-09-25
- Function to get listen addresses from cnd.
0.1.1 - 2019-09-20
- Common code that can be used to build applications on top of COMIT.