Skip to content

docs(tokens): BRC-163 BSV-21 basket profile (BRC-46/100) - #217

Merged
sirdeggen merged 19 commits into
bsv-blockchain:masterfrom
GenericCPU:docs/brc-163-bsv21-basket
Aug 28, 2026
Merged

docs(tokens): BRC-163 BSV-21 basket profile (BRC-46/100)#217
sirdeggen merged 19 commits into
bsv-blockchain:masterfrom
GenericCPU:docs/brc-163-bsv21-basket

Conversation

@GenericCPU

Copy link
Copy Markdown
Contributor

Summary

  • Adds BRC-163: application basket profile for BSV-21 fungible value under BRC-46 / BRC-100 (bsv21).
  • Mirrors BRC-147 for collectables: tags, customInstructions, list / send / internalizeAction, payment separation.
  • Depends on #213 (BRC-161 / BRC-162). This PR does not redefine token economics — only wallet basket / remittance interop.
  • Index rows in README.md / SUMMARY.md (placed after 160 until 161/162 land on master).

Motivation

#213 correctly leaves baskets out of scope. Without a shared basket name and remittance contract, wallets cannot hold / list / transfer / import the same tips interoperably. HandCash is already using bsv21 under Collect → Tokens (not Pay / not 1sat).

Test plan

Made with Cursor

Companion to shruggr's 161/162: wallet basket `bsv21`, tags/CI remittance,
list/send/import — admission stays on-chain, not currency/Pay.

Co-authored-by: Cursor <cursoragent@cursor.com>
@GenericCPU

Copy link
Copy Markdown
Contributor Author

Closing: HandCash is not shipping BSV-21 fungibles without a P2P-scalable conservation proof (no indexer dependency for steady-state). Basket profile deferred with the feature.

@GenericCPU GenericCPU closed this Aug 10, 2026
Align basket profile with HandCash: holders verify their tips; issuers
trusted for mint policy. Global supply-cap audits remain optional.

Co-authored-by: Cursor <cursoragent@cursor.com>
@GenericCPU GenericCPU reopened this Aug 10, 2026
@GenericCPU

Copy link
Copy Markdown
Contributor Author

Reopened with an updated trust model:

  • Holders verify their tips (local history / remittance).
  • Issuers are trusted for mint policy — no global supply-cap proof required by this profile.
  • Still depends on BRC-161/162: BSV-21 fungible tokens (JSON + binary) #213 for on-chain economics; this PR is basket / remittance only.

Define remittance, tagged spend paths (plain / cosigned / refuse), and
fail-closed rules. Cosign remains optional; plain owner tips stay valid.

Co-authored-by: Cursor <cursoragent@cursor.com>
@GenericCPU

Copy link
Copy Markdown
Contributor Author

Added an optional cosigner section to BRC-163:

  • Remittance: cosign.pubkey (+ optional endpoint / feeAddress) and tag cosign:<pubkey>
  • Tagged spend paths: plain | cosigned | refuse — no silent fallthrough to bare P2PKH
  • Informative MNEE-shaped script suffix + /v2/transfer API shape
  • Wallets that don’t implement cosign still forward fields and must not plain-spend cosigned tips

HandCash Desktop mirrors this in bsv21TipKind (detect + refuse until a cosigner client is configured). Cloud already has the MNEE cosigner instrument path.

@GenericCPU
GenericCPU marked this pull request as draft August 10, 2026 22:39
Reserve id: for per-output identity; CI JSON field id stays BRC-161.

Co-authored-by: Cursor <cursoragent@cursor.com>
@GenericCPU

Copy link
Copy Markdown
Contributor Author

Updated tags per review: token id is bsv21:<tokenId>, not id:<…>.

  • Bare tag bsv21 still marks the tip under this profile.
  • id: left free for a per-output identity key (stack-wide lookup).
  • Inscription / customInstructions JSON field id unchanged (BRC-161).

Align with reference BRC-100 client (tags lowercased ≤300B;
internalize CI ≤1000B). Keep id: for per-output list keys.
Plain BSV-21 only — MNEE-class cosigner routes stay out of band.

Co-authored-by: Cursor <cursoragent@cursor.com>
@GenericCPU

Copy link
Copy Markdown
Contributor Author

Processed offline feedback:

Tags vs customInstructions

Documented the split against the reference client constraints (@bsv/sdk validation):

  • tags: trim + lowercase, ≤ 300 UTF-8 bytes each
  • customInstructions on internalizeAction basket insertion: ≤ 1000 UTF-8 bytes
  • case-preserving display (sym) belongs in CI; sym: tag is legacy/filter-only
  • id: tag reserved for per-output list key (not BSV-21 token id) — awaiting your remaining id notes this evening

MNEE / cosigner

Removed the interleaved MNEE cosigner API / remittance from the normative profile. Plain owner BSV-21 only (1Sat SDK shape). Non-plain locks fail closed; MNEE stays a separate instrument route (as in Cloud), not part of this basket send surface.

Happy to adjust further when the rest of the id comments land.

Issuers MAY Sigma-sign deploy+mint and mirror pubkey in CI/tags.
Unsigned tips remain fully valid; MNEE/cosign stays out of band.

Co-authored-by: Cursor <cursoragent@cursor.com>
@GenericCPU

Copy link
Copy Markdown
Contributor Author

Pushed an update to this branch: optional issuer attestation via Sigma (BRC-77) on deploy+mint, with CI/tag issuer: as a mirror only. Unsigned BSV-21 tips remain fully valid; no global registry or MNEE/cosign in the base remittance path.

Comment thread tokens/0163.md Outdated

| Tag | Requirement | Meaning |
|-----|-------------|---------|
| `bsv21` | SHOULD on conforming transfers and imports | Marks the output as a BSV-21 value tip under this profile (no suffix). |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this buy anything if you are already in a bsv21 basket, and all rows will have it?

@shruggr

shruggr commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

I don't see the cosigner section here any more, but I'm not sure it's actually necessary either, nor any special handling. A token which uses cosigner will always use cosigner and it can be parsed from the output script. There needs to be some other registration of known cosigner API in any wallet that wants to be able to handle those, so I'm not sure that it belongs in this spec for the general token handling. MNEE will work just fine with these rules, you just don't possess the keys to sing it fully, and the app needs to know how to submit.

Require P2P / accompanying BEEF for ticker icon bytes; CI keeps only the
outpoint pointer. HTTP content APIs are optional recovery, not normative.

Co-authored-by: Cursor <cursoragent@cursor.com>
@GenericCPU

Copy link
Copy Markdown
Contributor Author

Follow-up: Icon media (P2P)

Updated BRC-163 so ticker icon display does not depend on HTTP content indexers:

  • CI still carries only the icon outpoint
  • Writers SHOULD merge the icon inscription tx into transfer/import BEEF
  • Receivers decode ord envelope bytes locally (and may cache)
  • Hash identicon remains a UI fallback when no icon / no local bytes

HandCash Desktop implements local cache + BEEF decode (no Gorilla content URL for fungibles).

@shruggr

shruggr commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@GenericCPU I have formalized the id field as brc164. #219

- Point per-output id: at BRC-164 (not token id).
- Writers MUST underscore bsv21:<tokenId> values; readers still normalize.
- Note fine-grained p bsv21 … permissions out of scope for this profile.
…dump

- Tags: bsv21:<id>, amt, dec, icon, optional filters; drop bare bsv21 marker
- CI: protocolID/keyID/counterparty; SHOULD sym (case-preserving)
- Do not require inscription fields (p/op/id/amt/…) duplicated into CI
- Parse token economics from script; BRC-164 for id: list keys
shruggr and others added 6 commits August 18, 2026 14:17
Keep Brandon’s remittance-in-CI model for id/amt/op/sym/dec/icon plus
derivation. Tags are exact listOutputs filters (bsv21:<id> primary);
amt/sym/dec/icon tags MAY for legacy only. No full inscription JSON
required in CI. Reader priority: CI → tags → script.
docs(163): BRC-164 + underscore writers + defer p-scheme
Keep both README index rows: BRC-163 (this draft) and BRC-164 (Output
Identity Tags) from master.

Co-authored-by: Cursor <cursoragent@cursor.com>
@GenericCPU
GenericCPU marked this pull request as ready for review August 18, 2026 22:11
@sirdeggen
sirdeggen merged commit 5e5189c into bsv-blockchain:master Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants