A modular Go SDK for building multi-chain cryptocurrency wallets and blockchain applications.
- Go: 1.24.0 or higher
- Optional: RPC endpoint (Infura, Alchemy, or your own node) for examples
go get github.com/status-im/go-wallet-sdkFor development and contributing:
git clone https://github.com/status-im/go-wallet-sdk
cd go-wallet-sdk
go mod download- GoDoc / API: https://pkg.go.dev/github.com/status-im/go-wallet-sdk
- Package READMEs: see the links in the table below
| Area | Package | Use it when… | Key entrypoints (start here) |
|---|---|---|---|
| RPC client | pkg/ethclient |
You need chain-agnostic JSON-RPC (or a go-ethereum compatible surface) | NewClient, Eth* methods, BalanceAt |
| Balances | pkg/balance/fetcher |
You need fast native/ERC20 balance reads with fallback strategies | FetchNativeBalances, FetchErc20Balances |
| Batching | pkg/multicall |
You want to batch thousands of contract reads via Multicall3 | Build*Call, RunSync, RunAsync |
| Multi-standard balances | pkg/balance/multistandardfetcher |
You want native+ERC20+ERC721+ERC1155 balances via one API | FetchBalances, FetchConfig |
| Gas | pkg/gas |
You need fee suggestions + inclusion estimates across L1/L2s | GetTxSuggestions, GetChainSuggestions |
| Transaction generation | pkg/txgenerator |
You need to generate unsigned transactions for ETH/ERC20/ERC721/ERC1155 | TransferETH, TransferERC20, ApproveERC20, TransferFromERC721, SafeTransferFromERC721, TransferERC1155 |
| Transfers | pkg/eventfilter |
You need to efficiently query ERC20/721/1155 transfers via eth_getLogs |
FilterTransfers, TransferQueryConfig |
| Log parsing | pkg/eventlog |
You need to detect/parse standard token events | ParseLog, Event |
| Accounts | pkg/accounts/extkeystore |
You need HD (BIP32) keystore + signing | NewKeyStore, DeriveWithPassphrase, SignHash |
| Mnemonics | pkg/accounts/mnemonic |
You need BIP39 mnemonics + seeds/extended keys | CreateRandomMnemonic, CreateExtendedKeyFromMnemonic |
| Token types | pkg/tokens/types |
You need core token data structures and key generation | Token, TokenList, TokenKey, IsNative |
| Token parsers | pkg/tokens/parsers |
You need to parse token lists from various formats | StandardTokenListParser, StatusTokenListParser, CoinGeckoAllTokensParser |
| Token fetcher | pkg/tokens/fetcher |
You need HTTP fetching with ETag caching and validation | New, Fetch, FetchConcurrent |
| Token autofetcher | pkg/tokens/autofetcher |
You need automated background refresh of token lists | NewAutofetcherFromTokenLists, NewAutofetcherFromRemoteListOfTokenLists |
| Token builder | pkg/tokens/builder |
You need to incrementally build and merge token collections | New, AddTokenList, AddNativeTokenList |
| Token manager | pkg/tokens/manager |
You need high-level token management with auto-refresh | New, Start, GetTokenByChainAddress, UniqueTokens |
| ENS | pkg/ens |
You need forward/reverse ENS resolution | NewResolver, AddressOf, GetName, IsSupportedChain |
The SDK can be compiled as a C library (shared or static) for use in non-Go applications:
Shared Library:
make shared-libraryThis creates:
build/libgowalletsdk.dylib(macOS) orbuild/libgowalletsdk.so(Linux)build/libgowalletsdk.h(C header file)
Static Library:
make static-libraryThis creates:
build/libgowalletsdk.a(static library)build/libgowalletsdk.h(C header file)
The C library exposes core SDK functionality through a C-compatible API, including:
- Ethereum client operations (RPC calls, chain ID, balances)
- Multi-standard balance fetching (Native ETH, ERC20, ERC721, ERC1155)
- Transaction generation (ETH transfers, ERC20, ERC721, ERC1155 operations)
- Account management (extended keystore and standard keystore)
- Mnemonic generation and key derivation utilities
See examples/c-app for a complete C usage example.
cd examples/balance-fetcher-web
go run .Access: http://localhost:8080
cd examples/ethclient-usage
go run .cd examples/gas-comparison
# Test with local mock data
go run . -fake
# Test with real networks (requires Infura API key)
go run . -infura-api-key YOUR_API_KEYcd examples/txgenerator-example
go run .Access: http://localhost:8080
Web interface for generating unsigned Ethereum transactions for ETH transfers, ERC20, ERC721, and ERC1155 operations.
cd examples/multiclient3-usage
go run .cd examples/eventfilter-example
go run . -account 0xYourAddress -start 19000000 -end 19100000cd examples/accounts
go run .Access: http://localhost:8081
Interactive web interface for testing extkeystore and standard keystore functionality, including mnemonic generation, account creation, derivation, import/export, and signing.
# Build the shared library first
make shared-library
# Then build and run the C example
cd examples/c-app
make build
cd bin
./c-appDemonstrates how to use the Go Wallet SDK from C applications using the shared library. The example includes:
- Ethereum client operations (creating clients, retrieving chain ID, fetching balances, making JSON-RPC calls)
- Multi-standard balance fetching (Native ETH, ERC20, ERC721, ERC1155)
- Account management with extended keystore and standard keystore
- Mnemonic generation and key derivation
- Account creation, import/export, signing, and derivation
# Token Builder - Incremental token collection building
cd examples/token-builder
go run .
# Token Fetcher - HTTP-based token list fetching
cd examples/token-fetcher
go run .
# Token Manager - High-level token management
cd examples/token-manager
go run .
# Token Parser - Parse different token list formats
cd examples/token-parser
go run .cd examples/ens-resolver-example
# Forward resolution (ENS name to address)
go run . -rpc https://eth.llamarpc.com -name vitalik.eth
# Reverse resolution (address to ENS name)
go run . -rpc https://eth.llamarpc.com -address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045go test ./...- Balance Fetcher - Balance fetching functionality
- Multicall - Efficient contract call batching
- Ethereum Client - Complete Ethereum RPC client
- Gas Estimation - Gas fee estimation and suggestions
- Transaction Generator - Generate unsigned transactions for ETH/ERC20/ERC721/ERC1155
- Event Filter - Event filtering for transfers
- Event Log Parser - Event log parsing
- Extended Keystore - HD wallet keystore with BIP32 support
- Mnemonic - BIP39 mnemonic phrase utilities
- Token Types - Core token data structures
- Token Parsers - Token list format parsers
- Token Fetcher - HTTP token list fetching
- Token AutoFetcher - Automated background fetching
- Token Builder - Incremental token collection building
- Token Manager - High-level token management
- ENS Resolver - ENS name resolution
- Web Balance Fetcher - Web interface for balance fetching
- Ethereum Client Usage - Ethereum client examples
- Gas Comparison - Gas fee comparison tool
- Transaction Generator Example - Web interface for generating transactions
- Multicall Usage - Multicall examples
- Event Filter Example - Event filtering examples
- Accounts Example - Keystore management web interface
- C Application Example - C application using the shared library
- Token Builder - Token collection building
- Token Fetcher - Token list fetching
- Token Manager - Token management
- Token Parser - Token list parsing
- ENS Resolver Example - ENS resolution CLI tool
- Technical Specifications - Complete SDK specifications and architecture
See CONTRIBUTING.md for guidelines on:
- Code style and conventions
- Testing requirements
- Pull request process
- Development workflow
Mozilla Public License Version 2.0 - see LICENSE
Built by the Status team.