acdibble
released this
04 Apr 08:46
·
366 commits
to main
since this release
1.3.0
Added
SwapSDK.prototype.requestDepositAddress
now returns thechannelOpeningFee
,
of typebigint
. It is measured in Flipperino (the base unit of $FLIP). This
fee is incurred when a broker opens a swap deposit channel.SwapSDK.prototype.channelOpeningFees
has been added and returns the channel
opening fee for each chain. It returns a map of each supported
ChainflipChain
to abigint
which is the fee in Flipperino to open a swap
deposit channel.SwapSDK.prototype.getRequiredBlockConfirmations
has been added. It returns
ChainMap<number | null>
which signifies 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.USDT
has been added to ourChainAssetMap
data structure under the
Ethereum
key:
type ChainAssetMap<T> = {
Bitcoin: {
BTC: T;
};
Ethereum: {
ETH: T;
USDC: T;
FLIP: T;
+ USDT: T;
};
Polkadot: {
DOT: T;
};
}
broadcastTransactionRef
has been added to thegetStatus
response for
swaps in theBROADCASTED
andCOMPLETE
state. 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}
.
Changed
SwapSDK.prototype.getRequiredBlockConfirmations
now has a return type of
ChainMap<number | null>
instead ofChainMap<number | undefined>
to be more
consistent with existing return types.SwapSDK.prototype.getAssets
now uses thecf_supported_assets
RPC method to
determine the supported assets of the connected Chainflip network. The format
of the returned data was not changed.SwapSDK.prototype.getChains
now uses thecf_supported_assets
RPC method to
determine the supported chains of the connected Chainflip network. The format
of the returned data was not changed.
Deprecated
getQuote
can respond with a 500 status code and a JSON response body with an
stringerror
field. A duplicatemessage
field has been added to be
consistent with error handling with other parts of the API. Theerror
field
will be removed in a future release.
Fixed
getQuote
can respond with a 500 status code and a JSON response body with an
stringerror
field. This field has been duplicated asmessage
to be inline
with how errors are handled in the other methods. Theerror
field has been
deprecated and will be removed after 1.4.0- removed the
0x
prefix from Bitcoin transaction hashes in the status response
Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.2.2...@chainflip/sdk/v1.3.0