@ldgr/protocol
v0.5.0
Published
`@ldgr/protocol` contains the versioned, pure protocol primitives shared by LDGR applications: decimal/atomic amount conversion, canonical payloads, Ed25519 and BIP-340 helpers, asset identifiers, silent-payment derivation, and declarative-contract valida
Readme
LDGR protocol
@ldgr/protocol contains the versioned, pure protocol primitives shared by
LDGR applications: decimal/atomic amount conversion, canonical payloads,
Ed25519 and BIP-340 helpers, asset identifiers, silent-payment derivation, and
declarative-contract validation.
It does not connect to a ledger, submit transactions, or store keys. Use
@ldgr/client for backend HTTP integration and @ldgr/wallet-sdk for a
browser site that asks the LDGR extension to confirm an action.
Silent-payment primitives
deriveSilentPaymentIdentity derives independent sender-DH, receiver-scan,
and BIP-340 spend branches from an existing 32-byte recovery seed. Payment
codes use network-specific Bech32m HRPs; sender and receiver output derivation
binds the sender, asset, nonce, and output index. Version-0 Ed25519 addresses
remain Bech32-compatible, while version-1 one-time BIP-340 addresses require
Bech32m and a liftable x-only secp256k1 point.
These are low-level primitives. Applications must register the sender-DH
public key before transfer, consume the authoritative ascending scan feed, and
handle nonce and transport retries through @ldgr/client. The construction is
LDGR-specific, not BIP-352-compatible, and should remain out of first-party
mainnet UX until external cryptographic review is complete.
