Skip to content

Mubert CLI – Register IP On-Chain

The mubert-cli allows you to register AI-generated music tracks on a Mubert-based parachain. It submits an createEntity extrinsic along with the associated audio file, fingerprint and metadata.


CLI installation

cargo install --git https://github.com/Mubert-Web3/mubert-cli --branch main

JSON Input: create_entity.json

This file describes the entity (track) to be created and registered on-chain.

{
  "entity_kind": "GenerativeTrack",
  "authority_id": 1,
  "metadata_standard": "M25",
  "flags": [
    "Immutable"
  ],
  "off_chain_metadata": {
    "title": "My first generative track",
    "bpm": 120,
    "key": 1,
    "scale": 0,
    "instrument": 1
  }
}

CLI Usage

mubert-cli --node-url=url upload-ip \
  --file=./examples/hardbass.wav \
  --data-file=./examples/create_entity.json \
  --secret-key-file=./test_secret_key.json

Parameters

Argument Description
--file Path to the .wav or .mp3 file to upload
--data-file JSON file with entity metadata (see above)
--secret-key-file Local file containing the signing secret key

What Happens

  1. A unique zk-proof is generated and stored in storage.
  2. Metadata is hashed and validated.
  3. A createEntity extrinsic is signed and submitted to the parachain.
  4. Transaction hash and entity_id are returned in the CLI output.

Important: Public key should be in the membership pallet, but you can test with //Alice well-known account


Testnet Usage

You can test on the Mubert parachain testnet by adding the --node-url= flag:

--node-url==wss://rpc-testnet.mubert.xyz
mubert-cli --node-url=wss://rpc-testnet.mubert.xyz upload-ip \ 
--api-auth='mubert-fingerprint-test-token' \
--file=./test_wav.wav \
--data-file=./examples/create_entity.json