Skip to content

Releases: o1-labs/mina-sdk-js

v0.3.0

28 May 19:19
edad785

Choose a tag to compare

What's new

Expanded GraphQL selection sets and TypeScript types so consumers (notably mina-mcp-server) can use typed client.getX() methods without losing fields they used to hand-roll.

Additive only — every new field is optional on the response types; existing callers continue to work unchanged.

getDaemonStatus()

  • numAccounts, highestUnvalidatedBlockLengthReceived, ledgerMerkleRoot, chainId, catchupStatus, blockProductionKeys, coinbaseReceiver, addrsAndPorts

getAccount() / getAccount(_, tokenId)

  • tokenSymbol, votingFor, receiptChainHash, timing (vesting schedule), permissions (per-action auth predicates incl. the new SetVerificationKeyPermission shape with auth + txnVersion), zkappState, provedState, zkappUri, balance.blockHeight

getBestChain() (BlockInfo)

  • epoch, previousStateHash, blockCreator, coinbaseReceiver (mapped from the daemon's misspelled coinbaseReceiever), stakingEpochData.epochLength, date, utcDate, snarkedLedgerHash, stagedLedgerHash, userCommands

getBlock() (Block)

  • coinbaseReceiverConsensus (mapped from consensusState.coinbaseReceiever)

getPooledUserCommands()

  • source, receiver, memo, failureReason

sendPayment() / sendDelegation() (SubmittedCommand)

  • kind, source, receiver, amount, fee, memo

Other

  • Currency#toJSON(): returns the nanomina string. JSON.stringify(account) now works without throwing Do not know how to serialize a BigInt.

v0.2.4

27 May 22:36
b64cee5

Choose a tag to compare

Bug fixes

  • Fix QUERY_ACCOUNT_WITH_TOKEN token-arg type: the daemon expects TokenId, not UInt64. Any call to client.getAccountWithToken() with a non-empty token now succeeds against current Mina daemons. (#5)

Tooling

  • Two-layer GraphQL schema-drift checker (scripts/check-schema-drift.mjs):
    • Layer 1: introspect the live daemon and diff against schema/graphql_schema.json (new checked-in snapshot). Detects added/removed types, field-type changes, argument-type changes (the exact bug above), and inputField-type changes.
    • Layer 2: parses src/queries.ts, sends each operation with sentinel variables, classifies GraphQL errors. Connection errors are bucketed as infrastructure failures (always exit 1); unknown-sentinel-type ops fail in --strict. Mutation-input sentinels include SignatureInput (legitimate null value).
    • Adds npm run check:drift and a CI matrix (master/compatible/develop lightnet images) that triggers on PRs touching schema/ or the script. (#7)

v0.2.3

21 May 18:55
d8a7f9a

Choose a tag to compare

First release published via npm OIDC trusted publishing (no token, with provenance).

Fixed

  • Upgrade the release job to npm@latest (>= 11.5.1) before publishing. Node 20 ships npm 10.x, which signs provenance but cannot perform the OIDC → npm token exchange, so the publish PUT was unauthenticated and the registry returned a 404.

v0.2.3-oidc-debug.1 (diagnostic)

19 May 07:14
4ff2def

Choose a tag to compare

Pre-release

Throwaway release to capture OIDC token claims. Delete after debug.

v0.2.2

18 May 12:58
aee4d5b

Choose a tag to compare

First release published via npm OIDC trusted publishing from GitHub Actions (no token, with provenance attestation).

v0.2.1

18 May 12:27
942479b

Choose a tag to compare

First release published under the new scoped name @o1-labs/mina-sdk.

Changed

  • Package renamed from mina-sdk to @o1-labs/mina-sdk.
  • Repo moved from MinaProtocol to o1-labs GitHub org.
  • First release published via npm OIDC trusted publishing (with provenance attestation).

v0.2.0

14 May 12:21
8dad8d8

Choose a tag to compare

Backwards-compatible additive release.

New methods on MinaClient:

  • getBlock({ stateHash? | height? })
  • getTransactionStatus({ payment? | zkappTransaction? })'PENDING' | 'INCLUDED' | 'UNKNOWN'
  • getGenesisConstants()
  • getTrackedAccounts()

Signed-tx support:

  • sendPayment / sendDelegation accept optional signature?: SignatureInput | null (defaults to null — preserves daemon-side signing). Pair with mina-signer to drive public-daemon (devnet/mainnet) submissions.

New types exported: Block, BlockArgs, BlockTransaction, FeeTransfer, GenesisConstants, TrackedAccount, TransactionStatus, TransactionStatusArgs, SignatureInput.

No removed or renamed exports — existing 0.1.0 callers continue to work.

PRs included: #2 (features) + #3 (version bump).