Skip to content

Commit 142811b

Browse files
committed
Document bindings transaction-layout build script
1 parent a47e031 commit 142811b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/bindings/scripts/build-transaction-layout.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
#!/usr/bin/env bash
22
set -Eeuo pipefail
33

4+
# Description:
5+
# Regenerates the TypeScript binding constants and Mina transaction layout
6+
# definitions used by o1js. This script:
7+
# - Removes previously compiled files:
8+
# - `_build/default/src/bindings/crypto/constants.ts`
9+
# - `_build/default/src/bindings/mina-transaction/gen/`
10+
# - Rebuilds the constants and transaction layout TypeScript definitions
11+
# from the OCaml/Dune sources:
12+
# - `src/bindings/mina-transaction/gen/v1/js-layout.ts`
13+
# - `src/bindings/mina-transaction/gen/v2/js-layout.ts`
14+
# - `src/bindings/crypto/constants.ts`
15+
# - Formats all generated TypeScript files using `prettier` for consistency.
16+
#
17+
# Note:
18+
# - This script ensures TypeScript bindings reflect the latest Mina protocol constants
19+
# and transaction layout definitions used internally by o1js.
20+
#
21+
# Usage:
22+
# npm run build:bindings-transaction-layout
23+
24+
425
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
526
ROOT_DIR="$(cd "$SCRIPT_DIR/../../.." && pwd)"
627
CRYPTO_CONSTANTS="$ROOT_DIR/_build/default/src/bindings/crypto/constants.ts"

0 commit comments

Comments
 (0)