DAN
Website
  • 🚀Accelerating Digital Ownership Adoption
  • Digital Assets Network
    • ❌Challenges in Adoption
    • ✅DAN Stack
    • 📜Modular Protocol
    • 🎯DAN Labs Impact
    • 🔐®️ ERC-7066 Author
      • Overview
  • DAN PROTOCOLS
    • 📌Modular Solutions for Digital Ownership
    • 💡Asset Creation
    • 🤝Marketplace
    • 🔓Rent Protocol
    • 💰Loan Protocol
      • How does a loan work?
    • 💰Utility Protocol
      • How does it work?
  • For Developers
    • 🚀Launchpad
      • APIs
        • User's Collections
        • Collection Details
      • SDK
        • Create Collection
        • Mint NFT
        • Mint NFT (Batch)
    • 🛒Market
      • APIs
      • SDK
        • Create Listing
        • Buy Listed NFT
        • Cancel Listing
    • ⚙️Utility
      • APIs
        • 👥Client
          • Register
          • Verify
          • Redeem Code
          • Get All Claimed Utility User
        • 👨‍💻Developer
          • Get All Benefits By Collection
      • SDK
    • 💰Loans
      • APIs
        • User Loans
        • Raw Transactions (Advanced)
      • SDK
        • EVM
        • Solana
      • Wallet Integration
        • EVM
        • Solana
    • 🗞️Rentals
      • APIs
        • NFTs (Owned and Rented)
        • NFTs (Rented)
        • Raw Transactions (Advanced)
      • On-Chain
      • SDK
        • EVM
        • Solana
      • Wallet Integration
        • EVM
        • Solana
    • ⛓️Supported Chains
  • UseCases : Case Studies
    • 🤝NFT Rentals
    • 💎Ephemeral / Consumable NFTs
    • 📝NFT Mandates
    • 🎆Post-Mint Utility
    • 💼Partial Payment at Mint
  • Community
    • 🔑Terms of Service
    • 🔏Privacy Policy
    • 🌐Website
    • 👽Discord
    • 🐦Twitter
Powered by GitBook
On this page
  1. For Developers
  2. Market
  3. SDK

Create Listing

List an NFT for sale on the marketplace

Parameters

Parameter
Type
Description

tokenAddress

string

NFT contract address

tokenId

number

Token ID of the NFT

salePrice

string

Price of the NFT in Wei

count

number

Quantity (for ERC-1155)

chainId

number

Blockchain chain ID

signer

object

Wallet signer

contractAddress

string (optional)

Marketplace contract address

Example Usage

import { createListing } from "streamnft-evm";

const response = await createListing(
  "0x1234...abcd",  // tokenAddress
  1,                // tokenId
  "1000000000000000000", // 1 EDU (give in atomic unit of the currency)
  1,                // count (1 for ERC-721)
  656476,           // Opencampus chain ID
  signer            // Ethers signer
);

Optional: How to get singer using streamnft-evm SDK

import { getSigner, getWalletSigner } from "streamnft-evm";

const signer = await getSigner(
chainId, 
privateKey, 
rpcUrl // optional for private rpc
);

const signer = await getWalletSigner(); // for wallet pop-up
PreviousSDKNextBuy Listed NFT

Last updated 2 months ago

🛒