Skip to content

feat(sdk): integrate BioForest Chain SDK for transaction creation - #90

Merged
Gaubee merged 1 commit into
mainfrom
feat/sdk-migration
Dec 23, 2025
Merged

Gaubee merged 1 commit into
mainfrom
feat/sdk-migration

Conversation

@Gaubee

@Gaubee Gaubee commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

Summary

Integrates the official BioForest Chain SDK for proper transaction creation and signing, replacing the placeholder implementation.

Changes

New src/services/bioforest-sdk/ service:

  • index.ts - SDK wrapper with transaction creation, broadcasting, and pay password verification
  • types.d.ts - Complete TypeScript definitions for BFChainCore namespace
  • bioforest-chain-bundle.js - Pre-built SDK bundle from legacy-apps
  • genesis-block.json - BFMeta production genesis configuration

Updated hooks:

  • use-send.bioforest.ts - Uses SDK for transaction creation/signing
  • use-send.ts - Handles new password_required status

Key Features

  • Transaction Creation: Uses official SDK createTransferTransactionJSON method
  • Pay Password Support: Verification with V1/V2 algorithm support
  • Crypto Operations: Uses @bfmeta/sign-util for sha256/md5/ripemd160
  • Address Info: Checks secondPublicKey requirement before transfer

Testing

  • TypeScript passes
  • All 117 tests pass
  • Manual testing with real BioForest chain (pending)

Related

Closes #88

- Add bioforest-sdk service with SDK bundle and TypeScript types
- Create transaction creation and broadcasting using official SDK
- Add pay password verification with V1/V2 algorithm support
- Update use-send.bioforest.ts to use SDK for transactions
- Add password_required status for pay password flow
- Include genesis block configuration for BFMeta network

The SDK uses a pre-built bundle from legacy-apps for transaction
creation and signing. Crypto operations use @bfmeta/sign-util.
@Gaubee
Gaubee merged commit 93d46e4 into main Dec 23, 2025
5 checks passed
@Gaubee
Gaubee deleted the feat/sdk-migration branch January 4, 2026 07:22
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.

集成 BioForest 交易 SDK 以支持完整转账流程

1 participant