docs ⦿ dedot 🧑‍💻
TypinkXTelegramGithub
dedot 🧑‍💻
dedot 🧑‍💻
  • Welcome to Dedot
  • Why Dedot?
  • Getting started
    • Installation
    • Connect to network
    • @polkadot/api -> dedot
    • Packages structure
  • Clients & Providers
    • Providers
    • Clients
  • Client API
    • ChainApi
    • Constants
    • Runtime APIs
    • Storage Queries
    • Transactions
    • Events
    • Errors
  • ink! Smart Contracts
    • Introduction
    • Generate Types & APIs
    • Deploy contracts
    • Queries
    • Transactions
    • Events
    • Handle errors
  • CLI
  • Keyring & Signer
  • Runtime upgrades
  • Type system
  • Utilities
    • HexString
    • Uint8Array (U8a)
    • String
    • Hash functions
    • Address
    • BigInt & number
    • Balances
    • Merkleized Metadata
  • Help & FAQ
    • Tutorials
      • Develop ink! dApp using Typink
    • Built with Dedot
    • Forum Posts
    • Telegram
    • Github
    • API Reference
Powered by GitBook
On this page
  • dedot chaintypes
  • dedot typink

Was this helpful?

Edit on GitHub

CLI

Dedot's Command line interface

PreviousHandle errorsNextKeyring & Signer

Last updated 8 months ago

Was this helpful?

Dedot comes by default with a cli when you install package, you can access the cli typing dedot (or djs) in the terminal. dedot cli helps you generate Types & APIs to any Substrate-based chains or ink! smart contracts that you're working with. This enable Types & APIs suggetions/auto-completion via IntelliSense for any on-chain interactions.

dedot chaintypes

Generate Types & APIs for a Substrated-based blockchain given its metadata. The cli can fetch metadata from a WebSocket endpoint, a wasm runtime file or a raw metadata (.scale) file.

Usage:

npx dedot chaintypes -w wss://rpc.polkadot.io

Options:

  • -w, --wsUrl: Fetch metadata from a WebSocket endpoint

  • -r, --wasm: Fetch metadata from a runtime wasm file (.wasm)

  • -m, --medadata: Fetch metadata from (.scale)

  • -o, --output: Folder to put generated files

  • -c, --chain: Customize the chain name to generate, default to

  • -d, --dts: Generate .d.ts files instead of .ts, default: true

  • -s, --subpath: Using subpath packages (e.g: dedot/types instead of @dedot/types), default: true

dedot typink

Generate Types & APIs for an smart contract given its metadata.

Usage:

npx dedot typink -m ./path/to/metadata.json # or metadata.contract

Options:

  • -m, --medadata: Path to contract metadata file (.json, .contract)

  • -o, --output: Folder to put generated files

  • -c, --contract: Custom contract name, default is contract name from metadata

  • -d, --dts: Generate .d.ts files instead of .ts, default: true

  • -s, --subpath: Using subpath packages (e.g: dedot/types instead of @dedot/types), default: true

dedot
a raw metadata file
runtimeVersion.specName
ink!