Skip to content

feat(mandala): BRC-162 tokens via @bsv/mandala 0.3.0 - #35

Merged
sirdeggen merged 1 commit into
masterfrom
feat/mandala-brc162
Oct 6, 2026
Merged

sirdeggen merged 1 commit into
masterfrom
feat/mandala-brc162

Conversation

@sirdeggen

Copy link
Copy Markdown
Collaborator

Ports the wallet to @bsv/mandala 0.3.0, the BRC-162 version of the Mandala token library, matching the new Go overlay (bsv-blockchain/mandala master).

Changes

  • Vendors bsv-mandala-0.3.0.tgz (replaces 0.2.0); toolbox peer range ^0.3.0; @bsv/templates ^2.0.0.
  • @bsv/sdk ^2.8.11 (required by the lib); patches/@bsv+sdk+2.8.11.patch renamed from 2.8.2 and applies cleanly.
  • New core/mandala/token.ts: BRC-162 (Bsv21Binary) decode/lock; only value-role outputs count as coins.
  • Token submits name the per-token topic tm_<deployTxid>; σI verified with the v3 per-topic digest.
  • assetId format is now <deployTxid>_0 (peerpay URI and localpay validators updated).

Testing

  • Typecheck clean; full jest suite passes (5956 passed, 10 skipped).
  • Demoed on the iOS simulator against the local Q3 overlay: deploy and issue from the console, transfer to the wallet, receive with the GLD balance credited.

Caveats

  • Existing installs: cached v2 σI and old .0 assetIds/8-chunk coins no longer verify or decode; a fresh install is clean. No migration included.
  • The SDK native signing patch on 2.8.11 has not been exercised on a physical device.

🤖 Generated with Claude Code

- vendor bsv-mandala-0.3.0.tgz; peer ^0.3.0; @bsv/templates ^2.0.0;
  @bsv/sdk ^2.8.11 (lib floor) with the sdk patch carried to 2.8.11
- core/mandala/token.ts: MandalaToken shim over Bsv21Binary (value-role
  outputs only are coins); all decode/lock sites use it
- σI v3: submitToOverlay names [tokenTopic(assetId)] derived from the tx's
  token outputs; AdmissionEntryWire gains optional topic; the verifier
  derives it from the frame asset, settlement asset, or local tx bytes
- SettleArgs.assetId threaded through the inbox pre-hold
- assetId format <deployTxid>_0 in validators (peerpay URI, session codec),
  demo assets and test fixtures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sirdeggen
sirdeggen merged commit 3d1ec7b into master Oct 6, 2026
8 checks passed
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.

1 participant