Files
zeekay a96414cf40 feat: Polkadot (DOT) — the 6th login ecosystem (sr25519/ed25519/ecdsa)
Adds the full Polkadot/Substrate connector + verifier, both sides, so
@luxwallet/connect covers every Lux Bridge family (supportedChains: dot).

TS:
- types: Chain += 'polkadot'; SignatureScheme += sr25519 / ed25519-substrate /
  ecdsa-substrate. caip122 label 'Polkadot'.
- src/polkadot/connect.ts — raw window.injectedWeb3 (polkadot.js / Talisman /
  SubWallet), signRaw({type:'bytes'}); extension wraps <Bytes>…</Bytes>.
- src/polkadot/verify.ts — PURE, async (sr25519 needs cryptoWaitReady),
  fails closed. @polkadot/util-crypto (Apache-2.0; sr25519 via @scure/sr25519
  MIT) signatureVerify over the wrapped bytes + SS58 decode/checksum binding.
  Separate ./polkadot/verify entrypoint keeps the other 5 chains' verify core
  @noble-pure & synchronous.
- verify.ts: verifyProofAsync (all 6) alongside sync verifyProof (5).
- 20 vitest cases (sr25519/ed25519/ecdsa round-trip, tamper, wrong addr,
  SS58 checksum, fail-closed); 91 TS tests green.

Go (go/walletconnect/polkadot.go):
- sr25519 via github.com/oasisprotocol/curve25519-voi (BSD-3-Clause) —
  NOT the LGPL-3.0 ChainSafe/go-schnorrkel. ed25519 stdlib; ecdsa decred
  secp256k1 recover; SS58 via mr-tron/base58 + x/crypto/blake2b.
- Cross-language KATs: Go verifies the exact signatures the TS
  @polkadot/util-crypto side produced (all 3 schemes). Full Go suite green.
- Zero copyleft: go-licenses report shows every new dep BSD-3/MIT/ISC.

Licensing landmine resolved permissively (zero GPL/LGPL/AGPL).
2026-06-23 22:25:51 -07:00

29 lines
923 B
AMPL

module github.com/luxwallet/connect/go
go 1.26.4
require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1
github.com/luxfi/crypto v1.19.21
github.com/mr-tron/base58 v1.3.0
github.com/oasisprotocol/curve25519-voi v0.0.0-20251114093237-2ab5a27a1729
golang.org/x/crypto v0.53.0
)
require (
github.com/gorilla/rpc v1.2.1 // indirect
github.com/luxfi/accel v1.2.4 // indirect
github.com/luxfi/cache v1.2.1 // indirect
github.com/luxfi/codec v1.1.4 // indirect
github.com/luxfi/container v0.0.4 // indirect
github.com/luxfi/ids v1.2.10 // indirect
github.com/luxfi/math v1.4.1 // indirect
github.com/luxfi/math/big v0.1.0 // indirect
github.com/luxfi/metric v1.5.7 // indirect
github.com/luxfi/mock v0.1.1 // indirect
go.uber.org/mock v0.6.0 // indirect
golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 // indirect
golang.org/x/sys v0.46.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
)