How blocto/blocto-android-sdk works
Main Components
• Core Module: Represented by the “core” folder. It contains common components, utility classes, models (e.g., Account, Blockchain, CallbackActivity), and shared logic that underpins the SDK.
• Specialized Blockchain Modules:
– EVM Module (“evm” folder): Contains implementations specific to Ethereum-like blockchains. It includes methods for sending transactions and signing messages.
– Flow Module (“flow” folder): Contains Flow-specific logic with corresponding methods (e.g., AuthenticateMethod) and ViewModels.
– Solana Module (“solana” folder): Contains Solana-specific features, including methods for signing and sending transactions and their associated models.
• Wallet Module (“wallet” folder): Focused on wallet functionalities, including handling callbacks, request URIs, and integrating wallet-specific sign types.
• Demo / App Module (“app” folder): An example dApp which demonstrates how to integrate and use BloctoSDK. It includes various activities (for each blockchain supported) and UI layouts.
Relationships and Interactions
• The Demo App acts as the client, providing user interfaces and invoking SDK functions.
Architectural Patterns and Design Principles
• Modular Design: Emphasize the loose coupling between the modules by indicating clear boundaries and the separation of concerns.
• Layered Architecture: Show how the presentation layer (e.g., Activities and Fragments in the app module) communicates with the SDK’s business logic (in core and specific blockchain modules), and further into utility/model layers.
• Encapsulation and Extensibility: The modules are designed to allow future extensions (e.g., support for more blockchains), so add notes to signify that each module encapsulates its blockchain-specific methods and models.
Relevant Technologies and Frameworks
• Android SDK / Gradle: Each module is an independent Gradle project (as seen by build.gradle files) tailored for Android development.
• Proguard Rules: Each module includes its own Proguard configuration, indicating attention to code obfuscation and security details.
• GitHub Actions & CI/CD: The presence of GitHub workflows indicates an integrated continuous integration process.
• The project also leverages common Kotlin/Java programming constructs, evident from the source file structures.
Instructing the Principal Software Engineer
• Core module centrally or at a lower layer to show that it is a common foundation for the specialized modules.
• Incorporate notes to highlight how configuration (via Gradle settings, Proguard rules) plays a part in the build and deployment pipeline.