Files
numscript/inputs.schema.json
Alessandro ScandoneandGitHub f8f9275974 feat: cli, change run args (#84)
* feat: change cli command args

* feat: better docs and improve err handling

* fix: fix error handling

* feat: added schema for inputs file

* feat: improve error output

* feat: more reliable exit from cli (no explicit exit() call)
2025-07-24 14:59:48 +02:00

68 lines
1.7 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Specs",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": { "type": "string" },
"balances": {
"$ref": "#/definitions/Balances"
},
"variables": {
"$ref": "#/definitions/VariablesMap"
},
"metadata": {
"$ref": "#/definitions/AccountsMetadata"
},
"featureFlags": {
"type": "array",
"items": { "type": "string" }
}
},
"definitions": {
"Balances": {
"type": "object",
"description": "Map of account names to asset balances",
"additionalProperties": false,
"patternProperties": {
"^([a-zA-Z0-9_-]+(:[a-zA-Z0-9_-]+)*)$": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^([A-Z]+(/[0-9]+)?)$": {
"type": "number"
}
}
}
}
},
"VariablesMap": {
"type": "object",
"description": "Map of variable name to variable stringified value",
"additionalProperties": false,
"patternProperties": {
"^[a-z_]+$": { "type": "string" }
}
},
"AccountsMetadata": {
"type": "object",
"description": "Map of an account metadata to the account's metadata",
"additionalProperties": false,
"patternProperties": {
"^([a-zA-Z0-9_-]+(:[a-zA-Z0-9_-]+)*)$": {
"type": "object",
"additionalProperties": { "type": "string" }
}
}
},
"TxMetadata": {
"type": "object",
"description": "Map from a metadata's key to the transaction's metadata stringied value",
"additionalProperties": { "type": "string" }
}
}
}