Skip to main content
The Solana programs offer the same original mint, license purchase and remix relationship. Use the program IDs for the selected deployment, a funded Solana signer, and RPC plus subscription clients for that network. Check deployed programs before choosing a network. Original minting is available on devnet; license purchases and variations are not ready in its current configuration. The walkthrough below requires a deployment with those operations enabled.

Connect the wallet and network

Use the Solana Kit setup with your connected wallet’s transaction signer. Check the selected cluster and program availability before enabling a mint button. The signer pays fees and account rent, and must match the Rawchunks song’s creator. The references give actual instruction layouts and Kit examples. They do not require a separate Rawchunks SDK.

Mint an original

Prepare the final song and metadata CID as in the mint guide. Set metadataUri to ipfs:// followed by the CID. Follow the Factory instruction example with your song’s terms: Read Factory’s nextSongId and derive the song PDA immediately before building. Simulate, sign and confirm the instruction. Store its signature before sending, then read the resulting song account. Confirm its ID, creator, URI and original flags. Another mint can use the next ID first. After a confirmed seed conflict, reload and rebuild. Do not resubmit a transaction with uncertain confirmation.

Record the confirmed result

Here, chainSongId is the verified Factory song ID and signature is the confirmed transaction signature from the send step. Use the creator’s request client:
The network ID above is devnet. Keep the network tied to the actual signer and RPC cluster. A catalog update records the result; it does not execute or verify a chain transaction.

Buy a license

This step is unavailable on the current published devnet configuration. On a deployment where it is enabled:
  1. Read the original song and check its creator, URI, network and remixable-original flags.
  2. Check the buyer’s license PDA. Existing rights do not require another purchase.
  3. Read the settlement mint and treasury from Royalties config. Derive the buyer, creator and treasury token accounts for that mint; create missing associated token accounts.
  4. Build Remix instruction 4 with its exact 9-byte data and 15 accounts, then simulate, sign and confirm.
  5. Read the resulting license record and check its song ID and buyer before opening an editable draft.
The payer needs sufficient settlement tokens for a priced license and SOL for fees and rent. Display the actual token and chain price before requesting a signature.

Mint the variation

With confirmed rights, create the REST draft and edit it as in licenses and variations. Pin its final metadata. Build Remix instruction 1 with the confirmed original ID, zero allocation and license price, your stored stream rate and the final URI. Read the current Factory next ID and original remix count before deriving its new song and record PDAs. Use the exact account order in that reference. Simulate, sign and confirm. Read the new song and verify the remixer, URI, isRemix = true and original parent ID. Record its confirmed ID, signature, CID and network through the draft’s song PATCH using the same fields as the original step. Use your Rawchunks session for paid music API calls. Chain minting and license purchases use wallet transactions on the selected deployment.