Eclipse Documentation
HomeBridge
  • 🐮Users
    • Getting Started
      • 1. Set Up Your Eclipse Wallet
      • 2. Bridge Assets for Gas and Transactions
      • 3. Explore the Eclipse Ecosystem
      • 4. Engage with the Community on Discord
    • User Resources
    • Unified Restaking Tokens (URTs)
    • Yield From Real World Treasury Bills
  • 🛠️Developers
    • Getting Started
    • Wallet
      • Mainnet Wallets
      • Testnet & Devnet Wallets
        • Adding Eclipse Wallet to dApp
        • Custom Wallets
    • RPC & Block Explorers
      • Dragon's Mouth gRPC Subscriptions
    • Bridges
      • Eclipse Canonical Bridge
      • Hyperlane
    • Oracles
      • Pyth Network
      • Switchboard
    • NFTs
      • Metaplex
      • Nifty Asset
      • Libreplex (Token-2022)
    • Developer Tooling
      • Faucet
      • Benchmarking
        • Running AMM benchmarking tests
      • Decentralized Identities
        • AllDomains
      • OpenBook Quickstart
      • Multisig
    • Eclipse Bug Bounty Program
    • Eclipse Status Page
    • Frequently Asked Questions
    • Differences Between Eclipse and Solana
    • Eclipse Program Registry Guide
  • 📖Tutorials & Guides
    • Developer Guides
      • Quick Start: "Hello World"
        • Deployment Walkthrough
      • Reading from the blockchain
      • Modifying a Solana dApp to Support Eclipse: "Chomping Glass"
        • Developing on the Solana Virtual Machine (SVM)
        • Multi-chain toggle frontend component
      • Dapp Deployment Tutorial - Eclipse Devnet
        • ⚙️Install Dependencies - Windows
          • Step 1: Install Visual Studio Code (VSC)
          • Step 2: Install Rust and Cargo
          • Step 3: Download Visual Studio C++ Build Tools
          • Step 4: Download Node.js
          • Step 5: Install Git on Windows
          • Step 6: Install the Solana CLI
          • Step 7: Install WSL on Visual Studio Code and Upgrade to WSL2
          • Step 8: Set Up Development Environment in Ubuntu WSL
          • Step 9: Install Anchor on Windows and WSL
        • 🏝️Solana CLI & Solana Keypair
          • Step 1: Set Solana CLI to Use Eclipse Devnet
          • Step 2: Verify Solana CLI Configuration
          • Step 3: Generate a New Solana Keypair
          • Step 4: Claim Devnet ETH for Transaction Fees
          • Optional Step: View Balance on Devnet Explorer
        • 🖥️Creating an Anchor Project in Visual Studio Code
          • Step 1: Initialize Anchor Project
          • Step 2: Update the lib.rs File with Smart Contract Code
          • Step 3: Update the Smart Contract's Cargo.toml File
          • Step 4: Update the Project's Root Cargo.toml File
          • Step 5: Compile Your Program with anchor build
          • Step 6: Deploy Your Project to the Eclipse Devnet
          • Step 7: Verify Program Deployment on the Eclipse Devnet Explorer
        • ✨Building a React App Front-End
          • Step 1: Create a New React Project with TypeScript
          • Step 2: Install Solana Web3.js and Wallet Adapter Dependencies
          • Step 3: Install Additional Dependencies for Enhanced Functionality and Compatibility
          • Step 4: Configure Webpack for Browser Compatibility
          • Step 5: Start the Development Server and Verify Setup
          • Step 6: Implement the UI for Your NFT Minter in App.tsx with Updated Code
      • Eclipse Testnet ETH Transfer Transaction Fee Estimator
        • Program Breakdown
        • Program JSX & CSS
        • Program Execution
      • Pyth: How to Use Real-Time Data in Solana Programs
      • Quick Start: User Guide - Testnet
      • cNFTs on Eclipse
        • Create 1 Million NFTs on Eclipse
        • How to Interact with cNFTs
  • 🧠Eclipse Architecture
    • What is Eclipse Mainnet?
      • Settlement - Ethereum
      • Execution - Solana Virtual Machine (SVM)
      • Data Availability - Celestia
      • Proving - RISC Zero
      • Why Eclipse, Why Ethereum, Why Now
    • Lifecycle of an Eclipse Transaction
  • 📚Additional Resources
    • External Documentation
    • Disclosures
Powered by GitBook
On this page
  • Nifty CLI
  • Install from Source​
  • JavaScript Client
  • Requirements​
  • Umi​
  • RPC Endpoints
  • Use Nifty Asset JS Client​
Edit on GitHub
  1. Developers
  2. NFTs

Nifty Asset

PreviousMetaplexNextLibreplex (Token-2022)

Last updated 9 months ago

Nifty Asset is a fully-featured digital asset standard for the SVM. It is lightweight and efficient, designed to offer a small footprint (compute units consumption) and be highly flexible. The main features of the standard are:

  • Single account to represent a digital asset.

  • Flexible on-chain representation: store as much or as little data using optional extensions.

  • Efficient zero-copy de-/serialization to minimize compute units utilization.

  • Full-featured standard, including royalty enforcement, delegates, lock/unlock, inscriptions and groups (collections).

  • Rust and JavaScript client SDKs.

Extensions can be combined to create a wide variety of non-fungible assets, from simple assets with links to off-chain data to fully on-chain assets. In addition to extensions, Nifty Asset follows the to provide developers a program interface to customize every aspect of the protocol – and it enables that without requiring direct changes to the program. The advantage of that is that developers have full flexibility to extend its behavior in an non-opiniated way. The only requirement is to implement the .

The complete Nifty Asset documentation is available at:


Nifty CLI

Install from Source

Requires :

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Now you can install with pnpm from the root directory of the nifty-asset repository:

pnpm clients:cli:install

With Rust's cargo:

cd clients/cli
cargo install --path .

Directly from crates.io:

cargo install nifty-cli

To see all the available commands and usage suggestions run:

nifty --help
Usage: nifty [OPTIONS] <COMMAND>

Commands:
  burn      Burn an asset
  mint      Create an asset with extensions
  create    Create a basic asset without extensions
  decode    Get an asset account's data and decode it
  approve   Set a delegate on an asset with specific roles
  lock      Lock an asset, preventing any actions to be performed on it
  revoke    Revoke a delegate from an asset
  transfer  Transfer an asset to a new owner
  unlock    Unlock an asset, allowing actions to be performed on it
  help      Print this message or the help of the given subcommand(s)

Options:
  -k, --keypair-path <KEYPAIR_PATH>  Path to the keypair file
  -r, --rpc-url <RPC_URL>            RPC URL for the Solana cluster
  -h, --help                         Print help
  -V, --version                      Print version

To see the help for a specific command, run the command with the --help option, e.g.:

nifty create --help
Create a basic asset without extensions

Usage: nifty create [OPTIONS] --name <NAME>

Options:
  -k, --keypair-path <KEYPAIR_PATH>
          Path to the keypair file
  -n, --name <NAME>
          The name of the asset
  -a, --asset-keypair-path <ASSET_KEYPAIR_PATH>
          Path to the mint keypair file
  -r, --rpc-url <RPC_URL>
          RPC URL for the SVM cluster
      --immutable
          Create the asset as immutable
  -o, --owner <OWNER>
          Owner of the created asset, defaults to authority pubkey
  -h, --help
          Print help

We install the Solana CLI which we use to set and configure both a default keypair and RPC node URL:

sh -c "$(curl -sSfL https://release.solana.com/v1.16.25/install)"

Now we can set the default keypair and Eclipse RPC node URL:

solana config set --url https://mainnetbeta-rpc.eclipse.xyz
solana-keygen new

Nifty will use these values by default, but you can also pass them as options to the commands.


JavaScript Client

The Nifty Asset JS Client is a JavaScript client that provides a set of methods for interacting with the Nifty Asset program on the Solana Virtual Machine. This guide will help you get started with the Nifty Asset JS Client and show you how to use it with the Umi framework.

To get started you will need to install the following libraries:

Add these dependencies to your project by running the following command:

npm install \
  @metaplex-foundation/umi \
  @metaplex-foundation/umi-bundle-defaults \
  @nifty-oss/asset

To use the Nifty Asset JS Client, you will need to configure Umi to use the network of your choice (e.g., Eclipse Mainnet, Devnet, Testnet, or Local) and the Nifty Asset plugin. Create an instance of Umi with the createUmi method, and pass in the network URL:

import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';

const umi = createUmi('https://mainnetbeta-rpc.eclipse.xyz');

To configure Umi on other networks, simply replace the URL in the createUmi method with the RPC endpoint of your choice.

RPC Endpoints

Nifty Asset is available on the following Eclipse networks:

Network
URL

Eclipse Mainnet

Eclipse Testnet

Eclipse Devnet

Replace the URL in your createUmi method with the network of your choice.


To use the Nifty Asset JS Client, you will need to import the client and add it to your Umi instance using the .use() this this:

import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';
import { niftyAsset } from '@nifty-oss/asset';

const umi = createUmi('https://mainnetbeta-rpc.eclipse.xyz').use(niftyAsset());

The .use() method registers the Nifty Asset plugin with the Umi instance, enabling access to the Nifty Asset methods.

Requirements

version 18 or higher

or other package manager (e.g., Yarn, PNPM)

version 4.0 or higher installed

installed (for local development)

Umi

The Nifty Asset JS Client is built to work with the Umi framework. is a lightweight JavaScript framework that is used to build Solana clients. Umi was built and is maintained by the Metaplex Foundation. The Nifty Asset JS Client is an Umi plugin that provides a set of methods for interacting with the Nifty Asset program.

Required Dependencies

@metaplex-foundation/umi: The core Umi framework

@metaplex-foundation/umi-bundle-defaults: Default plug-ins bundle for Umi

@nifty-oss/asset: The Nifty Asset JS Client

Umi Configuration

Use Nifty Asset JS Client

You are all set and ready to start using the Nifty Asset JS Client with Umi. We will use this same structure throughout the documentation to demonstrate how to use the Nifty Asset JS Client with Umi, so take a moment to familiarize yourself with this setup. If you have any questions, please reach out to the Nifty Asset team on .

🛠️
⎘Proxy Pattern
⎘program interface
https://nifty-oss.org/docs/category/nifty-asset
​
Rust to be installed
​
Node.js
NPM
TypeScript
Solana CLI
​
Umi
​
npmjs.com
npmjs.com
npmjs.com
​
​
Discord
https://mainnetbeta-rpc.eclipse.xyz
https://testnet.dev2.eclipsenetwork.xyz
https://staging-rpc.dev2.eclipsenetwork.xyz