Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

catalog/v1 package

Overview

Package catalog is GnoRadio's catalog rules, release 1: artists, tracks, albums, playlists, likes, follows, tips, support, moderation and verification. Other GnoRadio realms (radio, tickets, home) read it through the value getters in read.gno; it imports none of them.

It keeps no state but its admin role. Every record lives in the data realm (gno.land/r/nym-alexiscolin000/gnoradio/data), in the "catalog/…" collections only the current catalog writer may change (db.gno). Promo budgets sit in data's vault, so a later release takes over the data and the coins without copying anything.

Four track origins share one catalog:

  • "artist": published by the artist's own wallet, tips enabled;
  • "curated": imported by the admin from CC0 / CC BY / CC BY-SA / CC BY-NC / CC BY-NC-SA sources;
  • "audius", "jamendo": pointers the admin imports. The record keeps only what the radio needs (platform id, genre, duration, licence); the app reads title, artist and cover live, since both platforms' API terms allow session caching only (attribution required).

Imported artists start unclaimed; once the admin assigns them to a wallet (AssignArtist) or the robot verifies a claim, their tracks receive tips.

Tips and support are forwarded in the same transaction: this realm ends every transaction holding no coins.

Function

Claim

func Claim(cur realm, artistID int, proof string, expires int64, sigHex string)

Claim starts the verification of artistID for the caller with the robot's certificate (ClaimMessage signed, hex). It replaces any pending claim for the artist and restarts the delay. The artist pays its gas.

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/catalog/v1" -func "Claim" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/catalog/v1" -func "Claim" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx