/Building on Netrun/Creating Assets

Creating Assets

Learn how to create and manage digital assets on Netrun using the CLI and SDK.

Using the CLI

# Create a simple asset
netrun asset create --name "My Asset" --image ./image.png

# Create with metadata
netrun asset create --name "My Asset" --metadata ./metadata.json

Using the SDK

import { Netrun } from "@netrun/sdk";

const netrun = new Netrun({ network: "devnet" });

const asset = await netrun.assets.create({
  name: "My Asset",
  description: "A programmable asset on Netrun",
  image: "https://example.com/image.png",
  attributes: [
    { trait_type: "Rarity", value: "Legendary" }
  ]
});

console.log("Asset created:", asset.address);

Metadata Standards

Netrun follows the Metaplex metadata standard. Your metadata JSON should include:

  • name - The name of your asset
  • description - A description of your asset
  • image - URL to the asset image
  • attributes - Array of trait objects