Skip to content

Releases: chainflip-io/chainflip-sdk-monorepo

@chainflip/sdk/v1.7.0

20 Dec 12:27
7bed81f
Compare
Choose a tag to compare

1.7.0

Added

  • A new method has been added to the SwapSDK, requestDepositAddressV2. This
    event simplifies deposit channel creation by accepting the quote that is
    returned by the SDK to set the correct assets, DCA parameters, and Boost fee.
  • A new method has been added to the SwapSDK, approveAndExecuteSwap.
    This is a convenience method that can be used to skip the manual token
    allowance approval. Upon calling, the method will make sure there is enough
    ERC20 token allowance before proceeding with initiating the swap.
  • SwapSDK.prototype.getQuoteV2 returns a recommendedSlippageTolerancePercent
    property now. The value is calculated based on current market conditions to prevent
    refunds while protecting against big price movements. It can be passed into
    the requestDepositAddressV2 method to set the slippage tolerance for a swap.
  • SwapSDK.prototype.getStatusV2 and SwapSDK.prototype.getQuoteV2 return an
    estimatedDurationsSeconds property now. It includes the estimated time in seconds
    different stages of a swap:
    • deposit: time for a deposit to be witnessed and the respective swap being scheduled
    • swap: time for a swap to be fully executed
    • egress: time until the output transaction is included in a block

Changed

  • Fill or Kill parameters are now mandatory when opening a deposit channel through
    the default broker endpoint. If you are using your own broker, the parameters are
    still optional for now.
  • SwapSDK.prototype.getStatus: deprecated depositTransactionHash was removed.
    Use depositTransactionRef instead.
  • SwapSDK.prototype.getStatus: deprecated ccmMetadata was removed.
    Use ccmParams instead.
  • SwapSDK.prototype.requestDepositAddress: deprecated ccmMetadata was removed.
    Use ccmParams instead.
  • SwapSDK.prototype.executeSwap: deprecated ccmMetadata was removed.
    Use ccmParams instead.

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.6.6...@chainflip/sdk/v1.7.0

@chainflip/sdk/v1.6.6

20 Dec 12:27
dadfc9f
Compare
Choose a tag to compare

1.6.6

Fixed

  • Polkadot destination address were being improperly validated before being sent
    to the broker.

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.6.5...@chainflip/sdk/v1.6.6

@chainflip/sdk/v1.6.5

20 Dec 12:26
e91f0b4
Compare
Choose a tag to compare

1.6.5

Changed

  • In order to open a DCA deposit channel, Fill or Kill parameters must now be
    provided.

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.6.4...@chainflip/sdk/v1.6.5

@chainflip/sdk/v1.6.4

20 Dec 12:26
3dc3e33
Compare
Choose a tag to compare

1.6.4

Changed

  • Optional parameter to enable DCA during SDK initialization. The default value
    for this parameter is false.
    new ChainflipSDK({
      ...
      enabledFeatures: {
        dca: true;
      };
    });

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.6.3...@chainflip/sdk/v1.6.4

@chainflip/sdk/v1.6.3

20 Dec 12:26
afccef5
Compare
Choose a tag to compare

1.6.3

Fixed

  • Fixed a bug in the smart contract swaps where the CF Parameters were not being
    properly passed to the smart contract call.

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.6.2...@chainflip/sdk/v1.6.3

@chainflip/sdk/v1.6.2

20 Dec 12:25
f9f995f
Compare
Choose a tag to compare

1.6.2

Changed

  • Upgraded our internal RPC package to remove a web API and improve
    compatibility with React Native/the Hermes compiler.

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.6.1...@chainflip/sdk/v1.6.2

@chainflip/sdk/v1.6.1

20 Dec 12:25
55cd704
Compare
Choose a tag to compare

1.6.1

Changed

  • Upgraded our internal Bitcoin package to remove WebAssembly. The WebAssembly
    caused issues with React Native users as there is no WebAssembly runtime.

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.6.0...@chainflip/sdk/v1.6.1

@chainflip/sdk/v1.6.0

20 Dec 12:25
2643e68
Compare
Choose a tag to compare

1.6.0

See migration guide here

Deprecated

  • SwapSDK.prototype.getQuote is now deprecated
  • SwapSDK.prototype.getStatus is now deprecated

Added

  • SwapSDK.prototype.getQuoteV2
    • Returns an array of quotes instead of single quote and includes new properties.
      • type: quote type (DCA or REGULAR)
      • dcaParams: object with numberOfChunks and chunkIntervalBlocks
  • SwapSDK.prototype.getStatusV2
    • Revamped statuses and support for dca swaps
  • SwapSDK.prototype.requestDepositAddress supports an optional
    dcaParams option. It includes
    • numberOfChunks: The number of chunks to split the swap into
    • chunkIntervalBlocks: Interval in state-chain blocks between each chunk. (minimum value: 2 blocks)

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.5.0...@chainflip/sdk/v1.6.0

@chainflip/sdk/v1.5.0

20 Dec 12:24
f324dd2
Compare
Choose a tag to compare

1.5.0

Added

  • SwapSDK.prototype.requestDepositAddress supports an optional
    FillOrKillParams option. It includes
    • retryDurationBlocks: number of blocks to retry the swap if the price was
      lower than the minPrice
    • refundAddress: the address to refund the funds to in case the price limit
      was never met
    • minPrice: the minimum price that the swap can happen at. The swap will not
      go through if the price is below this value
  • SwapSDK.prototype.getStatus will return a depositTransactionRef. This
    references the transaction that triggered a swap. For Bitcoin and EVM chains,
    this is a transaction hash. For Polkadot, it is a block number and extrinsic
    index in the format of ${blockNumber}-${extrinsicIndex}.
  • SwapSDK.prototype.getStatus will return a
    srcChainRequiredBlockConfirmations. This is the number of confirmations the
    protocol requires before recognizing a transaction as confirmed. For networks
    like Polkadot, there is deterministic finality, and therefore, no confirmation
    count is required.
  • SwapSDK.prototype.getStatus will return FillOrKillParams that includes
    • retryDurationBlocks: number of state chain blocks to continue retrying the
      swap if the price is below the expected price
    • refundAddress: the address to return the funds to in case of not reaching
      the expected price
    • minPrice: the minimum price that the swap can happen at
  • egressType property has been added to EGRESS_SCHEDULED,
    BROADCAST_REQUESTED, BROADCASTED, COMPLETE and BROADCAST_ABORTED
    states which can be SWAP or REFUND. Refund may happen in case of a fill or
    kill swap.
  • New failure values added under the FAILED state
    • REFUND_EGRESS_IGNORED: This happens if the refund egress has been ignored,
      most likely due to refund egress amount being lower than the egress fee.

Fixed

  • SwapSDK.prototype.getStatus returned a broadcastTransactionRef with a 0x
    prefix for bitcoin transactions previously. This is not accepted by popular
    bitcoin block explorers and was therefore adjusted to not return a 0x
    prefix. The returned data was not changed for other chains.
  • SwapSDK.prototype.getStatus will return deposit channel info even when
    querying directly by swap id.

Removed

  • getQuote used to respond with a 500 status code and a JSON response body
    with a string error field. A duplicate message field was added in version
    1.3 to be consistent with error handling with other parts of the API. The
    error field has be removed.

Deprecated

  • SwapSDK.prototype.getStatus: depositTransactionHash is deprecated and will
    be removed in a future release. Use depositTransactionRef instead.
  • SwapSDK.prototype.getStatus: ccmMetadata is deprecated and will be removed
    in a future release. Use ccmParams instead.
  • SwapSDK.prototype.requestDepositAddress: ccmMetadata is deprecated and
    will be removed in a future release. Use ccmParams instead.
  • SwapSDK.prototype.executeSwap: ccmMetadata is deprecated and will be
    removed in a future release. Use ccmParams instead.

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.4.2...@chainflip/sdk/v1.5.0

@chainflip/sdk/v1.4.2

20 Dec 12:24
4b6401b
Compare
Choose a tag to compare

1.4.2

  • SwapSDK.prototype.getBoostLiquidity - new method that returns the current
    liquidity state of the boost pools. Supports filtering of the results by:
    • chainAsset: UncheckedAssetAndChain - the combination of chain & asset (for
      ex. { chain: "Bitcoin", asset: "BTC" })
    • feeTierBps: number - the fee tier of the pool (for ex. 5, 10, 30)

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.4.0...@chainflip/sdk/v1.4.2