A JavaScript SDK for building workflows on the Ditto Network, enabling a Smart Account experience at any level of your project.
Warning
THESE ARE STILL IN DEVELOPMENT AND CAN BE CHANGED AT ANY TIME.
- Introduction
- Installation
- Getting Started
- Documentation
- Project Structure
- Examples
- Contributing
- Changelog
The Ditto Network SDK is designed to simplify the development of blockchain-based applications by providing a suite of tools for managing smart accounts, interacting with the blockchain, and building complex workflows.
To install the SDK, use the following commands:
npm install @ditto-network/core @ditto-network/web3.js web3
Here’s a quick guide to get you started with the Ditto Network SDK:
import { Provider, SmartWalletFactory, BrowserStorage } from '@ditto-network/core';
import { EthersSigner, EthersContractFactory } from '@ditto-network/ethers';
const provider = new Provider({
signer: new EthersSigner(signer),
storage: new BrowserStorage(),
contractFactory: new EthersContractFactory(signer),
});
const swFactory = new SmartWalletFactory(provider);
const sw = await swFactory.getDefaultOrCreateVault();
const vaultAddress = sw.getAddress();
console.log('Vault address:', vaultAddress);
For more detailed examples, check the examples section.
For comprehensive documentation and details on how to use the Ditto Network, please refer to the main documentation in the @ditto-network/core
package.
examples/
: Contains example projects for Node.js and React.packages/
: Contains the core packages of the SDK, includingcore
,ethers
, andweb3js
.ARCHITECTURE.md
: Detailed information about the architecture of the project.CHANGELOG.md
: A log of changes and updates to the project.CONTRIBUTING.md
: Guidelines for contributing to the project.
We provide a variety of examples to help you get started with different environments:
- Node.js Examples: Located in the
examples/nodejs-example
directory. - React Examples: Located in the
examples/react-example
directory. - Sandbox: Located in the
examples/sandbox
directory.
Contributions are welcome! Please open an issue or submit a pull request. For more details, refer to our contributing guidelines.
For a list of changes and updates, see the CHANGELOG.md file.