Bolarity Connect SDK
This documentation provides an overview of the purpose of the Bolarity SDK, details the project’s directory structure, and explains the core modules. It is intended for developers who need to under
Project Purpose
Project Structure
Bolarity-Connect-sdk/
├── src/
│ ├── types/
│ │ └── index.ts # Global type definitions and interfaces (e.g., transfer requests, transaction formats, strategy enums)
│ ├── utils/
│ │ ├── evm.ts # Utility functions specific to EVM chains (e.g., address validation, transaction signing, encoding)
│ │ └── svm.ts # Utility functions for SVM or non-EVM chains (e.g., constructing transactions, data formatting)
│ ├── core/
│ │ ├── transfer/
│ │ │ ├── LocalTransfer.ts # Implements local (same-chain) transfer strategy
│ │ │ ├── RemoteControlTransfer.ts # Implements remote control transfer strategy
│ │ │ ├── BridgeTransfer.ts # Implements bridge transfer strategy using bridge contracts
│ │ │ └── RemoteBridgeTransfer.ts # Implements the composite RemoteBridgeTransfer strategy
│ │ ├── transfer.ts # Aggregates and dispatches the transfer strategies via a unified interface
│ │ ├── bridge.ts # Contains the logic for interacting with cross-chain bridge contracts (asset locking/unlocking)
│ │ └── approve.ts # Contains logic for pre-transfer approval checks and constructing approve transactions
│ └── index.ts # SDK entry point: integrates core modules and exposes the public API
├── tests/ # Automated tests (unit and integration)
├── examples/ # Example scripts and usage scenarios demonstrating the SDK
├── package.json # Project metadata, dependencies, and build scripts
├── tsconfig.json # TypeScript configuration file
└── README.md # Project overview and documentation
Module Explanations
1. Types (src/types/index.ts)
src/types/index.ts)2. Utilities (src/utils/)
src/utils/)3. Core Modules (src/core/)
src/core/)4. SDK Entry Point (src/index.ts)
src/index.ts)Last updated