CLI tool to fetch canister's public candid metadata and generate JS/TS bindings.
npm install -g didg
didg <canister_id> <output_dir>
didg ryjl3-tyaaa-aaaaa-aaaba-cai declarations/ledger
Output structure:
declarations
└── ledger
├── index.js
├── ledger.did
├── ledger.did.d.ts
└── ledger.did.js