mina-graphql-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

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 { ... }`);

Package Sidebar

Install

npm i mina-graphql-sdk

Weekly Downloads

1

Version

0.1.4

License

ISC

Unpacked Size

848 kB

Total Files

32

Last publish

Collaborators

  • martinminkov