Ethers v6 Integration
Replace local private keys with Emblem remote signing for ethers v6 applications.
📖 Related Documentation
Before (Local Private Key)
TY
before.tsLoading...
After (Emblem Remote Signer)
TY
after.tsLoading...
React/Next.js Usage
When using @emblemvault/emblem-auth-react, access the authenticated SDK via the useEmblemAuth() hook:
TS
SendTransaction.tsxLoading...
Supported Operations
The wallet returned by toEthersWallet() implements the standard ethers v6 Signer interface plus additional helpers:
Message Signing
TY
sign-message.tsLoading...
Typed Data Signing (EIP-712)
TY
sign-typed-data.tsLoading...
Transaction Sending
TY
send-transaction.tsLoading...
Sign & Broadcast Helper
Convenience method that signs and optionally waits for receipt
TY
sign-and-broadcast.tsLoading...
Enhanced Features
Beyond the standard ethers Signer interface, the Emblem wallet includes additional methods:
TY
enhanced-features.tsLoading...
Complete Example
TY
complete-example.tsLoading...
Wallet Interface
The returned wallet implements the ethers v6 Signer interface:
getAddress(): Promise<string>
signMessage(message): Promise<string>
signTypedData(domain, types, value): Promise<string>
signTransaction(tx): Promise<string>
sendTransaction(tx): Promise<TransactionResponse>
// Enhanced methods:
getVaultId(): string
setChainId(chainId): void
getChainId(): number
signAndBroadcast(tx, waitForReceipt?): Promise<string>
Benefits of Emblem Integration
- • No private key exposure - Keys stay secure in Emblem Vault
- • Multi-chain support - Use the same vault across EVM chains
- • Drop-in replacement - Compatible with existing ethers v6 code
- • Enhanced helpers - Additional methods like signAndBroadcast()
- • Provider integration - Works with any ethers Provider
Ethers Version
This signer is built for ethers v6. Make sure you're using the correct version in your package.json: npm install ethers@^6