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

radio/v1 package

Overview

Package radio is GnoRadio's radio rules, release 1: a main station that plays the whole catalog through the genre stations, one station per genre, "New this week" (the newest tracks) and "Listeners' choice" (the tracks listeners picked). Everyone tuned to a station hears the same track at the same second, computed from block time; no streaming server is involved. Between picks the main station simulcasts one genre station an hour, by the time of day (flow.gno); it has no rotation of its own.

Each station has a rotation (every playable track of its genre, looping) stored in fixed-size blocks so that every operation costs the same whatever the catalog size, and a short schedule of tracks programmed by listeners. While a programmed track plays the rotation pauses, then resumes where it was. Adding, removing or editing a track never makes listeners jump.

It keeps no state but its admin role. Every record lives in the data realm (gno.land/r/nym-alexiscolin000/gnoradio/data), in the "radio/…" collections only the current radio writer may change (db.gno). It reads the catalog through its value getters; sponsored picks are paid from data's vault through the catalog.

Function

QueueWithNote

func QueueWithNote(cur realm, stationID, trackID int, note string, expires int64, sigHex string)

QueueWithNote is Queue with a dedication shown on air ("for Marie!"). The moderation robot judges it before the transaction (word filter and a moderation model, app/netlify/functions/dedication.mts) and signs NoteMessage(note, expires): the listener sends that certificate and pays their own gas, so a dedication shows at once and costs GnoRadio nothing. It must also pass p/gnoradio/safe (plain text, no link, no blocked word). Listeners can report it: three reports hide it and give its author a strike; a second hidden dedication within a week pauses their dedications for a week (ReportNote). The pause is per wallet: an author can dedicate again from a fresh one, which reports hide and pause the same way (accepted residual; the robot and the word filter still judge every note).

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/radio/v1" -func "QueueWithNote" -args $'' -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/radio/v1" -func "QueueWithNote" -args $'' -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