Getting started
Overview
dacc-js
dacc-js is a library for implementing Decentralized Account Control (DAcc) on blockchain networks. It enables users and developers to create secure encrypted wallets with Web2 solution integration that can be recovered using only a password, eliminating the need for complex seed phrases or private key management. The library operates in a completely serverless architecture without storing private keys on any servers or centralized systems, utilizing advanced encryption technology to ensure full wallet ownership, exportability, and user privacy.
Why Dacc-js
- User-Centric Design: Dacc-js is built with the user in mind, enabling easy integration with Web2 solutions and simplifying wallet creation and recovery processes.
- Flexibility and Control: Users have complete control over their wallets, with the ability to recover them using just a password, making it a versatile solution for various use cases.
- Enhanced Security: By eliminating the need for seed phrases and central key storage, Dacc-js significantly reduces the attack surface for potential threats.
- Free and Open Source: Completely free to use with an open-source codebase, providing full transparency for developers.
Use Cases
- Decentralized Applications (dApps): Integrate Dacc-js into dApps to provide users with a seamless and secure wallet experience.
- Web3 Onboarding: Simplify the onboarding process for new users entering the Web3 space.
- Password-Based Wallets: Create wallets that can be easily recovered with a password, enhancing user convenience without compromising security.
Features
- Password-based Wallet Encryption & Recovery: Create or recover your wallet using only a password - no need to store private keys directly.
- Self-Ownership Management: Private keys are not stored centrally, they are decentralized, decryptable and private with a password for recovery, ensuring complete self-ownership.
- Serverless by Design: Fully client/server-side operation, no backend, no API, no database costs, use blockchain for data memory and transparency.
- Built-in Transaction Functions: Pre-built comprehensive functions designed to perfectly address all use cases with extreme ease and convenience. Easy transaction handling and simple to use, reduce development time and focus on building your app efficiently.
- Seamless Transaction Interaction: Easy integration with many libraries, supports all EVM types and works seamlessly with ethers, viem and other blockchain development tools with direct account connection.
Installation
install dacc-js as a dependency in project.
To use CLI Commands, you'll need to install it globally
-gis a global package installation.
After installing, you can calldaccfrom your terminal using the available commands
npm i dacc-jsQuick Start
Install
First, we will install dacc-js as a dependency in our project.
npm i dacc-jsBuild
Create a script file or function to create your Dacc wallet.
import { createDaccWallet } from "dacc-js";
const wallet = await createDaccWallet({
passwordSecretkey: 'my+Password#123...',
});
console.log("wallet:", wallet); // {address, daccPublickey}
console.log("wallet address:", wallet?.address); // 0x123address... (recall = address)
console.log("wallet daccPublickey:", wallet?.daccPublickey); // daccPublickey_0x123_XxX... (keep = id)Run
The next step is to run the front-end or script function.
// run to file
bun run index.ts
// Done! You will get a sample result.
wallet: {
address: "0x123address...",
daccPublickey: "daccPublickey_0x123_XxX...",
}
// Recall - address for sending/receiving tokens and assets on blockchain
wallet address: 0x123address...
// Keep - encrypted with password, acts as your ID
// must be kept safe. Do not lose it.
wallet daccPublickey: daccPublickey_0x123_XxX...Donate
Support core development team and help to the project growth.
0x6A74308F267c07556ED170025AE2D1753F747E20