Skip to content

dittonetwork/sdk-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ditto Network JS SDK

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.

Table of Contents

Introduction

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.

Installation

To install the SDK, use the following commands:

npm install @ditto-network/core @ditto-network/web3.js web3

Getting Started

Here’s a quick guide to get you started with the Ditto Network SDK:

Initialize 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.

Documentation

For comprehensive documentation and details on how to use the Ditto Network, please refer to the main documentation in the @ditto-network/core package.

Navigation

  • examples/: Contains example projects for Node.js and React.
  • packages/: Contains the core packages of the SDK, including core, ethers, and web3js.
  • 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.

Examples

We provide a variety of examples to help you get started with different environments:

Contributing

Contributions are welcome! Please open an issue or submit a pull request. For more details, refer to our contributing guidelines.

Changelog

For a list of changes and updates, see the CHANGELOG.md file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages