Skip to content

Conversation

@Gaubee
Copy link
Contributor

@Gaubee Gaubee commented Dec 27, 2025

变更内容

EVM Adapter (Ethereum, BSC)

  • IdentityService: 地址验证、checksum 转换
  • AssetService: 余额查询 (via walletapi)
  • TransactionService: 交易构建框架 (签名/广播待实现)
  • ChainService: 链信息、区块高度、Gas 价格

BIP39 Adapter (Bitcoin, Tron)

  • 类似 EVM 的服务结构
  • 链特定的手续费估算和确认数
  • Bitcoin: Native SegWit 地址, 6 确认
  • Tron: TRX 地址, 19 确认

use-send.ts 更新

  • 更明确的错误消息显示链类型名称
  • 为后续 EVM/BIP39 转账实现做好准备

已注册的适配器

registry.register('bioforest', createBioforestAdapter)
registry.register('evm', createEvmAdapter)
registry.register('bip39', createBip39Adapter)

后续工作

  • EVM 交易签名和广播 (需要私钥签名实现)
  • BIP39 交易签名和广播
  • 完整的端到端转账测试

- Add EVM adapter for Ethereum/BSC chains
  - IdentityService, AssetService, TransactionService, ChainService
  - Balance queries via walletapi
  - Transaction signing placeholder (not yet implemented)

- Add BIP39 adapter for Bitcoin/Tron chains
  - Similar structure to EVM adapter
  - Chain-specific fee estimates and confirmations

- Update use-send.ts error messages
  - Show chain type name for unsupported chains
  - Prepare for future EVM/BIP39 transfer implementation

- Register all adapters in setupAdapters()
- Add new chapter: 08-测试篇/06-测试网络
- Document public testnets: Sepolia, BSC Testnet, Nile, Signet
- Include RPC endpoints, faucets, and explorer links
- Add testnet-chains.json config file
- Update white-book index
… RPC

- Use standard Ethereum JSON-RPC instead of custom REST API
- Implement proper secp256k1 signature parsing with recovery bit
- Add PublicNode as unified RPC provider for all chains (ETH/BSC/Tron/BTC)
- Update testnet documentation with PublicNode endpoints
- Add dedicated Tron chain type and adapter
- Implement TronIdentityService with address derivation and signing
- Implement TronAssetService for TRX balance queries
- Implement TronChainService for block info and health checks
- Implement TronTransactionService for transaction building/signing/broadcasting
- Update ChainConfigTypeSchema to include 'tron' type
- Update schema.test.ts for new chain type distribution
@Gaubee Gaubee force-pushed the feat/web3-adapters branch from 4485109 to 20f814d Compare December 27, 2025 13:49
- Add BitcoinIdentityService with BIP84 address derivation (P2WPKH)
- Add BitcoinAssetService for balance and UTXO queries
- Add BitcoinChainService for block info and fee estimates
- Add BitcoinTransactionService for transaction building
- Implement custom bech32 encoding/decoding
- Note: Full transaction signing requires specialized library
- Replace custom bech32/base58 implementation with @scure/base
- Add viem for future EVM improvements
- Simplify Bitcoin address validation using standard library
- Add use-send.web3.ts with transfer/fee/validation functions
- Update use-send.ts to route EVM/Tron/Bitcoin transfers through adapters
- Support address validation using chain adapter identity service
- Support fee estimation using chain adapter transaction service
- Add white-book documentation explaining API choices (mempool.space vs PublicNode for Bitcoin)
- Add unit tests for EVM, Bitcoin, and Tron adapters
- Update testnet documentation with Bitcoin API comparison table
@Gaubee Gaubee merged commit 8ff8717 into main Dec 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants