# Accumulate Python SDK

> Build on the Accumulate blockchain from Python. Package: `accumulate-sdk-opendlt` (v2.3.0).

## Install
```
pip install accumulate-sdk-opendlt
```
Import: `from accumulate_client import Accumulate, TxBody, SmartSigner, QuickStart`

## Canonical usage
Connect, build a transaction body with `TxBody`, then sign + submit + wait with `SmartSigner`. **1 ACME = 1e8 base units.**
```
client = QuickStart.kermit()   # or Accumulate.testnet()/mainnet()/devnet()
# body = TxBody.<operation>(...)
result = SmartSigner(signer).sign_submit_and_wait(principal, body)
```

## Rules
- **Amounts:** 1 ACME = 1e8 base units. Never pass whole ACME as-is; use the `Amount` helper.
- **Testnet first:** target Kermit and fund lite accounts via the faucet before spending.
- **Prerequisites matter:** create an ADI, then buy credits for its key page before it can sign; wait for balances/credits to settle before the next step.
- **Errors are typed:** branch on the SDK error type/code; retry only on network errors, not validation errors.
- **One canonical client:** connect with `Accumulate`, build with `TxBody`, sign with `SmartSigner`. Do not hand-roll envelopes/signing, and ignore any alternate or legacy client classes — this is the only path you need.

## Resources
- Full API digest: `llms-full.txt`
- Repository guide (build/test/lint, for working ON this SDK): `AGENTS.md`
- Runnable end-to-end examples: `examples/v3/`
- 24 operations across 7 categories.

## Operations
- `generate_keys` — Generate Keys (utility)
- `faucet` — Faucet (utility)
- `wait_for_balance` — Wait For Balance (utility)
- `wait_for_credits` — Wait For Credits (utility)
- `add_credits` — Add Credits (credits)
- `create_identity` — Create Identity (identity)
- `create_key_book` — Create Key Book (identity)
- `create_key_page` — Create Key Page (identity)
- `create_token_account` — Create Token Account (account)
- `create_data_account` — Create Data Account (account)
- `create_token` — Create Token (account)
- `send_tokens` — Send Tokens (transaction)
- `issue_tokens` — Issue Tokens (transaction)
- `burn_tokens` — Burn Tokens (transaction)
- `write_data` — Write Data (transaction)
- `query_account` — Query Account (query)
- `update_key_page` — Update Key Page (authority)
- `update_key` — Update Key (authority)
- `create_lite_token_account` — Create Lite Token Account (account)
- `transfer_credits` — Transfer Credits (credits)
- `burn_credits` — Burn Credits (credits)
- `write_data_to` — Write Data To (transaction)
- `lock_account` — Lock Account (authority)
- `update_account_auth` — Update Account Auth (authority)
