This repository contains everything partners need to launch the link, and make transactions on IMX. For all documentation needs, please go to docs.x.immutable.com
Note: Currently our SDK is only officially compatible with Node v18.
- ImmutableX Javascript SDK
-
CHANGELOG
-
Index
- 3.8.2
- 3.8.1
- 3.8.0
- 3.7.1
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.1.1
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.43.7
- 1.43.6
- 1.43.5
- 1.43.4
- 1.43.3
- 1.43.2
- 1.43.1
- 1.43.0
- 1.42.1
- 1.42.0
- 1.41.3
- 1.41.2
- 1.41.1
- 1.41.0
- 1.40.1
- 1.40.0
- 1.39.1
- 1.39.0
- 1.38.6
- 1.38.5
- 1.38.4
- 1.38.3
- 1.38.2
- 1.38.1
- 1.38.0
- 1.37.6
- 1.37.5
- 1.37.4
- 1.37.3
- 1.37.2
- 1.37.1
- 1.37.0
- 1.36.1
- 1.36.0
- 1.35.7
- 1.35.6
- 1.35.5
- 1.35.4
- 1.35.3
- 1.35.2
- 1.35.1
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.2
- 1.32.1
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.1
- 1.26.0
- 1.25.1
- 1.25.0
- 1.24.1
- 1.24.0
- 1.23.0
- 1.22.3
- 1.22.1
- 1.22.0
- 1.21.4
- 1.21.3
- 1.21.2
- 1.21.1
- 1.21.0
- 1.20.4
- 1.20.3
- 1.20.2
- 1.20.1
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.1
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.1
- 1.11.0
- 1.10.2
- 1.10.1
- 1.10.0
- 1.9.1
- 1.9.0
- 1.8.3
- 1.8.2
- 1.8.0
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.53
- 1.3.52
- 1.3.51
- 1.3.50
- 1.3.49
- 1.3.48
- 1.3.47
- 1.3.46
- 1.3.45
- 1.3.44
- 1.3.43
- 1.3.42
- 1.3.41
- 1.3.40
- 1.3.39
- 1.3.38
- 1.3.37
- 1.3.36
- 1.3.35
- 1.3.34
- 1.3.33
- 1.3.32
- 1.3.31
- 1.3.30
- 1.3.29
- 1.3.28
- 1.3.27
- 1.3.26
- 1.3.25
- 1.3.24
- 1.3.23
- 1.3.22
- 1.3.21
- 1.3.20
- 1.3.19
- 1.3.18
- 1.3.17
- 1.3.16
- 1.3.15
- 1.3.14
- 1.3.13
- 1.3.12
- 1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.1.6
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
-
Index
- Maintainers
- Fix ERC20 withdrawals by updating retrieval of asset type from encoding API and removing decimal from payload.
- Fix NFT withdrawals by updating generation of asset ID to use encoding API.
- Add
getStarkExContractMajorVersion
to return the StarkEx contract version number.
- Update withdrawal tests.
- Simplify withdrawal V2 token logic.
- Fix use of ownerKey in withdrawal V2.
- Add support for ERC721 token type to complete withdrawal and register and complete withdrawal flows when StarkEx contract version >= 4.0.
- Add
registerAndCompleteWithdrawal
to allow an unregistered user to complete withdrawal using updated exchange contract. - Add
withdrawalAll
to call updated exchange contract. - Update
getWithdrawalBalanceV4
to usecontroller.getAssetId
when StarkEx contract version >= 4.0.
- Add
completeWithdrawalV2F
. - Update
completeWithdrawalF
to usecompleteWithdrawalV2F
when StarkEx contract version >= 4.0. - Update
isRegisteredStarkF
to be compatible with change in behavior ofgetEthAddress
StarkEx contract function in v4.
- Add StarkEx V4.0 contract bindings.
- Add registerEthAddress to enable use of function on StarkEx V4.0.
- Update prepare withdrawal flow to fetch StarkEx contract version and execute logic appropriate for the version.
- Update deposit flow to fetch StarkEx contract version and execute the deposit flow appropriate for the version.
- Add
getStarkExContractVersion
to fetch the StarkEx contract version.
- Extend order
quantity_with_fees
type range to include0
.
- Fix bug where
window.ethereum
has multipleproviders
, but nosetSelectedProvider
function.
- Bump Ethers version to
^5.7.1
to support Sepolia.
- Remove functions that interface with v1 orders & trades API endpoints as v1 version of that API has been sunsetted.
- Removed orderAndTradeAPIVersion parameter from the Link class constructor, this is no longer needed as order and trade API version 3 will be the only available default.
- Added sunset date for v1 order book functions
- Add New Ganymede as game wallet provider preference type
- Added support to generate backwards compatible stark key using
getKeyPairFromPath
for accounts created with versions before 1.43.5 and also imx-core-sdk
- fix readme.md
- remove
wallet_connect
provider preference to clean up after removal - updates to readme
- Deprecate all
@walletconnect/*
deps - Refactor build tooling to support Node 18 (upgrades to Rollup 3.x)
- Update
magic-sdk
to support Node 18
For more information on migration, please see: https://docs.x.immutable.com/docs/x/node16-migration/
- Fixed GrindKey logic to correctly generate deterministic stark key.
- Provided backwards compatible way to generate starkkey after this GrindKey Fix.
- Deprecate v1 versions of getTrade and getTrades functions.
- Add v3 versions of getTrade and getTrades functions.
- Fix readme index
- Fix an issue when attempting a Transfer with a Link SDK created with a value for the orderAndTradeAPIVersion parameter.
- Fix createOrderRequestV3F function implementation.
- Add unit tests for v3 order & trade functions.
- Add SDK dependency tracking.
- Update critical dependencies.
- Add Planet quest marketplace domains to experimental feature whitelist.
- Remove experimental tag from bids/offers functions.
- Add optional parameter in the Link constructor function to allow targeting v3 endpoints for order and trade flows.
- Revert changes from 1.42.0. Problem with transpiling Web3Modal package
- Add support for WalletConnect V2.
- Added
wallet_connect_v2
as a ProviderPreference
- Add token type, token address, decimals, and symbol to Maker Taker Fees type
- Add updated_timestamp to Get Order V3 result
- Fix changelog
- Add deprecation headers and warning logs for deprecated functions
- Add support for the optional
splitFees
parameter when invokingImmutableXClient.createOrderV3
- Removed experimental flags on bids/offers endpoints
- Introduced maker_fees and taker_fees fields to the getOrderV3 and getOrdersV3 endpoints
- Add
imx-link-info
events for disptaching wallet change events on the buy route - With game wallets and their specific collections, the
link.buy()
route may suggest that users connect with a specific game wallet before purchasing, this will dispatch an event so that marketplaces are kept in sync with the Link connected wallet provider
- Fix broken import in gameWalletProvider
- Add support for Game Wallet Auto Detect feature in Link
- Add Cross the Ages and KYO as game wallet provider preference types
- Add support for taker fees to signature generation process in CreateOrderWithFeeV3
- Add support for taker fees to CreateTradeV3
- Add support for taker fees to Link AcceptOffer parameters
- Add Planet quest URLs to experimental feature whitelist
- Bugfix for dangling event handlers
- Rename gameIcon to gameIconUrl in GameWalletProviderOptions type
- Add game wallet provider setup to
getEthereumProvider
- Allow for providerPreference to be extended for game wallet providers
- Update parameter name for primary and secondary sales:
wallet_address
is nowuser_wallet_address
- Update typo in whitelisted domain
nfttrade.com
->nftrade.com
- Updated whitelisted domains to include
tokentrove.com
,okx.com
andnfttrade.com
- Updated
ImmutableOrderStatus
typeinvalid
-> renamed toinactive
to match API responses - Updated
ImmutableFeeType
type to includemaker
andtaker
- Updated
ImmutableOrderStatus
type to includeinvalid
- Updated
ImmutableXClient
to enhance internal error handlers
- Add fees parameter to
link.makeOffer
function
- Update supported exchange types for
getCurrenciesV3()
- Add experimental
getCurrenciesV3()
- Remove experimental flag from nftCheckout and createExchangeV3 methods
- Fix return value for
getSecondaryTransactionsHistory()
- Added method
isMobile()
- Add experimental method
getSecondaryTransactionsHistory()
- Update
supported_currencies
inWidgetParams
- Add
onramp
andofframp
inImmutableExchangeType
- Add
provider
inNFTCheckoutPrimaryParamsCodec
- Exclude
sellerWalletAddress
fromNFTCheckoutSecondaryParamsCodec
- Exclude
seller_wallet_address
fromnftCheckoutPrimary
- Added third-party cookie blocking policy check when running Link methods on
the iFrame mode to return error
1004
if third-party cookies blocked - Updated Link methods to return defined errors when rejecting asynchrounous operations
- Updated Link methods to return error
1003
if the user closes Link - Updated Link methods to return error
1005
if the domain is not authorized to use the iFrame mode
- Add experimental method for creating a buy order
createOrderV3
- Add experimental method for accepting a buy order
createTradeV3
- Add experimental method for cancelling a buy order
cancelOrderV3
- Add experimental
nftCheckoutPrimary
,nftCheckoutSecondary
,getNFTSecondaryTransactionStatus
andcreateExchangeV3
methods
- Add id param to exchange signable-transfer-details
- Fixing event listener origin path
- Revert changes from 1.31.0
- Updating
ImmutableETHToken
andImmutableERC20Token
types to include quantity_with_fees property
- Add experimental method for acceptOffer
link.acceptOffer
- Update Ropsten config to Sandbox/Goerli.
- Add experimental methods for makeOffer
link.makeOffer
and cancelOfferlink.cancelOffer
- Add experimental
getPrimaryTransactions
method
- Update
getEthereumProvider
method to detect multiple wallet extensions properly
- Remove syncState method
- Update PrimaryTransactionStatus to support
waitingAuthorization
transaction status
- Add experimental createNFTPrimaryTransaction and getNFTPrimaryTransactionStatus methods to create/get primary sale transaction
- Update default
webUrl
in Link to https://link.ropsten.x.immutable.com
- Update ImxClient getOrders to support
buy_token_name
parameter
- Update ImxClient getOrders to support
updated_min_timestamp
andupdated_max_timestamp
parameters
- Increment engine version to v16
- Add MultipleExtensionsError when default ethereum was rewritten
- Add Gamestop provider preference
- Fix header key and value for createTradeWithRiskAssessment method to trigger risk assessment
- Remove experimental flag for cryptoToFiat function
- Update FiatToCrypto and CryptoToFiat result codecs
- Add experimental duplicated create trade method with x-wallet-sdk-version header
- Receiving Magic configuration as params of the getProvider function instead of reading it from the localStorage.
- Update user registration request by adding email field
- Add experimental verifyOTP method
- Add experimental getAwaitingOrderStatus method
- Add eth headers for exchange transfer endpoints
- Fix the vulnerabilitie by bumping the dependency version
- Add custom WalletConnect QR code modal to improve UX
- Add new optional attribute
email
to the response of the methodsetup()
, this value will be set only when connecting through Magic.
- Updated
ethBalanceV2
anderc20BalanceV2
to stop repetitively fetching the balance
- Add L1 message signing to transactions
- Add a new method to get public encryption key getPublicKey()
- Add
ethBalanceV2
anderc20BalanceV2
to support read balances via a provider without connect to the wallet
- Remove experimental flag for sign()
- Update dependency:
etherjs
to5.6.0
- Add a new experimental method sign()
- Add new walletconnect provider
- Updated
getProvider
to accept optional provider options
- Add crypto-to-fiat awareness on
getExchanges
- Removed method
getExchangesV1F
- Removed method
getExchangesV1
- Removed method
createExchangeV1
- Removed method
getExchangeV1
- Removed param version on method
getMoonpaySignature
- Fix Exchange transfer to use V1 Params
- Updated
getCurrencies
to return currencies list by exchange type
-
Experimental Added
syncState
method. link.syncState() will: 1 - add a persistant invisible iframe to the dom, and 2 - resolve with an observable, which will stream events as they come in from link, whenever the user changes their wallet, network or disconnects etc.
-
getExchange
returns optional provider wallet address
-
Experimental Added
getCurrencies
method
-
validateCurrencyAmount
returns null or number for min_amount and max_amount
-
Experimental Removed
validateCurrencyAmount
method -
Experimental Added
getCurrencyLimits
method
- Added calculation function
calculateFeeBreakdownFromPriceAmounts
- Updated
calculateFeeBreakdownFromBasePrice
to allow for protocol fees to be supplied - Updated
calculateFeeBreakdownFromFullPrice
to allow for protocol fees to be supplied
-
Experimental Added
signableTransferDetails
andcreateExchangeTransfer
methods -
Experimental Add
amount
parameter tocryptoToFiat
-
Experimental Add
validateCurrencyAmount
method
- Ease
CryptoCurrencies
validation to allow string. Link will validate it
- Added
WALLET_CONNECT
in ProviderPreference enum
- Added calculation functions for order price and fee breakdowns
-
calculateFeeBreakdownFromBasePrice
: specify the base price and all fees to be applied -
calculateFeeBreakdownFromFullPrice
: specify the price inclusive of fees and all fees applied to it
-
Experimental Added
cryptoToFiat
method
- Bugfix for missing ERC20 type
- Enable batch transfer for NFTs
batchNftTransfer
-
listBalances
fix bug to support multiple symbols
-
createExchange
now use v2 endpoints -
createExchangeV1
support the old functionality
- Removes experimental warnings from methods involving maker/taker fees
- Fix fee floating point precision bug for createOrder
-
getExchanges
andgetExchange
now use v2 endpoints -
getExchangesV1
andgetExchangeV1
support the old functionality
- Experimental Update types for link batch transfer
- Add support for exchange v2 endpoints
- Update request type for method
getMoonpaySignature
- Experimental Add more types for transfer v2 endpoint
- Updated response type for ImmutableXClient method
cancelOrder
- Experimental Allow specifying fees to Link.cancel
- Experimental Add transfer v2 endpoint support
- Bugfix: fix getTrade() types
- Update request and response types for experimental method
getProjects
- Update type for
ProjectResult
- Updated fiatToCrypto() to accept cryptoCurrencies
- Experimental Allow specifying fees on getAssets()
- Added pagination for the exchanges list endpoint
- Bugfix: restore the types and funcitonality of
sell_token_name
inside of getOrdersF()
- Enable order expiration date override from Link
- Remove Experimental flag from fiatToCrypto method
- Allow user to override the order expiration date
- Renamed the exchange() method to fiatToCrypto()
- Remove Experimental flag from deposit without params or without amount or token
- Experimental Updated experimental maker/taker fees with bindings for Link
- Update transfers to allow transfer of more than 50 assets at a time
- Implemented update transfers to allow transfer of more than 50 assets at a time, not yet enabled
- Refactoring the exchange history
- Adding currency parameter for the exchange
- Fix listTokens query param generation for
symbols
filter
- Experimental Update deposit to allow to send request without amount or without any params
- Bugfix for detecting wallet extensions
- Handle multiple wallet extensions when getting Etherum provider
- Experimental Updated experimental maker/taker fees feature to allow specifying fee percentages with 2 d.p. of precision.
- Experimental Update fee param name for getOrder and getOrders
- Experimental Added taker fees to getOrder and getOrders
- Experimental Added taker fees to createTrade
- Retry on throttled requests (HTTP 429) to API.
- Remove Experimental flag from sell flow.
- Experimental Added currency information to exchange types
- Experimental Added functions to retrieve the exchange history by user.
- Rename get orders parameter from buy_token_contract to buy_token_address
-
Experimental Updated the codec types for
exchange
methods.
- Experimental Updated Magic api key.
- Fix for ImmutableXClient; default apiUrl in axios config.
- Added optional
apiKey
header to all requests to the IMX public api, for use with ratelimiting.
-
Experimental Bugfixes for the
exchange
method
- Added optional
enableDebug
header to constructor of ImmutableXClient, to enable debug logging.
- Adding
providerPreference
andethNetwork
tolink.setup()
response. - Exporting
LocalStorageKeys
enum with the keys used internally.
- The
getCollection
andgetCollections
methods were updated to have new fieldmetadata_url
in the response incorrectly. This fixes the error by changing it tometadata_api_url
. - Adds
getMetadataSchema
method - Update request/response objects for collection and metadata APIs
- The
getCollection
andgetCollections
methods returns a new fieldmetadata_url
in the response. - Specify supported node versions (12 and 14) in package.json engines.s
-
ImmutableSellOrderCodec
: update buy_decimals to be an optional and add contract_address, status as optional fields. -
ImmutableBuyOrderCodec
: update sell_decimals to be an optional and add contract_address, status as optional fields.
-
Experimental support for
projects
andcollections
functionality.
-
Experimental support to new
exchange
method.
- Refactor internal implementation for experimental features.
- Added missing type definition for sell param + check location.origin instead of referrer
-
SellParamsCodec
: update amount to be an optional and add currencyAddress as an optional param as well.
- Bugfix on mint v2 response typing
- Update mint v2 endpoint's response schema to
{token_id, contract_address, tx_id}
Renaming ProviderPreference
options.
- Experimental temporary testing mint v2 endpoint with response as a mapping of NFTs to tx IDs
- Experimental support to easy login with Magic when used via Link.
- signMessage() function added to Client
- Controller's signVerifyEth() parametrized and renamed
- Add signAuthHeader for new Authentication process
- Claim routes added
- Fix import recovery param for ledger signing
-
include_fees
param for POST requests placed in POST body instead of in query param
- Bug fix on createOrders
- Add allowance and approve methods for ERC20 tokens
- Remove uneccessary fields from mintv2
Includes royalty fees by default in the following endpoints:
link.getOrder
link.getAssets
link.getOrder
link.getAsset
link.createOrder
link.createTrade
which will include a fee body with fee information (if exists).
Updated responses for link methods
-
link.prepareWithdrawal
now containswithdrawalId
-
link.completeWithdrawal
now containstransactionId
SDK JS is now built with node 12 instead of node 14.
1.0.0 marks the first public release of @imtbl/imx-sdk. Bundled in this release, are the following features:
- Transfer functionality has been refactored to support multiple transfers at once imx-docs