okx/js-wallet-sdk
소개
Bitcoin, Ethereum, Solana, Cosmos 등 여러 블록체인을 지원하는 TypeScript 서명 SDK입니다.
개발 도구What you can do
- Multi-chain support
- Offline transaction signing
- Account generation and management
- Customizable transaction creation
측정된 스타 증가
- in 24h
- 0
- in 7 days
- -2
- in 15 days
- -2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalOKX Web3 JS Wallet SDK
OKX Web3 Wallet SDK is a comprehensive TypeScript/JavaScript solution for building wallet applications that support offline transactions across multiple blockchain networks. This SDK provides a unified interface for account management, transaction creation, and signing for various mainstream public blockchains.
Features
- Multi-chain support
- Offline transaction signing
- Account generation and management
- Customizable transaction creation
- BRC20/Atomical/Runes.. support for Bitcoin
- Extensible architecture
Documentation
For detailed documentation and API references, please visit our online documentation.
Online Demo
Try our online signing demo to see the SDK in action.
Supported Chains
| Package | Generate Address | Sign Transaction | Sign Message | Version |
|---|---|---|---|---|
| @okxweb3/coin-bitcoin | ✅ | ✅ | ✅ | |
| @okxweb3/coin-ethereum | ✅ | ✅ | ✅ | |
| @okxweb3/coin-aptos | ✅ | ✅ | ✅ | |
| @okxweb3/coin-cosmos | ✅ | ✅ | ✅ | |
| @okxweb3/coin-eos | ✅ | ✅ | ✅ | |
| @okxweb3/coin-stacks | ✅ | ✅ | ✅ | |
| @okxweb3/coin-starknet | ✅ | ✅ | ✅ | |
| @okxweb3/coin-sui | ✅ | ✅ | ✅ | |
| @okxweb3/coin-near | ✅ | ✅ | ✅ | |
| @okxweb3/coin-tron | ✅ | ✅ | ✅ | |
| @okxweb3/coin-ton | ✅ | ✅ | ✅ | |
| @okxweb3/coin-cardano | ✅ | ✅ | ✅ | |
| @okxweb3/coin-solana | ✅ | ✅ | ✅ | |
| @okxweb3/coin-kaspa | ✅ | ✅ | ✅ |
*Note: Bitcoin support includes core functions for BRC20 ,Atomicals and Runes protocols, such as deployment, minting, transfer, and trading. This covers inscription creation, buying, selling, and other advanced operations across these Bitcoin-based token standards.
Architecture
The OKX Web3 Wallet SDK is composed of three main modules:
- crypto-lib: Handles general security and signature algorithms.
- coin-base: Provides a common interface for all supported coins.
- coin-specific packages: Implement transaction creation and signing for each supported blockchain.
Installation
To use the OKX Web3 Wallet SDK, install the core packages and the specific coin packages you need:
# Core packages (required for all coins)
npm install @okxweb3/crypto-lib
npm install @okxweb3/coin-base
# coin-specific packages (install as needed)
npm install @okxweb3/coin-ethereum
npm install @okxweb3/coin-bitcoin
# ... other coin packages
Build Locally
To build the SDK locally and run tests:
git clone https://github.com/okx/js-wallet-sdk.git
cd js-wallet-sdk
sh build.sh
Usage
Here's a basic example of how to use the SDK with Ethereum:
const { EthWallet } = require('@okxweb3/coin-ethereum');
const privateKey = "your_private_key_here";
async function run() {
const wallet = new EthWallet();
let params = {
privateKey: privateKey
};
let address = await wallet.getNewAddress(params);
console.log('Ethereum address:', address);
let ethTxParams = {
to: "0xee7c7f76795cd0cab3885fee6f2c50def89f48a3",
value: 1,
nonce: 5,
gasPrice: "100000000000",
gasLimit: 21000,
chainId: 42,
};
let signParams = {
privateKey: privateKey,
data: ethTxParams
};
let tx = await wallet.signTransaction(signParams);
console.log('Signed transaction:', tx);
}
run();
For more detailed examples and usage instructions for each supported blockchain, please refer to the documentation in the respective coin-specific package.
Feedback and Support
We encourage everyone to use our online demo and documentation. If you encounter any issues or have suggestions, please submit them through GitHub Issues.
Security
If you find security risks, it is recommended to feedback through the following channels and get your reward! submit on HackerOne platform https://hackerone.com/okg Or on our OKX feedback submission page > security bugs https://www.okx.com/feedback/submit
License
The OKX Web3 Wallet SDK is open-sourced software licensed under the MIT license.
관련 프로젝트 살펴보기
불러오는 중…