Skip to content

Installation

Let’s create a sample application together:

Terminal window
dart create demo

Now let’s add Polkadart packages. You can install all packages for comprehensive functionality, or just the ones you need:

Terminal window
dart pub add polkadart polkadart_cli polkadart_keyring polkadart_scale_codec secp256k1_ecdsa sr25519 ss58 substrate_bip39 substrate_metadata

After installation, your pubspec.yaml should contain these dependencies:

pubspec.yaml
name: demo
version: 1.0.0
environment:
sdk: ^3.0.0
dependencies:
# Core packages
polkadart: ^0.4.7 # Main SDK for blockchain interaction
polkadart_cli: ^0.4.3 # CLI tool for code generation
polkadart_keyring: ^0.4.4 # Key management and signing
# Encoding and cryptography
polkadart_scale_codec: ^1.2.1 # SCALE codec implementation
substrate_metadata: ^1.2.3 # Metadata parsing
ss58: ^1.1.3 # Address encoding
# Cryptographic primitives (optional)
secp256k1_ecdsa: ^0.4.1 # ECDSA signatures
sr25519: ^0.4.1 # SR25519 signatures
substrate_bip39: ^0.4.1 # Mnemonic phrases