# mina-signer

> Node API for signing transactions on various networks for Mina Protocol

Latest version **4.1.0** (published 2026-07-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install mina-signer
pnpm add mina-signer
yarn add mina-signer
bun add mina-signer
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2026-07-13 |
| First published | 2021-11-22 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 605 |
| Author | o1labs |
| Maintainers | o1-labs |
| Keywords | mina, coda, cryptocurrency |

## Links

- npm: https://www.npmjs.com/package/mina-signer
- Repository: https://github.com/o1-labs/o1js
- Homepage: https://minaprotocol.com/
- Issues: https://github.com/o1-labs/o1js/issues
- npm.io page: https://npm.io/package/mina-signer

## Dependencies (2)

- [blakejs](https://npm.io/package/blakejs.md) ^1.2.1
- [@noble/hashes](https://npm.io/package/@noble/hashes.md) ^1.7.1

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 4.1.0 (latest) — 2026-07-13
- 4.1.1-txnv5.0 (txnv5) — 2026-07-21
- 4.0.0 — 2026-04-20
- 3.1.0 — 2025-09-10
- 3.0.7 — 2024-05-06
- 3.0.6 — 2024-04-23
- 3.0.5 — 2024-03-12
- 3.0.4 — 2024-02-21
- 3.0.3 — 2024-02-19
- 3.0.2 — 2024-02-17
- 3.0.1 — 2024-02-16
- 3.0.0 — 2024-02-06
- 2.1.2 — 2024-01-29
- 2.1.1 — 2023-09-14
- 2.1.0 — 2023-07-05
- … 12 more at https://npm.io/package/mina-signer/versions

## README

# Mina Signer

This is a NodeJS SDK that allows you to sign strings, payments, and delegations
using Mina's key pairs for various specified networks.

# Install

```bash
yarn add mina-signer
# or with npm:
npm install --save mina-signer
```

# Usage

```js
import Client from 'mina-signer';
const client = new Client({ network: 'mainnet' });

// Generate keys
let keypair = client.genKeys();
```

## Transaction era (Mesa vs berkeley)

By default the client signs zkApp commands in the current **Mesa** transaction
format. To sign for the older **berkeley** format (o1js v2.9.0), pass `era`:

```js
const client = new Client({ network: 'devnet', era: 'berkeley' });
```

`era` is orthogonal to `network` (any era is valid with any network) and only
affects zkApp commands — payment, delegation, string, and field signing are
identical across eras. When `era: 'berkeley'`, zkApp `appState` arrays must have
length 8 (Mesa uses 32); a mismatch throws rather than silently producing an
invalid signature.

```js
let keypair = client.genKeys();

// Sign and verify message
let signed = client.signMessage('hello', keypair.privateKey);
if (client.verifyMessage(signed)) {
  console.log('Message was verified successfully');
}

// Sign and verify a payment
let signedPayment = client.signPayment(
  {
    to: keypair.publicKey,
    from: keypair.publicKey,
    amount: 1,
    fee: 1,
    nonce: 0,
  },
  keypair.privateKey
);
if (client.verifyPayment(signedPayment)) {
  console.log('Payment was verified successfully');
}

// Sign and verify a stake delegation
const signedDelegation = client.signStakeDelegation(
  {
    to: keypair.publicKey,
    from: keypair.publicKey,
    fee: '1',
    nonce: '0',
  },
  keypair.privateKey
);
if (client.verifyStakeDelegation(signedDelegation)) {
  console.log('Delegation was verified successfully');
}
```

---
_Source: https://npm.io/package/mina-signer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
