signMessage/verifyMessageare live: the reference wallet (extension v1.1) implementsbdx_signMessage(approval-gated, SigV1wallet2::signscheme, spend key) andbdx_verifyMessage(public, no grant). PROTOCOL.md §4.6/4.7 updated with the pinned encoding and reference-wallet limits (≤512 chars, no control characters).signMessageclient-side validation now mirrors the wallet: control characters rejected with-32602before the request leaves the page.- React:
useSignMessage()hook (sign + signing/result/error state, quiet on user rejection). connectWithProof(): connect, then immediately sign an ownership challenge of<address>:<nonce>:<timestamp>(nonce = 16 random bytes hex; two approvals). All-or-nothing by default: a declined signature disconnects the fresh connection and rethrows 4001;required: falsekeeps the connection withproof: null.buildAuthChallenge()exported for server-side verifiers.- React:
signOnConnectprop onBeldexProvider— connect() runsconnectWithProof()and exposes the result asproof(context +useConnect), cleared on disconnect/accountsChanged. Declining the signature disconnects the fresh connection again (all-or-nothing). examples/react-demo: sign-message card (approval-gated sign, then a publicverifyMessageround trip); send form (amount/sweep, priority 1–5 incl. flash, tx hash + fee display); explicit disconnect button; full address display with the connect-time proof (challenge + signature); README covering setup, demonstrated APIs, and troubleshooting.
- Mock wallet now returns a
SigV1…signature (wasSigV2…), matching the encoding the reference wallet actually ships. - README: "Message signing" section (usage, SigV1 scheme, constraints,
connectWithProof+ server-side verification guidance); reserved/-32601notes removed; API surface, React hooks, and Status refreshed. .gitignore: vite*.timestamp-*.mjstemp files ignored.
First release. Protocol v1 (see docs/PROTOCOL.md).
- Core SDK:
detectProvider()(EIP-6963-stylebeldex:announceProviderhandshake withwindow.beldexfallback, SSR-safe),BeldexWeb3client with per-method timeouts,PostMessageProviderreference transport. - Methods:
connect,disconnect,getAddress,getBalance(BigInt atomic units),sendTransaction(user-approved in-wallet, flash priority supported),resolveBns,getNetwork,getState. Events:connect,disconnect,accountsChanged,networkChanged,balanceChanged,lock,unlock. BdxRpcErrorwith protocol error codes (EIP-1193 conventions) and classification helpers (isUserRejection,isLocked,isUnauthorized,isExpired).- Utilities:
toAtomic/fromAtomic/parseAtomic(BigInt-exact, 1 BDX = 1e9),checkAddress(format-only shape validation). - React bindings at
bdx-web3js/react:BeldexProvider,useBeldex,useConnect,useBalance,<ConnectButton/>(react >=18 optional peer dependency). - Builds: ESM + CJS + IIFE (
window.BdxWeb3) + type declarations. - Examples:
examples/vanilla.html(inline mock wallet, yields to the real extension),examples/react-demo(Vite). - E2E suite (
npm run e2e) driving the built extension in Chromium.
signMessage/verifyMessagewere reserved in 0.1.0: the wallet's WASM core exposed no signing primitives (docs/PHASE4_CAPABILITY_REPORT.md); calls returned-32601. (Resolved — see Unreleased.)paymentIdonsendTransactionis rejected by the v1 wallet — use integrated addresses.getBalancemay beapproximate: trueuntil the wallet panel has computed key-image-corrected figures for the session.