zeekayandClaude Opus 5 2c2f0e6bf3 Go 1.27.1, and the code it can say more simply
Modules declare go 1.27.1 and the build images follow. go fix applied the
modernizers, and the interpreter's parseArg, evaluateExprAs and
evaluateOptExprAs are now generic methods on the parser and program state
they take. omitzero is not applied, since it changes what the JSON says.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-16 19:52:45 -07:00
2026-03-04 13:32:35 +00:00
2026-03-04 13:32:35 +00:00
2026-03-04 13:32:35 +00:00
2026-03-04 13:32:35 +00:00
2026-03-04 13:32:35 +00:00
2026-03-04 13:32:35 +00:00
2026-03-04 13:32:35 +00:00
2026-03-02 10:00:00 -08:00
2026-03-04 13:32:35 +00:00

Numscript

Domain-specific language for modeling financial transactions. Used by Hanzo Ledger for programmable money movement.

Features

  • Declarative Transactions — Express complex multi-party transfers in readable syntax
  • Percentage Splits — Route funds to multiple destinations by percentage or fixed amount
  • Source Ordering — Define fallback funding sources with automatic overdraft prevention
  • Variables — Parameterize scripts for reuse across different amounts and accounts
  • Type Safety — Compile-time validation of account references and asset types

Examples

// Simple transfer
send [USD/2 5000] (
  source = @users:alice
  destination = @users:bob
)

// Multi-source with fee split
send [USD/2 10000] (
  source = {
    @users:alice
    @users:alice:savings
  }
  destination = {
    85% to @merchants:shop
    10% to @platform:fees
    5%  to @platform:reserve
  }
)

// Parameterized script
vars {
  monetary $amount
  account $sender
  account $receiver
}
send $amount (
  source = $sender
  destination = $receiver
)

Usage

# Install CLI
go install github.com/hanzoai/numscript/cmd/numscript@latest

# Parse and validate a script
numscript check script.num

# Format a script
numscript fmt script.num

Go Library

import "github.com/hanzoai/numscript"

program, err := numscript.Parse(`
  send [USD/2 1000] (
    source = @world
    destination = @users:001
  )
`)

License

MIT — see LICENSE

S
Description
Hanzo fork of formancehq/numscript — Numscript DSL interpreter (module github.com/hanzoai/numscript)
Readme MIT
1.5 MiB
Languages
Go 98.7%
ANTLR 0.6%
Nix 0.3%
Shell 0.3%
Just 0.1%