← all projects

splitstream

@0x-pankaj·pankaj·35 followers·added 2026-07-19
0
stars
18k
lines
141
files
0
forks
35
followers
languages
TypeScript 93%Solidity 7%JavaScript 0%Shell 0%

SplitStream makes single pieces of content sellable, fanning each payment out across every contributor on their own chain. The reusable core is the settlement layer. computeSplit (packages/shared/src/splits.ts) splits one payment across N contributors in 6-decimal bigint, assigning the rounding remainder to the largest share so the parts sum to the whole. packages/shared/src/decimals.ts (parseUsdc6/formatUsdc6) is the single crossing point for Arc's USDC precision-duality — 18-decimal native gas versus the 6-decimal ERC-20 at 0x3600000000000000000000000000000000000000. Hybrid routing in routing.ts (planPayout, computeFees) sends each leg down the instant Gateway path or CCTP V2 by size. A full x402 seller stack (apps/server/src/services/x402.ts) issues an HTTP 402 challenge with single-use-nonce PaymentRequirements, then verifies the Arc receipt on-chain, confirms a USDC transfer to payTo, and blocks tx-hash replay before settling the split. A credential-injection proxy charges agents per call for authenticated APIs without exposing the key, and an MCP server (apps/server/src/mcp) exposes list_pieces/pay_for_piece/call_api with per-agent spend caps.

events
tags
circle components
team · solo

1 (Solo) — Pankaj singh

on xx/punk_onchain
last pushed 2026-08-29