mirror of
https://github.com/hanzoai/numscript.git
synced 2026-10-30 18:26:57 +00:00
* 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)
68 lines
1.7 KiB
JSON
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" }
|
|
}
|
|
}
|
|
}
|