Integrate with Mina
The interfaces an application, exchange, wallet, explorer, or indexer uses to read Mina data and send transactions.
Mina gives you three APIs and a set of client libraries. Each API reads from a different source, so choose by the data you need, not by the language you write in.
Choose an interface
| You need | Use | Reads from |
|---|---|---|
| Current account state, the recent chain, sending transactions | Daemon GraphQL API | A Mina node. It keeps only the last k blocks (290) |
| Blocks and transactions over the full history, zkApp events and actions | Archive Node API | An archive node's Postgres database |
| Deposits, withdrawals and balances for an exchange or custodian | Rosetta API | A Mina node and an archive database |
| Keys and transaction signatures, offline or in a browser | Mina Signer | Nothing: it signs locally and needs no node |
| zkApp state, events and actions from a smart contract | o1js | A Mina node and an Archive Node API endpoint |
Client libraries
| Library | Talks to | Languages |
|---|---|---|
| Archive SDK | Archive Node API | TypeScript (@o1-labs/mina-archive-sdk), Rust (mina-archive-sdk), Go (github.com/o1-labs/mina-archive-sdk-go/v2) |
| Mina SDK | Daemon GraphQL API | Rust (mina-sdk), Go, Python (mina-sdk) |
| Mina Signer | No API: signs locally | JavaScript and TypeScript (mina-signer) |
| o1js | Daemon GraphQL API and Archive Node API | TypeScript (o1js) |
The Archive SDKs share one major version with the Archive Node API: a 2.x SDK works with any 2.x server. The Mina SDKs are at version 0.x, so a minor release can change their API.
Integration guides
- Exchange Operators: run the nodes, the archive and Rosetta that an exchange needs, and handle deposits and withdrawals.
- Archive Node API: run the API over an archive database, query it, and operate it in production.
- Archive Node: run an archive node that stores the full chain history in Postgres.
- Rosetta API: run Mina's Rosetta implementation.
- Daemon GraphQL API: query a node and send transactions to it.
- Fetch events and actions: read a zkApp's events and actions with o1js.