The Sophon SDK provides tools and interfaces to integrate Sophon Global Wallet into your applications. This SDK is designed to work with modern web applications and follows Ethereum standards for wallet integration.
Local development does not require a separate partner ID, you can use the default one 123b216c-678e-4611-af9a-2d5b7b061258. For production, you will need to receive a partner ID from us. Please reach out to us to get a partner ID via dropping a mail to product@sophon.xyz.
The Sophon SDK addresses several key challenges in blockchain application development:
- Seamless Wallet Integration: Provides a standardized way to integrate with the Sophon Account without complex configuration
- EIP Standards Compliance: Follows Ethereum Improvement Proposals (EIPs) to ensure compatibility with the ecosystem
- Multi-Wallet Support: Implements EIP-6963 for better multi-wallet discovery and interaction
- Developer Experience: Simplifies the wallet connection process to let developers focus on building their applications
The SDK is organized into a bunch of packages you are free to explore but these are the most important ones:
Core wallet functionality that implements the Ethereum Provider API (EIP-6963). This package provides the basic wallet interface for interacting with the Sophon ecosystem.
Implementation of the EIP-6963 standard (Multi Injected Provider Discovery) for Sophon Account. This enables applications to discover the Sophon Account alongside other wallets in a standardized way.
This is your good-to-go package if you are building web experiences.
Implementation of the bridge between your smart wallet and our Account Server, with this you can add support to the Sophon Account in your react native wallet without having to relay on external apps or other integrations.
- Getting Started
- Architecture Overview
- Web Integration
- React Native Integration
- JWT Integration
- DeFi API
- Modular Accounts
- zksync-sso
- Embedded Wallets
- Node.js (v20+)
- npm or yarn
To integrate the Sophon Account with EIP-6963 support in your project:
# Using npm
npm install @sophon-labs/account-eip6963
# Using yarn
yarn add @sophon-labs/account-eip6963EIP-6963 is a standard that allows multiple Ethereum wallet providers to be discovered on a web page without conflicting with each other, unlike the traditional window.ethereum approach.
- Import and initialize the EIP-6963 emitter in your application entry point:
If you are statically using testnet
import "@sophon-labs/account-eip6963/testnet";
// The Sophon Account will now announce itself via the EIP-6963 protocol
// No additional setup is requiredOtherwise, if you are statically using mainnet
import "@sophon-labs/account-eip6963/mainnet";
// The Sophon Account will now announce itself via the EIP-6963 protocol
// No additional setup is requiredIf you prefer a more dynamic way
import { createSophonEIP6963Emitter } from "@sophon-labs/account-eip6963";
createSophonEIP6963Emitter(process.env.NETWORK_KEY);
// The Sophon Account will now announce itself via the EIP-6963 protocol
// No additional setup is requiredThis will automatically:
- Register the Sophon Account provider
- Announce it through the EIP-6963 events
- Make it available to EIP-6963 compatible applications
Most modern wallet connection libraries, like RainbowKit, wagmi, or Reown Appkit, support EIP-6963. Here's how to connect with wagmi:
import { getDefaultConfig } from "@rainbow-me/rainbowkit";
import { sophonTestnet, sophon } from "wagmi/chains";
import { createSophonEIP6963Emitter } from "@sophon-labs/account-eip6963";
createSophonEIP6963Emitter("testnet");
export const config = getDefaultConfig({
appName: "Your Application",
projectId: "YOUR_PROJECT_ID",
chains: [sophon, sophonTestnet],
ssr: true,
});With this setup, the Sophon Account will appear in the wallet selection UI provided by RainbowKit.
The Sophon Account implements the Ethereum Provider JavaScript API (EIP-1193), which defines a standard interface for Ethereum providers. This ensures compatibility with existing tools and libraries in the Ethereum ecosystem.
The @sophon-labs/account-eip6963 package implements the Multi Injected Provider Discovery specification, which:
- Announces the Sophon Account provider through window events
- Provides wallet metadata (name, icon, RDNS identifier)
- Returns a compliant EIP-1193 provider interface
- Responds to provider discovery requests
See the examples/sandbox-eip6963 directory for a complete example of integrating the Sophon Account with ConnectKit and wagmi.