Rising Tide Developers
Concepts

Product Instances (developer)

Technical reference for the ProductInstance entity - schema, on-chain sync, and ownership model.

A ProductInstance is a numbered, ownable copy of a SmartProduct. It is created on-chain when someone mints the product.

Schema

BigInt fields (instanceId, instanceNumber, feePaid) are serialized to strings over the wire per the SDK convention.

interface ProductInstance {
  id: number;
  productId: number;
  instanceId: string;          // on-chain token id (BigInt as string)
  instanceNumber: string;      // 1-based on-chain serial number (BigInt as string)
  ownerAddress: string;        // Current owner address
  minterAddress: string | null; // Who minted it; unchanged by a transfer
  status: InstanceTransactionStatus;
  currencyType: InstanceCurrencyType;
  feePaid: string;             // BigInt as string
  txId: string;
  mintTxId: string | null;
  burnTxId: string | null;
  burnedAt: string | null;
  tokenUri: string;
  detachedTokenUri: string | null;  // permanent URL once the owner detaches (detachable capability)
  detachedLocked?: boolean;         // owner froze the override permanently (lock-detached)
  isFeatured: boolean;
  instanceConfig: { version: number } & Record<string, unknown>; // per-edition capability data
  archival?: { state: string; reason?: string }; // saved / archiving / archived ...; see Storage
  bracketEntryDetails?: BracketEntryDetails | null; // PREDICTION entries
  gameMatchDetails?: GameMatchDetails | null;       // GAME matches
  createdAt: string;
  updatedAt: string;
  product?: SmartProduct;           // populated with ?include=page
}

type InstanceTransactionStatus = "PENDING" | "CONFIRMED" | "FAILED";
type InstanceCurrencyType = "STX" | "SBTC";

On-chain sync

The protocol API does not create instances directly. Instance creation is triggered by the blockchain:

  1. User signs a mint transaction via the SDK
  2. Transaction confirms on the blockchain
  3. The MINT Chainhook fires
  4. The API creates the ProductInstance row

API endpoints

MethodPathDescription
GET/api/smart-products/:id/instancesList instances for a product
GET/api/smart-products/:id/instances/:instanceIdGet a specific instance
GET/api/users/address/:address/instancesList instances owned by a user

Rendering

Each instance renders using the parent SmartProduct's StyleSet. The instanceNumber is a data binding in the SVG template. See Style Sets.