ISparkProvider
interface, your wallet will be compatible with Dynamic’s Spark network support.
Overview
To integrate your Spark wallet with Dynamic, you’ll need to follow these steps: For general information about custom wallet connectors, see our Integrate your Wallet guide.1
Implement the ISparkProvider Interface
Your wallet must implement the
ISparkProvider
interface. This interface defines all the methods Dynamic expects from a Spark wallet.Required Methods
connect()
- Establishes connection and returns the public keydisconnect()
- Disconnects from the walletgetAddress()
- Retrieves the current wallet addresssignMessage()
- Signs messages for authenticationsignMessageWithTaproot()
- Signs messages using Taproot protocoltransferBitcoin()
- Sends Bitcoin to other Spark addressestransferTokens()
- Transfers tokens between Spark addressesrequest()
- Handles generic RPC requests
Example Implementation
Your Wallet Provider Implementation
2
Create a Custom Wallet Connector
Follow the process outlined in our Custom Wallet Connectors guide:
- Visit the Dynamic Public Wallet Connectors repository
- Follow the guidelines in the CONTRIBUTING.md file
- Create your connector package following the established patterns
Connector Structure
Your connector should extendSparkWalletConnector
and implement the required overrides:YourSparkConnector Implementation
3
Test Your Integration
Before submitting, thoroughly test your integration:
- Connection Testing - Verify wallet connects and disconnects properly
- Address Retrieval - Ensure addresses are returned correctly
- Message Signing - Test both regular and Taproot message signing
- Transaction Testing - Test Bitcoin and token transfers
- Error Handling - Verify proper error handling for all methods
4
Submit Your Connector
Once your implementation is complete and tested:
- Submit your connector following the Custom Wallet Connectors process
- Fill out the submission form to get allowlisted
- Our team will review and integrate your connector
Supported Networks
Network | Chain ID | Description | Block Explorer |
---|---|---|---|
Mainnet | 301 | Production network | mempool.space |
Note: Currently only mainnet is supported. Testnet, signet, and regtest support may be added in future versions.
Reference: ISparkProvider Interface
The completeISparkProvider
interface specification:
ISparkProvider Interface
Reference: Type Definitions
Spark Type Definitions