Skip to main content

Recommended: JavaScript SDK with React Hooks

For new React apps, we recommend the JavaScript SDK with React Hooks (@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.
This guide walks you through integrating your Spark wallet with the Dynamic SDK. By implementing the 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 key
  • disconnect() - Disconnects from the wallet
  • getAddress() - Retrieves the current wallet address
  • signMessage() - Signs messages for authentication
  • signMessageWithTaproot() - Signs messages using Taproot protocol
  • transferBitcoin() - Sends Bitcoin to other Spark addresses
  • transferTokens() - Transfers tokens between Spark addresses
  • request() - 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:
  1. Visit the Dynamic Public Wallet Connectors repository
  2. Follow the guidelines in the CONTRIBUTING.md file
  3. Create your connector package following the established patterns

Connector Structure

Your connector should extend SparkWalletConnector and implement the required overrides:
YourSparkConnector Implementation
3

Test Your Integration

Before submitting, thoroughly test your integration:
  1. Connection Testing - Verify wallet connects and disconnects properly
  2. Address Retrieval - Ensure addresses are returned correctly
  3. Message Signing - Test both regular and Taproot message signing
  4. Transaction Testing - Test Bitcoin and token transfers
  5. Error Handling - Verify proper error handling for all methods
4

Submit Your Connector

Once your implementation is complete and tested:
  1. Submit your connector following the Custom Wallet Connectors process
  2. Fill out the submission form to get allowlisted
  3. Our team will review and integrate your connector

Supported Networks

Note: Currently only mainnet is supported. Testnet, signet, and regtest support may be added in future versions.

Reference: ISparkProvider Interface

The complete ISparkProvider interface specification:
ISparkProvider Interface

Reference: Type Definitions

Spark Type Definitions
Last modified on June 25, 2026