Skip to content

Commit 3ae35bb

Browse files
committed
convert mina-signer to package
1 parent 136699a commit 3ae35bb

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ src/libp2p_ipc/libp2p_ipc_capnp.ml
2020
src/libp2p_ipc/libp2p_ipc_capnp.mli
2121
maintenance/*.dot
2222

23+
**/node_modules
24+
2325
scripts/mina-local-network/genesis_ledger.json
2426
scripts/mina-local-network/annotated_ledger.json
2527

scripts/tests/mina-signer/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Command-line helper for drafting, signing, and broadcasting Mina payments via th
55
## Getting Started
66
- **Prerequisites:** Node.js 18+ (for native `fetch`) and npm.
77
- **Install dependencies:** `npm install`
8-
- **Quick run:** `node test-signer.js <private_key> <recipient_address> [graphql_url] [nonce]`
8+
- **Quick run:** `node mina-test-signer.js <private_key> <recipient_address> [graphql_url] [nonce]`
99

1010
The optional `graphql_url` flag lets you override the default target defined in `config.js`.
1111

1212
## Workflow
13-
1. `test-signer.js` parses CLI arguments and wires the supporting services.
13+
1. `mina-test-signer.js` parses CLI arguments and wires the supporting services.
1414
2. `payment-service.js` derives the sender public key, composes a payment payload, and signs it with `mina-signer`.
1515
3. `graphql-client.js` sends the signed payload to the Mina daemon and can check whether the transaction reached the pool.
1616
4. `utils.js` provides small helpers for GraphQL string construction and CLI validation.
@@ -22,7 +22,7 @@ The CLI prints emoji-enhanced step logs and a summary table so you can spot succ
2222
GraphQL errors (including malformed responses) cause the CLI to exit with a non-zero status so they can be surfaced in scripts and CI.
2323

2424
## File Guide
25-
- `test-signer.js` – CLI entry point orchestrating validation, signing, submission, and pool verification.
25+
- `mina-test-signer.js` – CLI entry point orchestrating validation, signing, submission, and pool verification.
2626
- `payment-service.js` – Thin wrapper around `mina-signer` with sensible defaults for MINA amounts and fees.
2727
- `graphql-client.js` – Minimal fetch-based GraphQL transport for sending payments and querying pooled commands.
2828
- `utils.js` – GraphQL stringification helpers plus basic CLI argument validation/parsing.

scripts/tests/mina-signer/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
"type": "module",
44
"version": "1.0.0",
55
"main": "test-signer.js",
6+
"bin": {
7+
"mina-test-signer": "mina-test-signer.js"
8+
},
69
"scripts": {
7-
"start": "node test-signer.js",
10+
"start": "node mina-test-signer.js",
811
"test": "echo \"Error: no test specified\" && exit 1"
912
},
10-
"author": "",
13+
"author": "o1-labs",
1114
"license": "ISC",
12-
"description": "",
15+
"description": "test app for mina-test-signer",
1316
"dependencies": {
1417
"mina-signer": "^1.0.0"
1518
}

0 commit comments

Comments
 (0)