DogecoinArcade
@ Create a new account

Broadcasts: one node telling every node

docs/broadcasts.md

Jump to: Topics · From a program (bot RPC) · Its first user: sensitive-material flags

A broadcast is public machine talk: a program on one arcade publishes a small JSON message under a topic, and every arcade's index reads it. Nothing draws it. It never shows up in a feed or a chat; programs read it by topic.

Use it for anything one node wants every node to hear: a game's announcement, tournament results, a price list, a list of flagged content. It is the public counterpart of node-to-node messages, which are sealed to one recipient.

Topics

A topic is 1 to 64 lower-case letters, digits and . _ : / -. Name the format and its version, for example my-game/scores/v1. A reader skips topics it does not understand, so a new version can live beside the old one.

From a program (bot RPC)

Method
da_publish topic body [from]prepares a broadcast; body is any JSON. Send it with da_broadcast txid
da_broadcasts [topic after count [senders]]confirmed broadcasts, oldest first: id, txid, sender, topic, body, height, blocktime. Pass the last id as after to read on from there

With the rpc() helper from The bot RPC:

```python prepared = rpc("da_publish", "my-game/scores/v1", {"week": 41, "top": ["@pip", "@vex"]}) rpc("da_broadcast", prepared["txid"]) # sent: every arcade reads it next block

after = 0 for b in rpc("da_broadcasts", "my-game/scores/v1", after, 50): print(b["sender"], b["body"]) after = b["id"] ```

Its first user: sensitive-material flags

An arcade whose content screening is on can tell every other arcade what its model flagged. Turn it on under Admin → Switches → Broadcast this arcade's sensitive-material flags. The flags go out under the topic flags/v1:

``json {"f": [["<sha256 of the picture or words>", "sensitive"], ["<sha256>", "illegal"], ["<sha256>", "ok"]]} ``

Every arcade lists the arcades that broadcast flags under Admin → Sensitive-material flags from other arcades, by @name or domain, each with its own switch. Turn one on and what it flags is covered (sensitive) or hidden (illegal) on your arcade too, even with your own screening off. Another arcade's flags can only make yours stricter, and anything you clear yourself stays cleared.

← all docs