# API: hyper-p2p-credit-ledger **Protocol:** `credit-ledger/v1` · **Export:** `HyperP2PCreditLedger` ## Methods ### `openAccount(accountId, initial?) → account` ### `credit(accountId, amount, reason?)` / `debit(accountId, amount, reason?)` ### `transfer(fromId, toId, amount) → { from, to, amount, at }` ### `balance(accountId) → number | null` ### `listAccounts() → string[]` / `hasAccount(accountId) → boolean` ### `totalSupply() → number` Sum of all account balances. ### `getStats() → { credits, debits, accounts, gossipIn, gossipOut, protocol }` ### `async ready()` / `async close()` ## Wire | type | behavior | |------|----------| | `ledger-entry` | Open or update remote balance |