Command
CLI for Quickly create a Dacc wallet
Dacc-js CLI provides a simple command-line interface for quickly creating and managing private Dacc wallets.
Installation
npm
npm i -g dacc-jsCommands
dacc create
Creates a new Dacc wallet with password encryption.
Usage
dacc create [options]Options
| Option | Description |
|---|---|
-p, --password <string> | Password for wallet encryption (prompted if not provided) |
-s, --save <path> | Save wallet to file (optional) |
Examples
Interactive creation (password prompt):dacc createdacc create --password your-secure-passworddacc create --password your-secure-password --save ./dacc-wallet.jsondacc create -p your-secure-password -s ./dacc-wallet.jsonOutput
✅ Wallet created successfully!
Address: 0x1234...5678
DaccPublicKey: daccPublickey_ABC123...
💾 Saved to: /path/to/dacc-wallet.jsonThe wallet file contains:
{
"address": "0x1234...5678",
"daccPublickey": "daccPublickey_ABC123..."
}dacc allow
Decrypts and recovers a Dacc wallet using the daccPublicKey.
Usage
dacc allow [daccPublickey] [options]Options
| Option | Description |
|---|---|
-f, --file <path> | Path to wallet file (JSON, .txt, .md, etc.) |
-p, --password <string> | Password to decrypt wallet (prompted if not provided) |
Examples
Decrypt with daccPublicKey directly:dacc allow daccPublickey_0x123_XxXdacc allow daccPublickey_0x123_XxX --password your-secure-passworddacc allow --file ./dacc-wallet.jsondacc allow --file ./dacc-wallet.json --password your-secure-passworddacc allow daccPublickey_0x123_XxX -p your-secure-passwordOutput
✅ Wallet decrypted successfully!
Address: 0x1234...5678
Private Key: 0xabcd...ef01Notes
- If no
daccPublickeyis provided, the CLI will attempt to read it from the file specified with--file - The CLI can parse daccPublicKey from various file formats (JSON, plain text, markdown)
- Password prompts will appear interactively if not provided via the
-pflag