{
    "type": "object",
    "properties": {
        "data": {
            "type": "array",
            "items": {
                "anyOf": [
                    {
                        "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IDataParams.json#/definitions/IDataEntry"
                    },
                    {
                        "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IDataParams.json#/definitions/ITypelessDataEntry"
                    }
                ]
            }
        },
        "fee": {
            "description": "Transaction fee. If not set, fee will be calculated automatically",
            "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IDataParams.json#/definitions/LONG"
        },
        "additionalFee": {
            "description": "If fee is not set, this value will be added to automatically calculated fee. E.x.:\nAccount is scripted and 400000 fee more is required.",
            "type": "number"
        },
        "senderPublicKey": {
            "description": "If not set, public key will be derived from seed phrase. You should provide senderPublicKey in two cases:\n1. Account, from which this tx should be sent, differs from tx signer. E.g., we have smart account that requires 2 signatures.\n2. You to create tx without proof. Therefore no seed is provided.",
            "type": "string"
        },
        "timestamp": {
            "description": "Transaction timestamp. If not set current timestamp will be used. Date.now()",
            "type": "number"
        }
    },
    "required": [
        "data"
    ],
    "definitions": {
        "IDataEntry": {
            "type": "object",
            "properties": {
                "key": {
                    "type": "string"
                },
                "type": {
                    "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IDataParams.json#/definitions/DATA_FIELD_TYPE"
                },
                "value": {
                    "type": [
                        "string",
                        "number",
                        "boolean"
                    ]
                }
            },
            "required": [
                "key",
                "type",
                "value"
            ]
        },
        "DATA_FIELD_TYPE": {
            "enum": [
                "binary",
                "boolean",
                "integer",
                "string"
            ],
            "type": "string"
        },
        "ITypelessDataEntry": {
            "type": "object",
            "properties": {
                "key": {
                    "type": "string"
                },
                "value": {
                    "anyOf": [
                        {
                            "description": "A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the\nrequested number of bytes could not be allocated an exception is raised.",
                            "type": "object",
                            "additionalProperties": false,
                            "patternProperties": {
                                "^[0-9]+$": {
                                    "type": "number"
                                }
                            }
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "number"
                            }
                        },
                        {
                            "type": [
                                "string",
                                "number",
                                "boolean"
                            ]
                        }
                    ]
                }
            },
            "required": [
                "key",
                "value"
            ]
        },
        "LONG": {
            "type": [
                "number"
            ]
        }
    },
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IDataParams.json"
}
