zero_transaction_format
Retrieve standardized transaction formats and cryptographic primitives for implementing Zero Network payment systems, enabling developers to structure crypto-based transactions correctly.
Instructions
Get the Zero transaction wire format (136 bytes), account state format (48 bytes), and cryptographic primitives.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- zero_mcp/server.py:573-576 (handler)The handler function for the `zero_transaction_format` tool, which returns the `TRANSACTION_FORMAT` string.
@mcp.tool() def zero_transaction_format() -> str: """Get the Zero transaction wire format (136 bytes), account state format (48 bytes), and cryptographic primitives.""" return TRANSACTION_FORMAT - zero_mcp/server.py:60-93 (schema)The definition of the Zero transaction format, account state, and cryptographic primitives, which is returned by the tool.
TRANSACTION_FORMAT = """# Zero Transaction Format (136 bytes) ``` ZeroTransfer { from: [32 bytes] // Ed25519 public key (sender) to: [32 bytes] // Ed25519 public key (recipient) amount: [4 bytes] // u32, in units (1 unit = 0.01 Z = $0.0001) nonce: [4 bytes] // u32, per-account monotonic counter signature: [64 bytes] // Ed25519 full signature } // Total: 136 bytes ``` ## Amount Encoding - Amount is in units, not Z. 1 Z = 100 units. - To send 0.50 Z, set amount = 50 - To send 1.00 Z, set amount = 100 - Max amount: 2500 units (25 Z = $0.25) ## Account State (48 bytes per account) ``` Account { balance: [4 bytes] // u32, current balance in units nonce: [4 bytes] // u32, last transaction nonce head: [32 bytes] // BLAKE3 hash of latest block flags: [8 bytes] // reserved (frozen, validator, etc.) } ``` ## Cryptographic Primitives - Signatures: Ed25519 (ed25519-dalek with verify_strict) - Hashing: BLAKE3 (256-bit, hardware-accelerated) - Wire signature: Full 64-byte Ed25519 signature """