{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/api-evangelist/flow-blockchain/main/json-schema/transaction.json", "title": "Transaction", "description": "A Flow blockchain transaction with Cadence script, arguments, signatures, and result.", "type": "object", "required": ["id", "script", "arguments", "reference_block_id", "gas_limit", "payer", "proposal_key", "authorizers", "payload_signatures", "envelope_signatures", "_expandable"], "properties": { "id": { "description": "A 32-byte unique identifier for an entity.", "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{64}" }, "script": { "type": "string", "format": "base64", "description": "Base64 encoded Cadence script." }, "arguments": { "type": "array", "description": "Array of Base64 encoded arguments in JSON-Cadence interchange format.", "items": { "type": "string", "format": "byte" } }, "reference_block_id": { "description": "A 32-byte unique identifier for an entity.", "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{64}" }, "gas_limit": { "type": "string", "format": "uint64", "description": "The limit on the amount of computation a transaction is allowed to perform." }, "payer": { "description": "The 8-byte address of an account.", "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{16}" }, "proposal_key": { "type": "object", "required": ["address", "key_index", "sequence_number"], "properties": { "address": { "description": "The 8-byte address of an account.", "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{16}" }, "key_index": { "type": "string", "format": "uint64" }, "sequence_number": { "type": "string", "format": "uint64" } } }, "authorizers": { "type": "array", "items": { "description": "The 8-byte address of an account.", "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{16}" } }, "payload_signatures": { "type": "array", "description": "A list of Base64 encoded signatures.", "items": { "type": "object", "required": ["address", "key_index", "signature"], "properties": { "address": { "description": "The 8-byte address of an account.", "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{16}" }, "key_index": { "type": "string", "format": "uint64" }, "signature": { "type": "string", "format": "byte", "description": "A variable length signature." } } } }, "envelope_signatures": { "type": "array", "description": "A list of Base64 encoded signatures.", "items": { "type": "object", "required": ["address", "key_index", "signature"], "properties": { "address": { "description": "The 8-byte address of an account.", "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{16}" }, "key_index": { "type": "string", "format": "uint64" }, "signature": { "type": "string", "format": "byte", "description": "A variable length signature." } } } }, "result": { "type": "object", "description": "The result of the transaction execution.", "required": ["block_id", "collection_id", "status", "status_code", "error_message", "computation_used", "events"], "properties": { "block_id": { "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{64}" }, "collection_id": { "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{64}" }, "execution": { "type": "string", "description": "Indicates whether the transaction execution succeeded or not.", "enum": ["Pending", "Success", "Failure"] }, "status": { "type": "string", "description": "The state of the transaction execution. Only sealed and expired are final states.", "enum": ["Pending", "Finalized", "Executed", "Sealed", "Expired"] }, "status_code": { "type": "integer" }, "error_message": { "type": "string", "description": "Provided transaction error in case the transaction was not successful." }, "computation_used": { "type": "string", "format": "uint64" }, "events": { "type": "array", "items": { "type": "object", "required": ["type", "transaction_id", "transaction_index", "event_index", "payload"], "properties": { "type": { "type": "string" }, "transaction_id": { "type": "string", "format": "hexadecimal", "pattern": "[a-fA-F0-9]{64}" }, "transaction_index": { "type": "string", "format": "uint64" }, "event_index": { "type": "string", "format": "uint64" }, "payload": { "type": "string", "format": "byte" } } } } } }, "_expandable": { "type": "object", "properties": { "result": { "type": "string", "format": "uri" } } }, "_links": { "type": "object", "properties": { "_self": { "type": "string" } } } } }