Skip to content

Comments

Add comprehensive documentation for Canton wallet initialization transactions#8183

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/understand-canton-wallet-init
Draft

Add comprehensive documentation for Canton wallet initialization transactions#8183
Copilot wants to merge 4 commits intomasterfrom
copilot/understand-canton-wallet-init

Conversation

Copy link

Copilot AI commented Feb 19, 2026

Canton requires a mandatory wallet initialization transaction before wallets can send or receive assets. This party registration process differs fundamentally from traditional address derivation and was previously undocumented.

Changes

Documentation Added

  • docs/WALLET_INITIALIZATION.md: Complete technical guide covering:

    • Party-based model and topology transactions
    • Request/response schemas (WalletInitRequest, PreparedParty, WalletInitTransaction)
    • Multi-stage hash computation algorithm (purposes 11, 55)
    • Multi-signature threshold configuration
    • Security validation requirements
    • Integration patterns with BitGo platform
  • docs/WALLET_INITIALIZATION_QUICK_REF.md: Reference sheet with:

    • Transaction component tables
    • Builder method signatures
    • Hash computation flow
    • Error troubleshooting guide
  • docs/WALLET_INITIALIZATION_FLOW.md: Visual ASCII diagrams illustrating:

    • End-to-end initialization flow
    • Hash algorithm with sorting and length-prefixing
    • Multi-signature workflows
    • Address format breakdown
  • README.md: Added documentation links and Canton feature overview

Technical Details

The hash validation is critical for security. Canton uses purpose-prefixed SHA-256:

// Hash each topology transaction (purpose 11)
const rawHashes = topologyTxns.map(tx => sha256Canton(11, tx));

// Sort lexicographically and combine with length prefixes
const combined = sortAndCombineWithLengthPrefix(rawHashes);

// Hash combined buffer (purpose 55) → this is the multiHash you sign
const multiHash = sha256Canton(55, combined);

Key constant corrections:

  • PUBLIC_KEY_SPEC: SIGNING_KEY_SPEC_EC_CURVE25519 (not ED25519)
  • Purpose prefix: 4-byte big-endian integer (not single byte)

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 3 commits February 19, 2026 17:15
Co-authored-by: mohammadalfaiyazbitgo <101133667+mohammadalfaiyazbitgo@users.noreply.github.com>
Co-authored-by: mohammadalfaiyazbitgo <101133667+mohammadalfaiyazbitgo@users.noreply.github.com>
Co-authored-by: mohammadalfaiyazbitgo <101133667+mohammadalfaiyazbitgo@users.noreply.github.com>
Copilot AI changed the title [WIP] Explain Canton wallet initialization transaction Add comprehensive documentation for Canton wallet initialization transactions Feb 19, 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.

2 participants