You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose adding support for pluggable signature schemes to make Ethers.js more flexible for the evolving blockchain landscape. This enhancement would allow the library to handle cryptographic signature algorithms beyond ECDSA (like BLS and Schnorr) while maintaining backward compatibility.
Why This Matters Now
The Ethereum ecosystem is rapidly diversifying beyond the original ECDSA signature scheme:
ZK-rollups and L2s are increasingly adopting BLS signatures for aggregation properties
Privacy-focused applications need Schnorr signatures for their multi-signature capabilities
Cross-chain applications require flexibility to work with different signature schemes
Enterprise adopters often have specific regulatory requirements around signature algorithms
Many teams are currently maintaining forks or complex workarounds to handle these needs, creating unnecessary fragmentation. A pluggable architecture would allow Ethers.js to remain the universal standard across these emerging use cases without sacrificing its clean API or security model.
In short: as signature diversity in the ecosystem grows, Ethers.js risks being sidelined for innovative projects unless it can accommodate multiple signature schemes elegantly.
Proposed Architecture
I suggest implementing a modular SignatureProvider interface that would be integrated into the Signer class:
Create an abstract SignatureProvider interface
Refactor existing ECDSA implementation to conform to this interface
Modify the Signer class to use the provider pattern for signature operations
Default to ECDSA for full backward compatibility
Usage Example
Here's a simplified example of how a custom scheme might work:
import{Wallet,SignatureProvider}from"ethers";// Implementing a BLS signature providerclassBLSSignatureProviderimplementsSignatureProvider{constructor(privatereadonlyprivateKey: Uint8Array){}asyncsignDigest(digest: Uint8Array): Promise<SignatureResponse>{// BLS signature implementationreturn{scheme: "BLS",signature: signatureBytes,compressedSignature: "0x..."};}// Other required methods: recoverPublicKey, computeAddress, etc.}// Using it with a walletasyncfunctiondemo(){constblsProvider=newBLSSignatureProvider(privateKey);constwallet=newWallet({signatureProvider: blsProvider});// Works with existing methodsconstsignedTx=awaitwallet.signTransaction(transaction);constsignature=awaitwallet.signMessage("Hello Ethereum!");}
Benefits
This approach offers several advantages:
Zero breaking changes - All existing code continues to work as-is
Futureproofing - Ethers.js can quickly adapt to new signature schemes
Unified ecosystem - Reduces the need for forks and custom implementations
Developer flexibility - Projects can implement exactly what they need
Implementation Plan
If there's interest, I'd be happy to submit a PR with:
Interface definitions
Refactored Signer class
ECDSA implementation using the new interface
Basic tests
Sample alternative implementation (BLS)
What do you think? Would this be a valuable addition to Ethers.js?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey Ethers team! 👋
I'd like to propose adding support for pluggable signature schemes to make Ethers.js more flexible for the evolving blockchain landscape. This enhancement would allow the library to handle cryptographic signature algorithms beyond ECDSA (like BLS and Schnorr) while maintaining backward compatibility.
Why This Matters Now
The Ethereum ecosystem is rapidly diversifying beyond the original ECDSA signature scheme:
Many teams are currently maintaining forks or complex workarounds to handle these needs, creating unnecessary fragmentation. A pluggable architecture would allow Ethers.js to remain the universal standard across these emerging use cases without sacrificing its clean API or security model.
In short: as signature diversity in the ecosystem grows, Ethers.js risks being sidelined for innovative projects unless it can accommodate multiple signature schemes elegantly.
Proposed Architecture
I suggest implementing a modular
SignatureProvider
interface that would be integrated into theSigner
class:SignatureProvider
interfaceSigner
class to use the provider pattern for signature operationsUsage Example
Here's a simplified example of how a custom scheme might work:
Benefits
This approach offers several advantages:
Implementation Plan
If there's interest, I'd be happy to submit a PR with:
Signer
classWhat do you think? Would this be a valuable addition to Ethers.js?
Beta Was this translation helpful? Give feedback.
All reactions