offer

place an offer for an NFT

import NiftySDK from 'nifty-protocol';

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


const offer = async (nftToSell) => {
  
  niftySDK.initWallet(Nifty.networkTypes.EVM, provider);
  nifty.setStatusListener((status) => console.log(status));
  
  const expirationTime = 86400; // in 1 day
  await nifty.offer(nftToSell, price, expirationTime);
};

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

Last updated