wallet-sdk/README.md at main · phantom/wallet-sdk · GitHub

The Phantom Wallet SDK is a powerful tool for developers looking to integrate Solana-based applications with Web3 wallets. By connecting through hardware wallets such as Trezor Bridge, Trezor Suite, and Ledger Live, users gain enhanced security and versatility for blockchain interactions.

Introduction to Phantom Wallet SDK

The Phantom Wallet SDK provides developers with a straightforward way to connect their Web3 apps to the Phantom Wallet. Whether you are building DeFi platforms, NFT marketplaces, or dApps, this SDK simplifies authentication, transaction signing, and wallet management. Combining it with Trezor Bridge or Ledger Live adds a robust hardware wallet layer to your applications.

Key features include:

Installing Phantom Wallet SDK

To get started, install the SDK via npm:

npm install @phantom/wallet-sdk

Next, integrate it into your project and initialize the wallet connection:

import { Wallet } from '@phantom/wallet-sdk';
const wallet = new Wallet();

For hardware wallet support, ensure Trezor Bridge or Ledger Live is installed on your system. This enables secure signing of transactions directly from the Phantom Wallet SDK.

Connecting Hardware Wallets

Trezor Bridge Integration

Trezor Bridge is essential for connecting your Trezor device with any Web3 wallet, including Phantom. Once installed, it enables secure communication between your device and the SDK:

  1. Download Trezor Bridge from the official site.
  2. Install it following your operating system instructions.
  3. Connect your Trezor hardware wallet.
  4. Authorize the connection in your Web3 application.

Trezor Suite Features

The Trezor Suite is the full application for managing Trezor hardware wallets. Integrating with Phantom Wallet SDK allows:

Trezor Suite Official Trezor Start Guide

Ledger Live Integration

Ledger users can connect their hardware wallets to Phantom Wallet SDK via Ledger Live. This allows secure signing and seamless asset management:

Ledger Live ensures your private keys remain on the device, safeguarding your crypto transactions while using dApps.

Advanced Features of Phantom Wallet SDK

The SDK offers developers a variety of advanced features:

Step-by-Step Guide for Developers

Here’s how to integrate Phantom Wallet SDK in your project:

  1. Install the SDK via npm.
  2. Initialize the wallet connection in your app.
  3. Check for hardware wallet availability (Trezor Suite, Ledger Live).
  4. Implement authentication and transaction signing.
  5. Test with both software wallets and hardware wallets.

Security Best Practices

Using Trezor Bridge, Trezor Suite, and Ledger Live enhances security by:

Official Resources

Here are 10 official links to help you get started:

Conclusion

The Phantom Wallet SDK makes integrating Web3 wallets into Solana apps easy and secure. By supporting Trezor Bridge, Trezor Suite, and Ledger Live, developers can provide users with enhanced security while maintaining a seamless experience. Use the official links above to get started and explore the potential of Web3 applications.