Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Examples

This folder contains code examples for usage of @imtbl/core-sdk

How to run the sample code

git clone https://github.com/immutable/imx-core-sdk.git

cd imx-core-sdk/examples

yarn install

Create a .env file similar to .env.example

cp .env.example .env

Once you have saved the necessary values in your .env file, follow the instructions below to run.

Deposit Eth

Update depositEth.ts with your deposit amount then run

yarn deposit-eth

Deposit NFT

Update depositNft.ts with your token address and id then run

yarn deposit-nft

Prepare Eth Withdrawal

Update createEthWithdrawal.ts with your withdrawal amount then run

yarn create-eth-withdrawal

Complete Eth Withdrawal

Check completeEthWithdrawal.ts then run

yarn complete-eth-withdrawal

Create project

Update createProject.ts with your project details then run

yarn create-project

Create collection

Update createCollection.ts with your collection details then run

yarn create-collection

Mint

Update mint.ts with your minting details then run

yarn mint

List mints

Update listMints.ts with your mint query details then run

yarn list-mints

Get mint

Update getMint.ts with your mint id then run

yarn get-mint

Create order

Update createOrder.ts with your order details then run

yarn create-order

List orders

Update listOrders.ts with your order query details then run

yarn list-orders

Get order

Update getOrder.ts with your order id then run

yarn get-order

Cancel order

Update cancelOrder.ts with your order id then run

yarn cancel-order

Create trade

Update createTrade.ts with your trade details then run

yarn create-trade

List trades

Update listTrades.ts with your trade query details then run

yarn list-trades

Get trade

Update getTrade.ts with your trade id then run

yarn get-trade

Transfer Nfts

Update transferNfts.ts with your transfer details then run

yarn transfer-nfts

Transfer Eth

Update transferEth.ts with your transfer details then run

yarn transfer-eth

Transfer ERC20

Update transferErc20.ts with your transfer details then run

yarn transfer-erc20

Create exchange transfer

Update createExchangeTransfer.ts with your exchange transfer details then run

yarn create-exchange-transfer

Create primary nft checkout with moonpay

Update create-nft-primary-txn.ts with your exchange transfer details then run

yarn create-nft-primary-txn

Create metadata refresh

Update createMetadataRefresh.ts with your refresh details then run

yarn create-metadata-refresh

Get metadata refresh results

Update getMetadataRefreshResults.ts with your refresh details then run

yarn get-metadata-refresh-results

List metadata refreshes

Update listMetadataRefreshes.ts with your refresh details then run

yarn list-metadata-refreshes

Get metadata refresh errors

Update getMetadataRefreshErrors.ts with your refresh details then run

yarn get-metadata-refresh-errors

Add metadata schema to collection

Update addMetadataSchemaToCollection.ts with your metadata schema details then run

yarn add-metadata-schema-to-collection

Get metadata schema

Update getMetadataSchema.ts with your collection details then run

yarn get-metadata-schema

Update metadata schema by name

Update updateMetadataSchemaByName.ts with your metadata schema details then run

yarn update-metadata-schema-by-name

List tokens

Update listTokens.ts with your token query details then run

yarn list-tokens

Get token

Update getToken.ts with the token contract address then run

yarn get-token

Get balance

Update getBalance.ts with the user address and token address then run

yarn get-balance

List balance

Update listBalance.ts with the user address and then run

yarn list-balances

Get projects

Update getProjects.ts with the desired fields and then run

yarn get-projects

Get transfer

Update getTransfer.ts with the transaction id and then run

yarn get-transfer

List transfer

Update listTransfers.ts the desired fields and then run

yarn list-transfers

Get asset

Update getAsset.ts the token address and token id and then run

yarn get-asset

List assets

Update listAssets.ts the desired fields and then run

yarn list-assets

Get user

Update getUser.ts with the wallet address and then run

yarn get-user

Get withdrawal

Update getWithdrawal.ts with the transaction id and then run

yarn get-withdrawal

List withdrawal

Update lisWithdrawals.ts the desired field and then run

yarn list-withdrawals

Create nft withdrawal

Update createNftWithdrawal.ts with the token id and token address then run

yarn create-nft-withdrawal

Complete nft withdrawal

Update completeNftWithdrawal.ts with the token id and token address then run

yarn complete-nft-withdrawal

Create erc20 withdrawal

Update createErc20Withdrawal.ts with the token address then run

yarn create-erc20-withdrawal

Complete nft withdrawal

Update completeErc20Withdrawal.ts with the token id and token address then run

yarn complete-erc20-withdrawal

List collections

Update listCollections.ts with the wanted filters and run

yarn list-collections

List collection filters

Update listCollectionFilters.ts with the wanted filters and run

yarn list-collection-filters

Update collection

Update updateCollection.ts with the all values filled in and run

yarn update-collection