developers

[ public api ]

streamTXC is open infrastructure. Every video is content-addressed on IPFS and timestamped on the TXC chain — these endpoints let you stream, embed, and verify all of it from anywhere. No keys, no signups, no rate-limit dance. Just HTTP.

base: https://streamtxc.comauth: nonecors: *

01 · the CID is the truth

Every video on streamTXC is identified by its IPFS CID — a cryptographic hash of the file's bytes. Same bytes → same CID. Different bytes → different CID. Always.

That makes the CID the only identifier that actually matters. Our database row, our gateway URL, our chain timestamp, and any third-party IPFS pinner anywhere in the world all reference the exact same content via the exact same string. If we ever go dark, you can re-pin any CID elsewhere and the link still resolves.

shell
# A CID looks like this:
bafybeigsqgnxogzyi7fdyogldjvia3juqkxnjv...

# Anyone can fetch it from any IPFS gateway:
curl -L https://ipfs.io/ipfs/{cid} -o video.mp4
curl -L https://gateway.pinata.cloud/ipfs/{cid} -o video.mp4
curl -L https://streamtxc.com/api/stream/{cid}    -o video.mp4

Treat the CID as the canonical link to a video — pass it around, stamp it on chain, embed it, archive it. Our /v/{cid} page is just a friendly wrapper around it.

02 · on-chain proof & OP_RETURN

When a video is claimed, paid for, renewed, taken down, or DMCA'd, we broadcast a tiny TXC transaction whose OP_RETURN output carries an ≤80-byte tag describing the event. Every event is sent to a per-video deposit address, so a single mempool address page is the entire public lifecycle of that video — claim, payment, renewal, takedown, the whole thing.

Comments work the same way: the comment body is pinned to IPFS, then its CID is stamped against the video's wallet via OP_RETURN. The chain proves when something was said and by which wallet — IPFS proves what was said.

shell
event tags broadcast in OP_RETURN

  C  claim          — first time a video lands on the network
  P  payment        — hosting payment received
  R  renewal        — hosting prepaid for another period
  T  takedown       — uploader took it down
  D  DMCA           — moderator pulled it
  M  metadata       — title/description/uploader update
  X  comment        — IPFS CID of a new comment body

Result: TXC proof is permanent — the timestamp does not expire even if our gateway goes away. Anyone can decode the OP_RETURN payloads against a video's deposit address and reconstruct its full history without trusting us.

03 · login by signing

streamTXC has no usernames or passwords. To prove you control a wallet, you sign a one-time challenge message with TXC Core's Sign Message tool (or any wallet that produces a base64 message signature for a legacy "T…" address). We verify it server-side against the TXC node — no transaction, no spend, no gas.

shell
# Step 1 — request a challenge
curl -X POST https://streamtxc.com/_serverFn/requestWalletLogin \
  -H "content-type: application/json" \
  -d '{"data":{"wallet":"T9..."}}'

# → { "message": "streamTXC — Sign in...", "challengeToken": "eyJhbGc..." }

# Step 2 — sign `message` in TXC Core (File → Sign Message),
# then hand the signature + challengeToken back:

curl -X POST https://streamtxc.com/_serverFn/completeWalletLogin \
  -H "content-type: application/json" \
  -d '{"data":{
        "challengeToken": "eyJhbGc...",
        "signature":      "H4r...=="
      }}'

# → session token (5 min challenge TTL, then verified)

The challenge message explicitly says "signing this does NOT authorize any transaction or spend any TXC." That's true — message signing is a pure ECDSA proof of key ownership. The wallet itself never moves.

Programmatic verification of any TXC-signed message — not just ours — is also exposed as a one-shot endpoint, see §06.

04 · stream a video

GET/api/stream/{cid}

302-redirects to our dedicated Pinata gateway for the given IPFS CID. Supports HTTP Range requests, so it works as a drop-in <video src> for any browser, native app, or video player. Each call also increments the on-site view counter (debounced per IP).

shell
curl -L https://streamtxc.com/api/stream/bafybeigsqgnxogzyi7fdyogldjvia3juqkxnjvexampleexampleexample -o video.mp4

HTML use: <video src="https://streamtxc.com/api/stream/{cid}" controls />

05 · embed the player

GET/embed/{cid}

A bare-bones streamTXC player you can drop into any page via <iframe>. Optional query params: autoplay=1, muted=1, t=30 (start seconds).

shell
<iframe
  src="https://streamtxc.com/embed/{cid}?autoplay=1&muted=1"
  width="640" height="360"
  frameborder="0"
  allow="autoplay; fullscreen; picture-in-picture"
  allowfullscreen
></iframe>

06 · verify a TXC signed message

POST/api/public/txc-verify-message

Cryptographically verifies a message signed by a TXC wallet. Useful if you're building wallet-gated content, comments, or proofs of ownership against any TXC address — not just streamTXC ones.

shell
curl -X POST https://streamtxc.com/api/public/txc-verify-message \
  -H "content-type: application/json" \
  -d '{
    "address":   "txc1q...",
    "signature": "H4r...==",
    "message":   "I own this wallet"
  }'

# → { "valid": true }

07 · TXC node health

GET/api/public/txc-health

Reports the live status of the TXC node powering on-chain timestamps: tip block height, chain info, hot-wallet balance, and the public top-up address. Handy for monitoring or building status dashboards.

shell
curl https://streamtxc.com/api/public/txc-health | jq
08 · audit on mempool

Every video, comment, and boost on streamTXC has its own TXC wallet address. The full lifecycle — claim, payment, renewal, takedown — is published as on-chain transactions to that address. You can audit any of it directly on the public mempool explorer:

shell
https://mempool.texitcoin.org/address/{video_wallet}

[ ground rules ]

  • · Be reasonable. There's no hard rate limit, but bots that hammer the gateway will get throttled at the edge.
  • · Videos that aren't paid for get unpinned after the grace window — CIDs survive on IPFS but may not be available from our gateway.
  • · Want to upload? Use the /upload flow in the UI — it handles wallet assignment, OP_RETURN stamping, and pricing in one shot.

Built something cool on top of this? Tag it on the chain — your tx will show up on the video's wallet history forever. learn more about TXC