Skip to content

Harden wallet adapters and add stream metadata types (#969, #970, #971, #972) - #1037

Merged
Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
bbjiggy:feat/969-970-971-972-wallet-adapter-hardening
Oct 31, 2026
Merged

Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
bbjiggy:feat/969-970-971-972-wallet-adapter-hardening

Conversation

@bbjiggy

@bbjiggy bbjiggy commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Added src/tests/stream-metadata-types.test.ts covering the new branded type guard/caster and interface shapes.
  • Added timeout-guard tests to src/tests/freighter-wallet-adapter.test.ts (hangs → WalletTimeoutError; responds in time → resolves normally).
  • Added a malformed-signature test to src/tests/albedo-wallet-adapter.test.ts asserting AlbedoInvalidSignatureError is thrown.
  • Added src/tests/walletconnect-pairing-expiry.test.ts covering auto-retry on expiry, retry exhaustion, maxPairingRetries: 0, non-expiry rejections passing through untouched, onDisplayUri forwarding across the refresh, and listener cleanup.
  • Ran the full adapter/types test suites locally — all pass, no regressions in existing WalletConnect/Freighter/Albedo tests.

Closes #969, Closes #970, Closes #971, Closes #972

- src/types/index.ts: add StreamMetadataURI, StreamInvoiceMetadata and
  IPFSInvoicePayload so metadata attachments conform to a standardized
  schema across integrators (conduit-protocol#969)
- src/adapters/freighter.ts: wrap signTransaction in a configurable
  60s timeout rejecting with WalletTimeoutError, so an ignored or
  closed Freighter popup can no longer hang the caller indefinitely
  (conduit-protocol#970)
- src/adapters/albedo.ts: assert the decorated signature on a signed
  envelope returned by the Albedo iframe is a well-formed 64-byte
  Ed25519 signature before returning it, rejecting with
  AlbedoInvalidSignatureError otherwise (conduit-protocol#971)
- src/adapters/walletconnect.ts: listen for pairing_expire during
  connect() and automatically re-pair (minting a fresh URI) instead of
  requiring a page reload for a new QR code (conduit-protocol#972)
@Jaydbrown
Jaydbrown merged commit e1ac369 into conduit-protocol:main Oct 31, 2026
5 of 9 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

2 participants