KrypCore Web3
PlatformSupportSDK
  • 👋Welcome to Krypcore Web3
  • Introduction
    • Overview
    • Product Architecture
    • Supported Networks
  • Product Overview
    • Key Concepts
    • Unified SDK / APIs
      • Benefits of a Unified Model
      • KrypCore Web3 SDK
      • KrypCore Web3 APIs
    • Infrastructure
      • Blockchain Endpoints
        • Adding network to Metamask
      • Storage Endpoints
      • DID Service Endpoints
    • Core Services
      • Wallets
        • Choosing the right wallet for your Dapp
        • Custodial Wallet
        • Self Managed Wallet
        • MPC Wallet
        • Developer Wallet
        • Smart Contract Wallet
      • Smart Contracts
        • Deploy from Templates
          • Templates Explained
            • ERC 20
            • ERC 721
            • ERC 1155
            • ERC20DAO Token
            • TokenERC20
        • Deploy your own contract
        • Deploy Contract
        • Load Contract
      • NFT
        • Creating a collection
        • Minting NFTs
      • FT
        • Creating an ERC-20 token
      • DIDs
      • Storage
    • Add on Services
      • Datalake
      • Gasless
        • Integration Steps
        • Considerations and Best Practices
  • API Reference
    • KCW3 APIs Explained
    • Infrastructure APIs
      • Ethereum JSON RPC APIs
        • eth_accounts
        • eth_blockNumber
        • eth_call
        • eth_chainId
        • eth_estimateGas
        • eth_feeHistory
        • eth_gasPrice
        • eth_getBalance
        • eth_getBlockByHash
        • eth_getBlockByNumber
        • eth_getBlockReceipts
        • eth_getBlockTransactionCountByHash
        • eth_getBlockTransactionCountByNumber
        • eth_getCode
        • eth_getFilterChanges
        • eth_getFilterLogs
        • eth_getLogs
        • eth_getProof
        • eth_getStorageAt
        • eth_getTransactionByBlockHashAndIndex
        • eth_getTransactionByBlockNumberAndIndex
        • eth_getTransactionByHash
        • eth_getTransactionCount
        • eth_getTransactionReceipt
        • eth_getUncleCountByBlockHash
        • eth_getUncleCountByBlockNumber
        • eth_hashrate
        • eth_maxPriorityFeePerGas
        • eth_mining
        • eth_newBlockFilter
        • eth_newFilter
        • eth_newPendingTransactionFilter
        • eth_signTransaction
        • eth_syncing
        • eth_uninstallFilter
        • eth_unsubscribe
        • eth_sendRawTransaction
        • net_listening
        • net_peerCount
        • net_version
        • txpool_content
        • txpool_inspect
        • txpool_status
        • web3_clientVersion
        • web3_sha3
      • IPFS HTTP Client APIs
        • How to
        • HTTP API methods
          • add
          • block_get
          • block_stat
          • cat
          • dag_get
          • dag_import
          • dag_put
          • dag_resolve
          • get
          • pin_add
          • pin_ls
          • pin_rm
          • pin_update
          • version
          • block_put
    • Core Service APIs
      • Wallet Manager APIs
        • Self Managed Wallet
          • Setup SM Wallet
          • Create Wallet
          • Get Wallet balance
          • Sign Message
          • Verifies Signature off chain
          • Deploy Contract
          • Submit Transaction
          • Estimating Gas Price
          • Call Contract Method
          • Sign and Submit Gasless Transaction
        • Developer Wallet
          • Generate Keys
          • Deploy Contract
          • Call Contract
          • Get Balance
          • Sign And Submit Gasless Txn
          • Create And Execute Txn
          • Sign EIP712 Txn
          • Verify Signature OffChain
          • Sign Message
          • Sign TxHash
          • Estimate Gas
        • Smart Contract Wallet APIs
          • Create Wallet
          • Get All SC Wallet Details
          • GenerateUserOp
          • SubmitUserOp
      • DID Manager APIs
        • Create issuer Profile
        • Create Subject Profile
        • Create Verifiable Credentials
        • Create Verifiable Presentation
        • List Issuer Profile
        • List Subject Profile
        • List Verifiable Credential
        • List Verifiable Credential Templates
        • Verify Verifiable Credential
        • Revoke Verifiable Credential
        • Delete Issuer Profile
        • Resolve DID
      • NFT Studio APIs
        • Create NFT Collection
        • Get all NFT Collections details created by a user
        • Get a NFT collection details created by a user
        • Mint NFT
        • Get all Minted NFT details in a smart contract
      • FT Manager APIs
        • Create ERC20Token
        • Get all Fungible Token details created by user
        • Get a Fungible Token details created by user
        • Mint ERC20 Token
        • Approve ERC20Token
        • Transfer ERC20 Token
        • Burn ERC20Token
        • Get Total Supply
        • Get Balance of an user address
      • Storage Manager APIs
        • Upload file to IPFS Storage
        • Get File Details
        • Download Files from IPFS
        • Update Pin status
      • Gasless API
        • Get Transaction Payload
        • Send Transaction
        • Create Gas Request
        • Add Whitelisted Contract Linked to DApp
        • List All Whitelisted Contracts
        • List All Protocol Configs
        • List All Funded Transactions
        • Update Configured Gas Limit
        • Deactivate Whitelisted Contract
        • Get Protocol Config using userId and ChainId
        • Sign And Submit Gasless Txn Using (Dev wallet)
        • Sign And Submit Gasless Txn Using (kms wallet)
    • Add On APIs
      • Gasless Transactions APIs
      • Datalake APIs
  • SDK Reference
    • Getting Started
    • SDK Architecture
    • Wrapper Packages
    • Power Methods
      • Wallet Suite
      • Utils Suite
    • Core Service Methods
      • Custodial Wallet Kit
      • DID Kit
      • NFT Kit
      • FT Kit
      • Storage Kit
  • faq
    • Platform FAQs
    • API FAQs
    • SDK FAQs
  • Releases
    • Latest Updates
    • Release Notes v1.0.0 Beta
    • Release Notes v1.0.0
Powered by GitBook
On this page
  • Table of Contents
  • Bootstrapping the SDK for NFT kit
  • SDK Methods
  • createNFTCollection (ERC-721)
  • mintNFT (ERC-721)
  • createNFTCollection (ERC-1155)
  • mintNFT (ERC-1155)

Was this helpful?

  1. SDK Reference
  2. Core Service Methods

NFT Kit

Easy NFT SDK Methods is a set of functions provided by the Easy NFT SDK in the KrypCore Web3 SDK. This SDK simplifies the process of creating and interacting with NFTs (Non-Fungible Tokens) on the blockchain. With the Easy NFT SDK, developers can easily deploy ERC-721 and ERC-1155 NFT collections, as well as mint NFTs within those collections.

To use the Easy NFT SDK, import the required modules and initialize the necessary objects:

Table of Contents

  • Create Collection

  • Mint NFT

Bootstrapping the SDK for NFT kit

const krypcore_web3_sdk = require("@krypc/krypcore-web3-sdk");
const EasyNftService = new krypcore_web3_sdk.Services.EasyNft(configFilePath);

Now, let's explore the available methods and their usage:

SDK Methods

createNFTCollection (ERC-721)

Deploys an ERC-721 or ERC-1155 NFT collection on a specific blockchain network.

Parameters:

  • standard (string): The NFT standard to deploy ("ERC721" or "ERC1155").

  • chainId (string): The ID of the blockchain network where the collection will be deployed.

  • name (string): The name of the NFT collection.

  • description (string): The description of the NFT collection.

  • symbol (string): The symbol or ticker of the NFT collection.

  • accessToken (string): The access token for wallet authentication.

  • isPublic (boolean, optional): Flag indicating if the collection is public (default: false).

Usage:

const createERC721CollectionStatus = await EasyNftService.createNFTCollection("ERC721", "80001", "Bored Apes", "Its an NFT collection", "APE", process.env.WALLET_ACCESS_TOKEN, false);
console.log(createERC721CollectionStatus);

mintNFT (ERC-721)

Mints a new ERC-721 or ERC-1155 NFT.

Parameters:

  • chainId (string): The ID of the blockchain network where the NFT will be minted.

  • contractAddress (string): The address of the NFT contract.

  • standard (string): The NFT standard ("ERC721" or "ERC1155").

  • name (string): The name of the NFT.

  • description (string): The description of the NFT.

  • quantity (number or null): The quantity of NFTs to mint (set to null for ERC-721).

  • attributes (array): An array of NFT attributes.

  • file (File): The file object of the NFT image or media.

  • recipientAddress (string): The address of the recipient.

  • accessToken (string): The access token for wallet authentication.

Usage:

const file = fs.readFileSync("test.png");
const mintERC721NftStatus = await EasyNftService.mintNFT("80001", "0x8beF71d2443812D907986295e3878dFBc03Ad141", "ERC721", "Sample Token", "This is a sample token", null, [], file, "0x5A5D02cdb3D8904d996feD9911EdfFe070d6E6EF", process.env.WALLET_ACCESS_TOKEN);
console.log(mintERC721NftStatus);

createNFTCollection (ERC-1155)

Deploys an ERC-1155 NFT collection on a specific blockchain network.

Parameters:

  • standard (string): The NFT standard to deploy ("ERC1155").

  • chainId (string): The ID of the blockchain network where the collection will be deployed.

  • name (string): The name of the NFT collection.

  • description (string): The description of the NFT collection.

  • symbol (string): The symbol or ticker of the NFT collection.

  • accessToken (string): The access token for wallet authentication.

  • isPublic (boolean, optional): Flag indicating if the collection is public (default: false).

Usage:

const createERC1155CollectionStatus = await EasyNftService.createNFTCollection("ERC1155", "80001", "Bored Apes 1155", "Its an NFT collection", "APE", process.env.WALLET_ACCESS_TOKEN, false);
console.log(createERC1155CollectionStatus);

mintNFT (ERC-1155)

Mints a new ERC-1155 NFT.

Parameters:

  • chainId (string): The ID of the blockchain network where the NFT will be minted.

  • contractAddress (string): The address of the NFT contract.

  • standard (string): The NFT standard ("ERC1155").

  • name (string): The name of the NFT.

  • description (string): The description of the NFT.

  • quantity (number): The quantity of NFTs to mint.

  • attributes (array): An array of NFT attributes.

  • file (File): The file object of the NFT image or media.

  • recipientAddress (string): The address of the recipient.

  • accessToken (string): The access token for wallet authentication.

Usage:

const file = fs.readFileSync("test.png");
const mintERC1155NftStatus = await EasyNftService.mintNFT("80001", "0x795807CCB4F1286528bD33e4Ff2ef5Cb1432655B", "ERC1155", "Sample Token", "This is a sample token", 20, [], file, "0x5A5D02cdb3D8904d996feD9911EdfFe070d6E6EF", process.env.WALLET_ACCESS_TOKEN);
console.log(mintERC1155NftStatus);

These methods allow you to deploy and mint ERC-721 and ERC-1155 NFTs on the specified blockchain network. Make sure to provide the necessary parameters based on your requirements and utilize the returned data as needed.

PreviousDID KitNextFT Kit

Last updated 1 year ago

Was this helpful?