list

The following set of functions will be used to create a listing for an NFT

selling an NFT

import NiftySDK from 'nifty-protocol';

const niftySDK = new NiftySDK({ key: 'key', env: Nifty.envs.TESTNET });

niftySDK.initWallet(Nifty.networkTypes.EVM, provider);

const list = async (item) => {
  nifty.setStatusListener((status) => console.log(status));
  const expirationTime = 86400; // 1 day in seconds

  await nifty.list( item, price, expirationTime);
};

options

Param
Value / Explanation
Type
Required

item

item returned from the api

{ contractAddress, tokenID, contractType}

object

true

price

price to list the nft

number

true

expirationTime

how many seconds will the listing be available. Default 10 years

number

false

selectedPaymentMethod

contract address of selected payment method

string

true

Last updated