dSafe SDK

About the Document

This document provides a technical overview of the dSafe SDK. Here we’ve collected an outline of the SDK's goals, functionalities, architecture, and other aspects.

Goal of the SDK

The dSafe SDK aims to offer a decentralized alternative to the Safe Transaction Service. By leveraging ComposeDB for data storage, the primary objective is to enhance security, reliability, and transparency in managing Safe transactions.

Scope of the Project

Functional Requirements

  • Deploy new Safe and store its details in ComposeDB.

  • Create a new transaction message, sign it, and store it in both ComposeDB and Safe Transaction Service.

  • Retrieve all stored transaction messages from ComposeDB.

  • Add confirmation to existing transaction messages.

  • Execute transaction messages that meet the threshold.

  • Decode transaction message data.

  • Manage delegates: fetch, add, and delete.

  • Fetch Safe details and transactions.

  • Support forwarding of requests to Safe Transaction API for API endpoints that are not yet implemented. (Similar to Reverse Proxy but on SDK side)

Non-functional Requirements

  • Efficient performance with quick execution.

  • Secure data handling and input validation.

  • Maintainable code with comprehensive documentation.

  • Cross-framework compatibility (independent of framework like React, Vite etc).

  • Optimized package size for quick installations.

  • Clear error handling and messaging.

API Endpoints to SDK Functions

The SDK will convert the following Safe Transaction Service API endpoints into SDK methods:

Architecture

The SDK will adopt a modular design, ensuring scalability and maintainability. The directory structure will be organized into core functionalities and utilities, with comprehensive testing and documentation.

File Structure

/dSafeSDK

|-- /src

|   |-- /core

|   |   |-- index.ts

|   |   |-- dataDecoder.ts

|   |   |-- delegates.ts

|   |   |-- multisigTransactions.ts

|   |   |-- safes.ts

|   |-- /utils

|   |   |-- helpers…

|-- /tests

|   |-- /unit

|   |-- /integration

|-- package.json

|-- tsconfig.json

|-- README.md

Descriptions

  • /core: This directory contains the main logic for the SDK. Each file corresponds to a set of related functionalities, e.g., dataDecoder.ts contains functions related to data decoding.

  • /utils: This directory contains utility functions that are used across the SDK. For instance, apiHelper.ts might contain functions to make HTTP requests, crypto.ts for cryptographic operations, and validators.ts for input validation.

  • /tests: Contains unit and integration tests. The /unit directory will have tests for individual functions, while /integration will test the interaction between different parts of the SDK.

Schema (Composite)

Risks

Potential risks include:

  • Integration challenges with ComposeDB and Safe Transaction Service.

  • Unidentified bugs emerging in production.

  • Performance bottlenecks.

  • Security vulnerabilities.

Risks Prevention:

  • Maintain open communication channels with all stakeholders.

  • Implement a robust testing strategy, including unit, integration, and stress tests.

  • Use version control best practices.

  • Provide comprehensive documentation.

  • Engage with the developer community for feedback.

  • Monitor the SDK's performance and usage post-deployment.

Conclusion

The dSafe SDK represents a significant step towards decentralizing Safe transactions. Through its integration with ComposeDB and the Safe Transaction Service, it promises to offer developers and stakeholders a robust, secure, and transparent toolset.

Subscribe to Daoism Systems
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.