SNIP721 (Secret NFTs)

Learn how to send SNIP721s with SecretJS.

Secret Network Client Setup

import { SecretNetworkClient, Wallet } from "secretjs";

const wallet = new Wallet("Your mnemonic words go here");

const secretjs = new SecretNetworkClient({
  chainId: "pulsar-3",
  url: "https://pulsar.lcd.secretnodes.com",
  wallet: wallet,
  walletAddress: wallet.address,
});

Add Minter

const addMinterMsg = await secretjs.tx.snip721.addMinter(
  {
    contract_address: contractAddress,
    msg: { add_minters: { minters: [accounts[0].address] } },
    sender: accounts[0].address,
  },
  {
    gasLimit: 100_000,
  },
);

Mint SNIP721 Token

Send SNIP721 Token

Add Minter and Mint in a Single Transaction

Query Tokens with Permit

Query Tokens with Viewing Key

Last updated

Was this helpful?