go-wallet-sdk

module
v0.0.2-0...-79e46c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2025 License: MIT

README ΒΆ

OKX Web3 Go Wallet SDK

Go Reference License

The OKX Web3 Go Wallet SDK is a comprehensive solution for building wallet applications with offline transaction capabilities across multiple blockchain networks. It provides a unified interface for account management, transaction creation, and signing across various mainstream public chains.

πŸš€ Features

  • Multi-chain support: Seamlessly interact with major blockchains.
  • Offline transaction signing: Ensure security with local signing.
  • Account generation and management: Derive addresses with ease.
  • Customizable transaction creation: Flexible parameters for all supported chains.
  • BRC20/Atomical/Runes support: Full Bitcoin token standard compatibility.
  • Extensible architecture: Modular design for future blockchain integration.

πŸ“š Documentation

For detailed documentation and API references, please refer to the README files located within each blockchain directory under the coins folder. Each directory, such as aptos, bitcoin, and others, contains specific usage instructions and implementation details.

Example:

🌐 Supported Chains

The OKX Web3 Go Wallet SDK supports a wide range of blockchain networks. EVM-compatible chains (e.g., BSC, Polygon, Arbitrum) and Solana-based chains can seamlessly reuse the same code structure for streamlined integration.

Blockchain Generate Address Sign Transaction Sign Message
Aptos βœ… βœ… βœ…
Bitcoin βœ… βœ… βœ…
Cardano βœ… βœ… βœ…
Cosmos βœ… βœ… βœ…
Ethereum βœ… βœ… βœ…
Kaspa βœ… βœ… βœ…
Near βœ… βœ… βœ…
Solana βœ… βœ… βœ…
Starknet βœ… βœ… βœ…
Stacks βœ… βœ… βœ…
Sui βœ… βœ… βœ…
Ton βœ… βœ… βœ…
Tron βœ… βœ… βœ…

Note: Bitcoin support includes BRC20, Atomicals, and Runes-related functions, such as deployment, minting, transfer, and trading.

πŸ› οΈ Architecture

The Go Wallet SDK follows a modular architecture, comprising the following core components:

  1. coins: Implements transaction creation and signing for each blockchain.
  2. crypto: Manages general cryptographic operations and signature algorithms.
  3. util: Provides helper utilities for common operations.

This structure allows for easy integration and extension of new blockchains.

πŸ“¦ Installation

To install the OKX Web3 Go Wallet SDK, ensure you have Go 1.22+ installed, then run:

# Install SDK
go get -u github.com/okx/go-wallet-sdk/coins/bitcoin

βš™οΈ Build and Test

To build and test all blockchain modules, use the build.sh script located in the project root. This script iterates through each chain module under the coins directory, runs go mod tidy to clean dependencies, executes tests, and verifies successful builds.

sh build.sh

The output will display the build status for each chain. If a module fails, the error message will indicate the issue for further debugging.

πŸ’¬ Feedback and Support

The OKX Web3 Go Wallet SDK shares common design principles and usage patterns with the JS SDK. While each blockchain's specific usage can be found in the corresponding coins directory README, users can refer to the JS SDK demo and documentation for additional guidance. If you encounter any issues or have suggestions, please submit them through GitHub Issues, and we will address them promptly.

πŸ”’ Security

If you find security risks, it is recommended to report them through the following channels and get your reward! Submit on HackerOne platform: https://hackerone.com/okg or on our OKX feedback submission page: https://www.okx.com/feedback/submit.

πŸ“œ License

The OKX Web3 Go Wallet SDK is open-source software licensed under the MIT license.

Directories ΒΆ

Path Synopsis
coins
stellar/amount
Package amount provides utilities for converting numbers to/from the format used internally to stellar-core.
Package amount provides utilities for converting numbers to/from the format used internally to stellar-core.
stellar/network
Package network contains functions that deal with stellar network passphrases and IDs.
Package network contains functions that deal with stellar network passphrases and IDs.
stellar/strkey/internal/crc16
Package crc16 is implementation according to CCITT standards.
Package crc16 is implementation according to CCITT standards.
stellar/support/errors
Package errors provides the common infrastructure for managing errors.
Package errors provides the common infrastructure for managing errors.
stellar/txnbuild
Package txnbuild implements transactions and operations on the Stellar network.
Package txnbuild implements transactions and operations on the Stellar network.
stellar/xdr
Package xdr contains the generated code for parsing the xdr structures used for stellar.
Package xdr contains the generated code for parsing the xdr structures used for stellar.
stellar/xdr3
Package xdr implements the data representation portion of the External Data Representation (XDR) standard protocol as specified in RFC 4506 (obsoletes RFC 1832 and RFC 1014).
Package xdr implements the data representation portion of the External Data Representation (XDR) standard protocol as specified in RFC 4506 (obsoletes RFC 1832 and RFC 1014).
aptos module
avax module
bitcoin module
cosmos module
elrond module
eos module
ethereum module
filecoin module
flow module
harmony module
helium module
kaspa module
near module
nervos module
nostrassets module
oasis module
oracle/vrf module
polkadot module
solana module
stacks module
starknet module
sui module
tezos module
ton module
tron module
waves module
zil module
zkspace module
zksync module
crypto module
example module
util module
wallet module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL