Skip to content

MartinMinkov/mina-graphql-sdk

Repository files navigation

Mina GraphQL SDK

Mina GraphQL SDK simplifies interactions with Mina's GraphQL daemon interface by providing a typesafe TypeScript layer. It leverages code generation for improved developer experience and offers a direct GraphQL query option for advanced flexibility.

Features

  • Typesafe Queries and Mutations: Automatically generated types and wrapper functions based on your GraphQL schema, enabling robust type checking and auto-completion.
  • Custom GraphQL Escape Hatch: Execute raw GraphQL queries directly to handle complex scenarios outside the generated code.
  • Accounts, Blocks, and Transactions: Easily query account details, fetch blocks by height or hash, and explore various transaction types (sent, received, zkApp).
  • Seamless Integration: Designed to easily integrate into your existing TypeScript projects.

Basic Usage

// Accounts
const account = await client.account.getAccount("...public key...");

// Blocks
const recentBlock = await client.blocks.getBlockByHeight(100);

// Transactions
const recentPayments = await client.transactions.getRecentSentPayments(
  "...public key..."
);

const data = await client.query.raw(`query { ... }`);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published