{ "components": { "schemas": { "Action": { "description": "A contract which becomes active when an action occurs.", "oneOf": [ { "properties": { "deposits": { "$ref": "#/components/schemas/Value" }, "into_account": { "$ref": "#/components/schemas/Party" }, "of_token": { "$ref": "#/components/schemas/Token" }, "party": { "$ref": "#/components/schemas/Party" } }, "required": [ "party", "deposits", "of_token", "into_account" ], "type": "object" }, { "properties": { "choose_between": { "items": { "$ref": "#/components/schemas/Bound" }, "type": "array" }, "for_choice": { "$ref": "#/components/schemas/ChoiceId" } }, "required": [ "for_choice", "choose_between" ], "type": "object" }, { "properties": { "notify_if": { "$ref": "#/components/schemas/Observation" } }, "required": [ "notify_if" ], "type": "object" } ] }, "ActionObject": { "description": "A contract which becomes active when an action occurs.", "oneOf": [ { "properties": { "deposits": { "$ref": "#/components/schemas/Value" }, "into_account": { "$ref": "#/components/schemas/Party" }, "of_token": { "$ref": "#/components/schemas/Token" }, "party": { "$ref": "#/components/schemas/Party" } }, "required": [ "party", "deposits", "of_token", "into_account" ], "type": "object" }, { "properties": { "choose_between": { "items": { "$ref": "#/components/schemas/Bound" }, "type": "array" }, "for_choice": { "$ref": "#/components/schemas/ChoiceId" } }, "required": [ "for_choice", "choose_between" ], "type": "object" }, { "properties": { "notify_if": { "$ref": "#/components/schemas/Observation" } }, "required": [ "notify_if" ], "type": "object" }, { "properties": { "ref": { "$ref": "#/components/schemas/Label" } }, "required": [ "ref" ], "type": "object" } ] }, "Address": { "description": "A cardano address, in Bech32 format", "example": "addr1w94f8ywk4fg672xasahtk4t9k6w3aql943uxz5rt62d4dvq8evxaf", "type": "string" }, "ApplicableInputs": { "description": "Applicable Inputs for a given contract", "properties": { "choices": { "items": { "$ref": "#/components/schemas/CanChoose" }, "type": "array" }, "deposits": { "items": { "$ref": "#/components/schemas/CanDeposit" }, "type": "array" }, "notify": { "$ref": "#/components/schemas/CanNotify" } }, "required": [ "deposits", "choices" ], "type": "object" }, "ApplyInputsResponse": { "properties": { "links": { "properties": { "transaction": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/ApplyInputsTxEnvelope" } }, "required": [ "resource", "links" ], "type": "object" }, "ApplyInputsTxEnvelope": { "description": "The \"type\" property of \"tx\" must be \"Tx BabbageEra\" or \"Tx ConwayEra\"", "properties": { "contractId": { "$ref": "#/components/schemas/TxOutRef" }, "transactionId": { "$ref": "#/components/schemas/TxId" }, "tx": { "$ref": "#/components/schemas/TextEnvelope" } }, "required": [ "contractId", "transactionId", "tx" ], "type": "object" }, "AssetId": { "properties": { "assetName": { "type": "string" }, "policyId": { "$ref": "#/components/schemas/PolicyId" } }, "required": [ "policyId", "assetName" ], "type": "object" }, "Assets": { "properties": { "lovelace": { "type": "integer" }, "tokens": { "additionalProperties": { "additionalProperties": { "type": "integer" }, "type": "object" }, "type": "object" } }, "required": [ "lovelace", "tokens" ], "type": "object" }, "BlockHeader": { "properties": { "blockHeaderHash": { "type": "string" }, "blockNo": { "format": "int64", "maximum": 1.8446744073709551615e19, "minimum": 0, "type": "integer" }, "slotNo": { "format": "int64", "maximum": 1.8446744073709551615e19, "minimum": 0, "type": "integer" } }, "required": [ "slotNo", "blockNo", "blockHeaderHash" ], "type": "object" }, "Bound": { "description": "An inclusive range of values for a choice.", "properties": { "from": { "type": "integer" }, "to": { "type": "integer" } }, "required": [ "from", "to" ], "type": "object" }, "CanChoose": { "description": "Choice Inputs that can be applied for a given contract", "properties": { "can_choose_between": { "items": { "$ref": "#/components/schemas/Bound" }, "type": "array" }, "case_index": { "$ref": "#/components/schemas/CaseIndex" }, "for_choice": { "$ref": "#/components/schemas/ChoiceId" }, "is_merkleized_continuation": { "$ref": "#/components/schemas/IsMerkleizedContinuation" } }, "required": [ "for_choice", "can_choose_between", "case_index", "is_merkleized_continuation" ], "type": "object" }, "CanDeposit": { "description": "Deposit Input that can be applied for a given contract", "properties": { "can_deposit": { "type": "integer" }, "case_index": { "$ref": "#/components/schemas/CaseIndex" }, "into_account": { "$ref": "#/components/schemas/Party" }, "is_merkleized_continuation": { "$ref": "#/components/schemas/IsMerkleizedContinuation" }, "of_token": { "$ref": "#/components/schemas/Token" }, "party": { "$ref": "#/components/schemas/Party" } }, "required": [ "party", "can_deposit", "of_token", "into_account", "case_index", "is_merkleized_continuation" ], "type": "object" }, "CanNotify": { "description": "Notify Input tha can be applied for a given contract", "properties": { "case_index": { "$ref": "#/components/schemas/CaseIndex" }, "is_merkleized_continuation": { "$ref": "#/components/schemas/IsMerkleizedContinuation" } }, "required": [ "is_merkleized_continuation", "case_index" ], "type": "object" }, "CanReduce": { "description": "Indicates if a given contract can be reduced (apply []) or not.", "type": "boolean" }, "Case": { "description": "A contract which becomes active when an action occurs.", "oneOf": [ { "properties": { "case": { "$ref": "#/components/schemas/Action" }, "then": { "$ref": "#/components/schemas/Contract" } }, "required": [ "case", "then" ], "type": "object" }, { "properties": { "case": { "$ref": "#/components/schemas/Action" }, "merkleized_then": { "type": "string" } }, "required": [ "case", "merkleized_then" ], "type": "object" } ] }, "CaseIndex": { "description": "Index of a \"Case Action\" in a \"When\"", "type": "integer" }, "CaseObject": { "description": "A contract which becomes active when an action occurs.", "oneOf": [ { "properties": { "case": { "$ref": "#/components/schemas/ActionObject" }, "then": { "$ref": "#/components/schemas/ContractObject" } }, "required": [ "case", "then" ], "type": "object" }, { "properties": { "case": { "$ref": "#/components/schemas/ActionObject" }, "merkleized_then": { "type": "string" } }, "required": [ "case", "merkleized_then" ], "type": "object" } ] }, "ChoiceId": { "description": "Refers to a party by role name.", "properties": { "choice_name": { "type": "string" }, "choice_owner": { "$ref": "#/components/schemas/Party" } }, "required": [ "choice_name", "choice_owner" ], "type": "object" }, "ChoiceIdObject": { "description": "Refers to a party by role name.", "properties": { "choice_name": { "type": "string" }, "choice_owner": { "$ref": "#/components/schemas/PartyObject" } }, "required": [ "choice_name", "choice_owner" ], "type": "object" }, "Contract": { "description": "Contract terms specified in Marlowe", "oneOf": [ { "description": "No more payments will be sent and the balance of the contract is 0.", "enum": [ "close" ], "type": "string" }, { "description": "A payment will be sent from an account to a payee.", "properties": { "from_account": { "$ref": "#/components/schemas/Party" }, "pay": { "$ref": "#/components/schemas/Value" }, "then": { "$ref": "#/components/schemas/Contract" }, "to": { "$ref": "#/components/schemas/Payee" }, "token": { "$ref": "#/components/schemas/Token" } }, "required": [ "from_account", "to", "token", "pay", "then" ], "type": "object" }, { "description": "If an observation is true, the first contract applies, otherwise the second contract applies.", "properties": { "else": { "$ref": "#/components/schemas/Contract" }, "if": { "$ref": "#/components/schemas/Observation" }, "then": { "$ref": "#/components/schemas/Contract" } }, "required": [ "if", "then", "else" ], "type": "object" }, { "description": "Wait for an action to be performed and apply the matching contract when it does. Apply the timeout contract if no actions have been performed in the timeout period.", "properties": { "timeout": { "type": "integer" }, "timeout_continuation": { "$ref": "#/components/schemas/Contract" }, "when": { "items": { "$ref": "#/components/schemas/Case" }, "type": "array" } }, "required": [ "when", "timeout", "timeout_continuation" ], "type": "object" }, { "description": "Bind a value to a name within the scope of a sub-contract.", "properties": { "be": { "$ref": "#/components/schemas/Value" }, "let": { "type": "string" }, "then": { "$ref": "#/components/schemas/Contract" } }, "required": [ "let", "be", "then" ], "type": "object" }, { "description": "Check an observation and produce a warning if it is false.", "properties": { "assert": { "$ref": "#/components/schemas/Observation" }, "then": { "$ref": "#/components/schemas/Contract" } }, "required": [ "assert", "then" ], "type": "object" } ] }, "ContractHeader": { "properties": { "block": { "$ref": "#/components/schemas/BlockHeader" }, "continuations": { "type": "string" }, "contractId": { "$ref": "#/components/schemas/TxOutRef" }, "metadata": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "roleTokenMintingPolicyId": { "$ref": "#/components/schemas/PolicyId" }, "status": { "$ref": "#/components/schemas/TxStatus" }, "tags": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "version": { "$ref": "#/components/schemas/MarloweVersion" } }, "required": [ "contractId", "roleTokenMintingPolicyId", "version", "tags", "metadata", "status" ], "type": "object" }, "ContractObject": { "description": "Contract terms specified in Marlowe", "oneOf": [ { "description": "No more payments will be sent and the balance of the contract is 0.", "enum": [ "close" ], "type": "string" }, { "description": "A payment will be sent from an account to a payee.", "properties": { "from_account": { "$ref": "#/components/schemas/PartyObject" }, "pay": { "$ref": "#/components/schemas/ValueObject" }, "then": { "$ref": "#/components/schemas/ContractObject" }, "to": { "$ref": "#/components/schemas/PayeeObject" }, "token": { "$ref": "#/components/schemas/TokenObject" } }, "required": [ "from_account", "to", "token", "pay", "then" ], "type": "object" }, { "description": "If an observation is true, the first contract applies, otherwise the second contract applies.", "properties": { "else": { "$ref": "#/components/schemas/ContractObject" }, "if": { "$ref": "#/components/schemas/ObservationObject" }, "then": { "$ref": "#/components/schemas/ContractObject" } }, "required": [ "if", "then", "else" ], "type": "object" }, { "description": "Wait for an action to be performed and apply the matching contract when it does. Apply the timeout contract if no actions have been performed in the timeout period.", "properties": { "timeout": { "type": "integer" }, "timeout_continuation": { "$ref": "#/components/schemas/ContractObject" }, "when": { "items": { "$ref": "#/components/schemas/CaseObject" }, "type": "array" } }, "required": [ "when", "timeout", "timeout_continuation" ], "type": "object" }, { "description": "Bind a value to a name within the scope of a sub-contract.", "properties": { "be": { "$ref": "#/components/schemas/ValueObject" }, "let": { "type": "string" }, "then": { "$ref": "#/components/schemas/ContractObject" } }, "required": [ "let", "be", "then" ], "type": "object" }, { "description": "Check an observation and produce a warning if it is false.", "properties": { "assert": { "$ref": "#/components/schemas/ObservationObject" }, "then": { "$ref": "#/components/schemas/ContractObject" } }, "required": [ "assert", "then" ], "type": "object" }, { "properties": { "ref": { "$ref": "#/components/schemas/Label" } }, "required": [ "ref" ], "type": "object" } ] }, "ContractSourceId": { "description": "The hex-encoded identifier of a Marlowe contract source", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" }, "ContractSourceIds": { "properties": { "results": { "items": { "$ref": "#/components/schemas/ContractSourceId" }, "type": "array" } }, "required": [ "results" ], "type": "object" }, "ContractState": { "properties": { "assets": { "$ref": "#/components/schemas/Assets" }, "block": { "$ref": "#/components/schemas/BlockHeader" }, "continuations": { "type": "string" }, "contractId": { "$ref": "#/components/schemas/TxOutRef" }, "currentContract": { "$ref": "#/components/schemas/Contract" }, "initialContract": { "$ref": "#/components/schemas/Contract" }, "metadata": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "roleTokenMintingPolicyId": { "$ref": "#/components/schemas/PolicyId" }, "state": { "$ref": "#/components/schemas/MarloweState" }, "status": { "$ref": "#/components/schemas/TxStatus" }, "tags": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "txBody": { "$ref": "#/components/schemas/TextEnvelope" }, "unclaimedPayouts": { "items": { "$ref": "#/components/schemas/Payout" }, "type": "array" }, "utxo": { "$ref": "#/components/schemas/TxOutRef" }, "version": { "$ref": "#/components/schemas/MarloweVersion" } }, "required": [ "contractId", "roleTokenMintingPolicyId", "version", "tags", "metadata", "status", "initialContract", "assets", "unclaimedPayouts" ], "type": "object" }, "CreateContractResponse": { "properties": { "links": { "properties": { "contract": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/CreateTxEnvelope" } }, "required": [ "resource", "links" ], "type": "object" }, "CreateTxBodyEnvelope": { "description": "The \"type\" property of \"txBody\" must be \"TxBody BabbageEra\" or \"TxBody ConwayEra\"", "properties": { "contractId": { "$ref": "#/components/schemas/TxOutRef" }, "safetyErrors": { "items": { "$ref": "#/components/schemas/SafetyError" }, "type": "array" }, "txBody": { "$ref": "#/components/schemas/TextEnvelope" } }, "required": [ "contractId", "txBody" ], "type": "object" }, "CreateTxEnvelope": { "description": "The \"type\" property of \"tx\" must be \"Tx BabbageEra\" or \"Tx ConwayEra\"", "properties": { "contractId": { "$ref": "#/components/schemas/TxOutRef" }, "safetyErrors": { "items": { "$ref": "#/components/schemas/SafetyError" }, "type": "array" }, "tx": { "$ref": "#/components/schemas/TextEnvelope" } }, "required": [ "contractId", "tx" ], "type": "object" }, "ExBudget": { "example": { "exBudgetCPU": 10, "exBudgetMemory": 10 }, "properties": { "exBudgetCPU": { "type": "number" }, "exBudgetMemory": { "type": "number" } }, "required": [ "exBudgetCPU", "exBudgetMemory" ], "type": "object" }, "GetContractResponse": { "properties": { "links": { "properties": { "transactions": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/ContractState" } }, "required": [ "resource", "links" ], "type": "object" }, "GetContractsResponse": { "properties": { "results": { "items": { "properties": { "links": { "properties": { "contract": { "type": "string" }, "transactions": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/ContractHeader" } }, "required": [ "resource", "links" ], "type": "object" }, "type": "array" } }, "required": [ "results" ], "type": "object" }, "GetPayoutResponse": { "properties": { "links": { "properties": { "contract": { "type": "string" }, "transaction": { "type": "string" }, "withdrawal": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/PayoutState" } }, "required": [ "resource", "links" ], "type": "object" }, "GetPayoutsResponse": { "properties": { "results": { "items": { "properties": { "links": { "properties": { "payout": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/PayoutHeader" } }, "required": [ "resource", "links" ], "type": "object" }, "type": "array" } }, "required": [ "results" ], "type": "object" }, "GetTransactionResponse": { "properties": { "links": { "properties": { "next": { "type": "string" }, "previous": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/Tx" } }, "required": [ "resource", "links" ], "type": "object" }, "GetTransactionsResponse": { "properties": { "results": { "items": { "properties": { "links": { "properties": { "transaction": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/TxHeader" } }, "required": [ "resource", "links" ], "type": "object" }, "type": "array" } }, "required": [ "results" ], "type": "object" }, "GetWithdrawalsResponse": { "properties": { "results": { "items": { "properties": { "links": { "properties": { "withdrawal": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/WithdrawalHeader" } }, "required": [ "resource", "links" ], "type": "object" }, "type": "array" } }, "required": [ "results" ], "type": "object" }, "Input": { "description": "An input to a Marlowe transaction", "oneOf": [ { "description": "Notify a contract to check a condition and provide the continuation of the contract", "properties": { "continuation_hash": { "type": "string" }, "merkleized_continuation": { "$ref": "#/components/schemas/Contract" } }, "required": [ "merkleized_continuation", "continuation_hash" ], "type": "object" }, { "description": "Notify a contract to check a condition", "enum": [ "input_notify" ], "type": "string" }, { "description": "Make a choice in a contract and provide the continuation of the contract", "properties": { "continuation_hash": { "type": "string" }, "for_choice_id": { "$ref": "#/components/schemas/ChoiceId" }, "input_that_chooses_num": { "type": "integer" }, "merkleized_continuation": { "$ref": "#/components/schemas/Contract" } }, "required": [ "input_that_chooses_num", "for_choice_id", "merkleized_continuation", "continuation_hash" ], "type": "object" }, { "description": "Make a choice in a contract", "properties": { "for_choice_id": { "$ref": "#/components/schemas/ChoiceId" }, "input_that_chooses_num": { "type": "integer" } }, "required": [ "input_that_chooses_num", "for_choice_id" ], "type": "object" }, { "description": "Deposit funds into an account in a contract and provide the continuation of the contract", "properties": { "continuation_hash": { "type": "string" }, "input_from_party": { "$ref": "#/components/schemas/Party" }, "into_account": { "$ref": "#/components/schemas/Party" }, "merkleized_continuation": { "$ref": "#/components/schemas/Contract" }, "of_token": { "$ref": "#/components/schemas/Token" }, "that_deposits": { "type": "integer" } }, "required": [ "input_from_party", "that_deposits", "of_token", "into_account", "merkleized_continuation", "continuation_hash" ], "type": "object" }, { "description": "Deposit funds into an account in a contract", "properties": { "input_from_party": { "$ref": "#/components/schemas/Party" }, "into_account": { "$ref": "#/components/schemas/Party" }, "of_token": { "$ref": "#/components/schemas/Token" }, "that_deposits": { "type": "integer" } }, "required": [ "input_from_party", "that_deposits", "of_token", "into_account" ], "type": "object" } ] }, "IntervalError": { "description": "A Marlowe transaction interval error.", "oneOf": [ { "description": "Invalid Marlowe transaction interval.", "properties": { "invalidInterval": { "properties": { "from": { "type": "integer" }, "to": { "type": "integer" } }, "required": [ "from", "to" ], "type": "object" } }, "required": [ "invalidInterval" ], "type": "object" }, { "description": "Marlowe transaction interval in past.", "properties": { "intervalInPastError": { "properties": { "from": { "type": "integer" }, "minTime": { "type": "integer" }, "to": { "type": "integer" } }, "required": [ "minTime", "from", "to" ], "type": "object" } }, "required": [ "intervalInPastError" ], "type": "object" } ] }, "IsMerkleizedContinuation": { "description": "Indicates if a given contract continuation is merkleized", "type": "boolean" }, "Label": { "description": "An arbitrary text identifier for an object in a Marlowe object bundle.", "type": "string" }, "LabelledObject": { "description": "A bundle of labelled Marlowe objects in define-before-use order.", "properties": { "label": { "$ref": "#/components/schemas/Label" }, "type": { "enum": [ "value", "observation", "contract", "party", "token", "action" ], "type": "string" }, "value": { "oneOf": [ { "$ref": "#/components/schemas/ValueObject" }, { "$ref": "#/components/schemas/ObservationObject" }, { "$ref": "#/components/schemas/ContractObject" }, { "$ref": "#/components/schemas/PartyObject" }, { "$ref": "#/components/schemas/TokenObject" }, { "$ref": "#/components/schemas/ActionObject" } ] } }, "required": [ "label", "type", "value" ], "type": "object" }, "MarloweState": { "description": "The on-chain state of a Marlowe contract.", "properties": { "accounts": { "items": { "items": [ { "items": [ { "$ref": "#/components/schemas/Party" }, { "$ref": "#/components/schemas/Token" } ], "maxItems": 2, "minItems": 2, "type": "array" }, { "type": "integer" } ], "maxItems": 2, "minItems": 2, "type": "array" }, "type": "array" }, "boundValues": { "items": { "items": [ { "type": "string" }, { "type": "integer" } ], "maxItems": 2, "minItems": 2, "type": "array" }, "type": "array" }, "choices": { "items": { "items": [ { "$ref": "#/components/schemas/ChoiceId" }, { "type": "integer" } ], "maxItems": 2, "minItems": 2, "type": "array" }, "type": "array" }, "minTime": { "type": "integer" } }, "required": [ "accounts", "choices", "boundValues", "minTime" ], "type": "object" }, "MarloweVersion": { "description": "A version of the Marlowe language.", "enum": [ "v1" ], "type": "string" }, "Metadata": { "description": "Arbitrary JSON-encoded transaction metadata", "oneOf": [ { "type": "integer" }, { "description": "Hex-encoded binary data of up to 64 bytes", "pattern": "0x[A-Fa-f0-9]{0,128}", "type": "string" }, { "description": "Text data of up to 64 characters", "type": "string" }, { "description": "Array of metadata values", "items": { "$ref": "#/components/schemas/Metadata" }, "type": "array" }, { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "description": "Object of metadata values", "type": "object" } ] }, "Next": { "description": "Describe the reducibility (Can be Reduced ?) and the applicability (Can Inputs be Applied ?) for a given contract.", "properties": { "applicable_inputs": { "$ref": "#/components/schemas/ApplicableInputs" }, "can_reduce": { "$ref": "#/components/schemas/CanReduce" } }, "required": [ "can_reduce", "applicable_inputs" ], "type": "object" }, "ObjectBundle": { "description": "A bundle of labelled Marlowe objects in define-before-use order.", "items": { "$ref": "#/components/schemas/LabelledObject" }, "type": "array" }, "Observation": { "description": "A time-varying expression that evaluates to an integer", "oneOf": [ { "type": "boolean" }, { "properties": { "and": { "$ref": "#/components/schemas/Observation" }, "both": { "$ref": "#/components/schemas/Observation" } }, "required": [ "both", "and" ], "type": "object" }, { "properties": { "either": { "$ref": "#/components/schemas/Observation" }, "or": { "$ref": "#/components/schemas/Observation" } }, "required": [ "either", "or" ], "type": "object" }, { "properties": { "not": { "$ref": "#/components/schemas/Observation" } }, "required": [ "not" ], "type": "object" }, { "properties": { "chose_something_for": { "$ref": "#/components/schemas/ChoiceId" } }, "required": [ "chose_something_for" ], "type": "object" }, { "properties": { "ge_than": { "$ref": "#/components/schemas/Value" }, "value": { "$ref": "#/components/schemas/Value" } }, "required": [ "value", "ge_than" ], "type": "object" }, { "properties": { "gt": { "$ref": "#/components/schemas/Value" }, "value": { "$ref": "#/components/schemas/Value" } }, "required": [ "value", "gt" ], "type": "object" }, { "properties": { "lt": { "$ref": "#/components/schemas/Value" }, "value": { "$ref": "#/components/schemas/Value" } }, "required": [ "value", "lt" ], "type": "object" }, { "properties": { "le_than": { "$ref": "#/components/schemas/Value" }, "value": { "$ref": "#/components/schemas/Value" } }, "required": [ "value", "le_than" ], "type": "object" }, { "properties": { "equal_to": { "$ref": "#/components/schemas/Value" }, "value": { "$ref": "#/components/schemas/Value" } }, "required": [ "value", "equal_to" ], "type": "object" } ] }, "ObservationObject": { "description": "A time-varying expression that evaluates to an integer", "oneOf": [ { "type": "boolean" }, { "properties": { "and": { "$ref": "#/components/schemas/ObservationObject" }, "both": { "$ref": "#/components/schemas/ObservationObject" } }, "required": [ "both", "and" ], "type": "object" }, { "properties": { "either": { "$ref": "#/components/schemas/ObservationObject" }, "or": { "$ref": "#/components/schemas/ObservationObject" } }, "required": [ "either", "or" ], "type": "object" }, { "properties": { "not": { "$ref": "#/components/schemas/ObservationObject" } }, "required": [ "not" ], "type": "object" }, { "properties": { "chose_something_for": { "$ref": "#/components/schemas/ChoiceIdObject" } }, "required": [ "chose_something_for" ], "type": "object" }, { "properties": { "ge_than": { "$ref": "#/components/schemas/ValueObject" }, "value": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "value", "ge_than" ], "type": "object" }, { "properties": { "gt": { "$ref": "#/components/schemas/ValueObject" }, "value": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "value", "gt" ], "type": "object" }, { "properties": { "lt": { "$ref": "#/components/schemas/ValueObject" }, "value": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "value", "lt" ], "type": "object" }, { "properties": { "le_than": { "$ref": "#/components/schemas/ValueObject" }, "value": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "value", "le_than" ], "type": "object" }, { "properties": { "equal_to": { "$ref": "#/components/schemas/ValueObject" }, "value": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "value", "equal_to" ], "type": "object" }, { "properties": { "ref": { "$ref": "#/components/schemas/Label" } }, "required": [ "ref" ], "type": "object" } ] }, "Party": { "description": "A participant in a contract", "oneOf": [ { "description": "Refers to a party by role name.", "properties": { "role_token": { "type": "string" } }, "required": [ "role_token" ], "type": "object" }, { "description": "Refers to a party by Cardano address.", "properties": { "address": { "$ref": "#/components/schemas/Address" } }, "required": [ "address" ], "type": "object" } ] }, "PartyObject": { "description": "A participant in a contract", "oneOf": [ { "description": "Refers to a party by role name.", "properties": { "role_token": { "type": "string" } }, "required": [ "role_token" ], "type": "object" }, { "description": "Refers to a party by Cardano address.", "properties": { "address": { "$ref": "#/components/schemas/Address" } }, "required": [ "address" ], "type": "object" }, { "properties": { "ref": { "$ref": "#/components/schemas/Label" } }, "required": [ "ref" ], "type": "object" } ] }, "Payee": { "description": "A recipient of a payment", "oneOf": [ { "description": "Pays funds into a party's account in the contract.", "properties": { "account": { "$ref": "#/components/schemas/Party" } }, "required": [ "account" ], "type": "object" }, { "description": "Pays funds to a party.", "properties": { "party": { "$ref": "#/components/schemas/Party" } }, "required": [ "party" ], "type": "object" } ] }, "PayeeObject": { "description": "A recipient of a payment", "oneOf": [ { "description": "Pays funds into a party's account in the contract.", "properties": { "account": { "$ref": "#/components/schemas/PartyObject" } }, "required": [ "account" ], "type": "object" }, { "description": "Pays funds to a party.", "properties": { "party": { "$ref": "#/components/schemas/PartyObject" } }, "required": [ "party" ], "type": "object" } ] }, "Payment": { "description": "A Marlowe payment.", "properties": { "amount": { "type": "integer" }, "payment_from": { "$ref": "#/components/schemas/Party" }, "to": { "$ref": "#/components/schemas/Payee" }, "token": { "$ref": "#/components/schemas/Token" } }, "required": [ "payment_from", "to", "token", "amount" ] }, "Payout": { "properties": { "assets": { "$ref": "#/components/schemas/Assets" }, "payoutId": { "$ref": "#/components/schemas/TxOutRef" }, "role": { "type": "string" } }, "required": [ "payoutId", "role", "assets" ], "type": "object" }, "PayoutHeader": { "properties": { "contractId": { "$ref": "#/components/schemas/TxOutRef" }, "payoutId": { "$ref": "#/components/schemas/TxOutRef" }, "role": { "$ref": "#/components/schemas/AssetId" }, "status": { "$ref": "#/components/schemas/PayoutStatus" }, "withdrawalId": { "$ref": "#/components/schemas/TxId" } }, "required": [ "payoutId", "contractId", "role", "status" ], "type": "object" }, "PayoutState": { "properties": { "assets": { "$ref": "#/components/schemas/Assets" }, "contractId": { "$ref": "#/components/schemas/TxOutRef" }, "payoutId": { "$ref": "#/components/schemas/TxOutRef" }, "payoutValidatorAddress": { "$ref": "#/components/schemas/Address" }, "role": { "$ref": "#/components/schemas/AssetId" }, "status": { "$ref": "#/components/schemas/PayoutStatus" }, "withdrawalId": { "$ref": "#/components/schemas/TxId" } }, "required": [ "payoutId", "contractId", "role", "payoutValidatorAddress", "status", "assets" ], "type": "object" }, "PayoutStatus": { "description": "The status of a payout. Either it is available to be withdrawn, or it has already been withdrawn.", "enum": [ "available", "withdrawn" ], "type": "string" }, "Plutus.Address": { "description": "A Plutus address.", "properties": { "addressCredential": { "$ref": "#/components/schemas/Plutus.Credential" }, "addressStakingCredential": { "$ref": "#/components/schemas/Plutus.StakingCredential" } }, "required": [ "addressCredential" ] }, "Plutus.Credential": { "description": "A Plutus credential.", "oneOf": [ { "description": "A Plutus public key credential.", "properties": { "pubKeyCredential": { "type": "string" } }, "required": [ "pubKeyCredential" ], "type": "object" }, { "description": "A Plutus script credential.", "properties": { "scriptCredential": { "type": "string" } }, "required": [ "scriptCredential" ], "type": "object" } ] }, "Plutus.StakingCredential": { "description": "A Plutus staking credential.", "oneOf": [ { "description": "A Plutus staking hash.", "properties": { "stakingHash": { "$ref": "#/components/schemas/Plutus.Credential" } }, "required": [ "stakingHash" ], "type": "object" }, { "description": "A Plutus staking pointer.", "properties": { "stakingHash": { "items": [ { "type": "integer" }, { "type": "integer" }, { "type": "integer" } ], "maxItems": 3, "minItems": 3, "type": "array" } }, "required": [ "stakingHash" ], "type": "object" } ] }, "PolicyId": { "description": "The hex-encoded minting policy ID for a native Cardano token", "pattern": "^[a-fA-F0-9]*$", "type": "string" }, "PostContractSourceResponse": { "properties": { "contractSourceId": { "$ref": "#/components/schemas/ContractSourceId" }, "intermediateIds": { "additionalProperties": { "$ref": "#/components/schemas/ContractSourceId" }, "type": "object" } }, "required": [ "contractSourceId", "intermediateIds" ], "type": "object" }, "PostContractsRequest": { "properties": { "contract": { "oneOf": [ { "$ref": "#/components/schemas/Contract" }, { "$ref": "#/components/schemas/ContractSourceId" } ] }, "metadata": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "minUTxODeposit": { "format": "int64", "maximum": 1.8446744073709551615e19, "minimum": 0, "type": "integer" }, "roles": { "$ref": "#/components/schemas/RolesConfig" }, "tags": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "threadTokenName": { "type": "string" }, "version": { "$ref": "#/components/schemas/MarloweVersion" } }, "required": [ "tags", "metadata", "version", "contract" ], "type": "object" }, "PostTransactionsRequest": { "properties": { "inputs": { "items": { "$ref": "#/components/schemas/Input" }, "type": "array" }, "invalidBefore": { "$ref": "#/components/schemas/UTCTime" }, "invalidHereafter": { "$ref": "#/components/schemas/UTCTime" }, "metadata": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "tags": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "version": { "$ref": "#/components/schemas/MarloweVersion" } }, "required": [ "version", "tags", "metadata", "inputs" ], "type": "object" }, "PostWithdrawalsRequest": { "properties": { "payouts": { "items": { "$ref": "#/components/schemas/TxOutRef" }, "type": "array", "uniqueItems": true } }, "required": [ "payouts" ], "type": "object" }, "RoleTokenConfig": { "oneOf": [ { "properties": { "metadata": { "$ref": "#/components/schemas/TokenMetadata" }, "recipients": { "additionalProperties": { "format": "int64", "maximum": 1.8446744073709551615e19, "minimum": 0, "type": "integer" }, "type": "object" } }, "required": [ "recipients" ], "type": "object" }, { "$ref": "#/components/schemas/Address" }, { "properties": { "address": { "$ref": "#/components/schemas/Address" }, "metadata": { "$ref": "#/components/schemas/TokenMetadata" } }, "required": [ "address" ], "type": "object" }, { "properties": { "metadata": { "$ref": "#/components/schemas/TokenMetadata" }, "script": { "description": "The type of script receiving the role token.", "enum": [ "OpenRole" ], "type": "string" } }, "required": [ "script" ], "type": "object" } ] }, "RolesConfig": { "oneOf": [ { "$ref": "#/components/schemas/PolicyId" }, { "additionalProperties": { "$ref": "#/components/schemas/RoleTokenConfig" }, "type": "object" } ] }, "SafetyError": { "description": "Information about the safety of a Marlowe contract and its state.", "properties": { "account-id": { "$ref": "#/components/schemas/Party" }, "address": { "$ref": "#/components/schemas/Plutus.Address" }, "bytes": { "exclusiveMinimum": false, "minimum": 0, "type": "integer" }, "choice-id": { "$ref": "#/components/schemas/ChoiceId" }, "cost": { "$ref": "#/components/schemas/ExBudget" }, "currency-symbol": { "type": "string" }, "detail": { "type": "string" }, "error": { "type": "string" }, "fatal": { "type": "boolean" }, "hash": { "type": "string" }, "message": { "type": "string" }, "role-name": { "type": "string" }, "token": { "$ref": "#/components/schemas/Token" }, "token-name": { "type": "string" }, "transaction": { "$ref": "#/components/schemas/Transaction" }, "value-id": { "type": "string" }, "warning": { "$ref": "#/components/schemas/TransactionWarning" } }, "required": [ "error", "detail", "fatal" ] }, "TextEnvelope": { "properties": { "cborHex": { "type": "string" }, "description": { "type": "string" }, "type": { "description": "What type of data is encoded in the CBOR Hex. Valid values include \"Tx era\", \"TxBody era\", and \"ShelleyTxWitness era\" where era is one of \"BabbageEra\", \"ConwayEra\".", "type": "string" } }, "required": [ "type", "description", "cborHex" ], "type": "object" }, "Token": { "description": "A token with a currency symbol (minting policy ID) and token name.", "properties": { "currency_symbol": { "type": "string" }, "token_name": { "type": "string" } }, "required": [ "currency_symbol", "token_name" ], "type": "object" }, "TokenMetadata": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "description": "Metadata for an NFT, as described by https://cips.cardano.org/cips/cip25/", "properties": { "description": { "type": "string" }, "files": { "items": { "$ref": "#/components/schemas/TokenMetadataFile" }, "type": "array" }, "image": { "type": "string" }, "mediaType": { "type": "string" }, "name": { "type": "string" } }, "required": [ "name", "image" ], "type": "object" }, "TokenMetadataFile": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "properties": { "mediaType": { "type": "string" }, "name": { "type": "string" }, "src": { "type": "string" } }, "required": [ "name", "src", "mediaType" ], "type": "object" }, "TokenObject": { "description": "A token with a currency symbol (minting policy ID) and token name.", "oneOf": [ { "$ref": "#/components/schemas/Token" }, { "properties": { "ref": { "$ref": "#/components/schemas/Label" } }, "required": [ "ref" ], "type": "object" } ] }, "Transaction": { "description": "Information about a Marlowe transaction.", "properties": { "contract": { "$ref": "#/components/schemas/Contract" }, "input": { "$ref": "#/components/schemas/TransactionInput" }, "output": { "$ref": "#/components/schemas/TransactionOutput" }, "state": { "$ref": "#/components/schemas/MarloweState" } }, "required": [ "state", "contract", "input", "output" ] }, "TransactionError": { "description": "A Marlowe transaction error.", "oneOf": [ { "description": "Ambiguous time interval.", "enum": [ "TEAmbiguousTimeIntervalError" ], "type": "string" }, { "description": "No match on applying input.", "enum": [ "TEApplyNoMatchError" ], "type": "string" }, { "description": "An invalid time interval.", "properties": { "context": { "$ref": "#/components/schemas/IntervalError" }, "error": { "enum": [ "TEIntervalError" ], "type": "string" } }, "required": [ "error", "context" ], "type": "object" }, { "description": "A useless application of input.", "enum": [ "TEUselessTransaction" ], "type": "string" }, { "description": "A mismatch in the continuation hash.", "enum": [ "TEHashMismatch" ], "type": "string" } ] }, "TransactionInput": { "description": "Marlowe transaction input.", "properties": { "tx_inputs": { "items": { "$ref": "#/components/schemas/Input" }, "type": "array" }, "tx_interval": { "description": "Time interval.", "properties": { "from": { "type": "integer" }, "to": { "type": "integer" } }, "required": [ "from", "to" ], "type": "object" } }, "required": [ "tx_interval", "tx_inputs" ], "type": "object" }, "TransactionOutput": { "description": "Marlowe transaction output.", "oneOf": [ { "description": "Marlowe transaction output information.", "properties": { "contract": { "$ref": "#/components/schemas/Contract" }, "payments": { "items": { "$ref": "#/components/schemas/Payment" }, "type": "array" }, "state": { "$ref": "#/components/schemas/MarloweState" }, "warnings": { "items": { "$ref": "#/components/schemas/TransactionWarning" }, "type": "array" } }, "required": [ "warnings", "payments", "state", "contract" ], "type": "object" }, { "description": "Marlowe transaction error.", "properties": { "transaction_error": { "$ref": "#/components/schemas/TransactionError" } }, "required": [ "transaction_error" ], "type": "object" } ] }, "TransactionWarning": { "description": "A transaction semantics warning.", "oneOf": [ { "description": "A warning for a non-positive deposit.", "properties": { "asked_to_deposit": { "type": "integer" }, "in_account": { "$ref": "#/components/schemas/Party" }, "of_token": { "$ref": "#/components/schemas/Token" }, "party": { "$ref": "#/components/schemas/Party" } }, "required": [ "party", "asked_to_deposit", "of_token", "in_account" ], "type": "object" }, { "description": "A warning for a non-positive payment.", "properties": { "account": { "$ref": "#/components/schemas/Party" }, "asked_to_pay": { "type": "integer" }, "of_token": { "$ref": "#/components/schemas/Token" }, "to_payee": { "$ref": "#/components/schemas/Payee" } }, "required": [ "account", "asked_to_pay", "of_token", "to_payee" ], "type": "object" }, { "description": "A warning for partial payment.", "properties": { "account": { "$ref": "#/components/schemas/Party" }, "asked_to_pay": { "type": "integer" }, "but_only_paid": { "type": "integer" }, "of_token": { "$ref": "#/components/schemas/Token" }, "to_payee": { "$ref": "#/components/schemas/Payee" } }, "required": [ "account", "asked_to_pay", "of_token", "to_payee", "but_only_paid" ], "type": "object" }, { "description": "A variable-name shadowing warning.", "properties": { "had_value": { "type": "integer" }, "is_now_assigned": { "type": "integer" }, "value_id": { "type": "string" } }, "required": [ "value_id", "had_value", "is_now_assigned" ], "type": "object" }, { "description": "A semantics assertion failed.", "enum": [ "assertion_failed" ], "type": "string" } ] }, "Tx": { "properties": { "assets": { "$ref": "#/components/schemas/Assets" }, "block": { "$ref": "#/components/schemas/BlockHeader" }, "consumingTx": { "$ref": "#/components/schemas/TxId" }, "continuations": { "type": "string" }, "contractId": { "$ref": "#/components/schemas/TxOutRef" }, "inputUtxo": { "$ref": "#/components/schemas/TxOutRef" }, "inputs": { "items": { "$ref": "#/components/schemas/Input" }, "type": "array" }, "invalidBefore": { "$ref": "#/components/schemas/UTCTime" }, "invalidHereafter": { "$ref": "#/components/schemas/UTCTime" }, "metadata": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "outputContract": { "$ref": "#/components/schemas/Contract" }, "outputState": { "$ref": "#/components/schemas/MarloweState" }, "outputUtxo": { "$ref": "#/components/schemas/TxOutRef" }, "payouts": { "items": { "$ref": "#/components/schemas/Payout" }, "type": "array" }, "status": { "$ref": "#/components/schemas/TxStatus" }, "tags": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "transactionId": { "$ref": "#/components/schemas/TxId" }, "txBody": { "$ref": "#/components/schemas/TextEnvelope" } }, "required": [ "contractId", "transactionId", "tags", "metadata", "status", "inputUtxo", "inputs", "assets", "payouts", "invalidBefore", "invalidHereafter" ], "type": "object" }, "TxHeader": { "properties": { "block": { "$ref": "#/components/schemas/BlockHeader" }, "continuations": { "type": "string" }, "contractId": { "$ref": "#/components/schemas/TxOutRef" }, "metadata": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "status": { "$ref": "#/components/schemas/TxStatus" }, "tags": { "additionalProperties": { "$ref": "#/components/schemas/Metadata" }, "type": "object" }, "transactionId": { "$ref": "#/components/schemas/TxId" }, "utxo": { "$ref": "#/components/schemas/TxOutRef" } }, "required": [ "contractId", "transactionId", "tags", "metadata", "status" ], "type": "object" }, "TxId": { "description": "The hex-encoded identifier of a Cardano transaction", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" }, "TxOutRef": { "description": "A reference to a transaction output with a transaction ID and index.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7#1", "pattern": "^[a-fA-F0-9]{64}#[0-9]+$", "type": "string" }, "TxStatus": { "description": "The status of a transaction on the local node.", "enum": [ "unsigned", "submitted", "confirmed" ], "type": "string" }, "UTCTime": { "example": "2016-07-22T00:00:00Z", "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" }, "Value": { "description": "A time-varying expression that evaluates to a boolean", "oneOf": [ { "properties": { "amount_of_token": { "$ref": "#/components/schemas/Token" }, "in_account": { "$ref": "#/components/schemas/Party" } }, "required": [ "amount_of_token", "in_account" ], "type": "object" }, { "format": "int64", "type": "integer" }, { "properties": { "negate": { "$ref": "#/components/schemas/Value" } }, "required": [ "negate" ], "type": "object" }, { "properties": { "add": { "$ref": "#/components/schemas/Value" }, "and": { "$ref": "#/components/schemas/Value" } }, "required": [ "add", "and" ], "type": "object" }, { "properties": { "minus": { "$ref": "#/components/schemas/Value" }, "value": { "$ref": "#/components/schemas/Value" } }, "required": [ "value", "minus" ], "type": "object" }, { "properties": { "multiply": { "$ref": "#/components/schemas/Value" }, "times": { "$ref": "#/components/schemas/Value" } }, "required": [ "multiply", "times" ], "type": "object" }, { "properties": { "by": { "$ref": "#/components/schemas/Value" }, "divide": { "$ref": "#/components/schemas/Value" } }, "required": [ "divide", "by" ], "type": "object" }, { "properties": { "value_of_choice": { "$ref": "#/components/schemas/ChoiceId" } }, "required": [ "value_of_choice" ], "type": "object" }, { "enum": [ "time_interval_start", "time_interval_end" ], "type": "string" }, { "properties": { "use_value": { "type": "string" } }, "required": [ "use_value" ], "type": "object" }, { "properties": { "else": { "$ref": "#/components/schemas/Value" }, "if": { "$ref": "#/components/schemas/Observation" }, "then": { "$ref": "#/components/schemas/Value" } }, "required": [ "if", "then", "else" ], "type": "object" } ] }, "ValueObject": { "description": "A time-varying expression that evaluates to a boolean", "oneOf": [ { "properties": { "amount_of_token": { "$ref": "#/components/schemas/TokenObject" }, "in_account": { "$ref": "#/components/schemas/PartyObject" } }, "required": [ "amount_of_token", "in_account" ], "type": "object" }, { "format": "int64", "type": "integer" }, { "properties": { "negate": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "negate" ], "type": "object" }, { "properties": { "add": { "$ref": "#/components/schemas/ValueObject" }, "and": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "add", "and" ], "type": "object" }, { "properties": { "minus": { "$ref": "#/components/schemas/ValueObject" }, "value": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "value", "minus" ], "type": "object" }, { "properties": { "multiply": { "$ref": "#/components/schemas/ValueObject" }, "times": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "multiply", "times" ], "type": "object" }, { "properties": { "by": { "$ref": "#/components/schemas/ValueObject" }, "divide": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "divide", "by" ], "type": "object" }, { "properties": { "value_of_choice": { "$ref": "#/components/schemas/ChoiceIdObject" } }, "required": [ "value_of_choice" ], "type": "object" }, { "enum": [ "time_interval_start", "time_interval_end" ], "type": "string" }, { "properties": { "use_value": { "type": "string" } }, "required": [ "use_value" ], "type": "object" }, { "properties": { "else": { "$ref": "#/components/schemas/ValueObject" }, "if": { "$ref": "#/components/schemas/ObservationObject" }, "then": { "$ref": "#/components/schemas/ValueObject" } }, "required": [ "if", "then", "else" ], "type": "object" }, { "properties": { "ref": { "$ref": "#/components/schemas/Label" } }, "required": [ "ref" ], "type": "object" } ] }, "WithdrawPayoutsResponse": { "properties": { "links": { "properties": { "withdrawal": { "type": "string" } }, "type": "object" }, "resource": { "$ref": "#/components/schemas/WithdrawTxEnvelope" } }, "required": [ "resource", "links" ], "type": "object" }, "WithdrawTxBodyEnvelope": { "description": "The \"type\" property of \"txBody\" must be \"TxBody BabbageEra\" or \"TxBody ConwayEra\"", "properties": { "txBody": { "$ref": "#/components/schemas/TextEnvelope" }, "withdrawalId": { "$ref": "#/components/schemas/TxId" } }, "required": [ "withdrawalId", "txBody" ], "type": "object" }, "WithdrawTxEnvelope": { "description": "The \"type\" property of \"tx\" must be \"Tx BabbageEra\" or \"Tx ConwayEra\"", "properties": { "tx": { "$ref": "#/components/schemas/TextEnvelope" }, "withdrawalId": { "$ref": "#/components/schemas/TxId" } }, "required": [ "withdrawalId", "tx" ], "type": "object" }, "Withdrawal": { "properties": { "block": { "$ref": "#/components/schemas/BlockHeader" }, "payouts": { "items": { "$ref": "#/components/schemas/PayoutHeader" }, "type": "array", "uniqueItems": true }, "status": { "$ref": "#/components/schemas/TxStatus" }, "withdrawalId": { "$ref": "#/components/schemas/TxId" } }, "required": [ "payouts", "withdrawalId", "status" ], "type": "object" }, "WithdrawalHeader": { "properties": { "block": { "$ref": "#/components/schemas/BlockHeader" }, "status": { "$ref": "#/components/schemas/TxStatus" }, "withdrawalId": { "$ref": "#/components/schemas/TxId" } }, "required": [ "withdrawalId", "status" ], "type": "object" } } }, "info": { "description": "REST API for Marlowe Runtime", "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title": "Marlowe Runtime REST API", "version": "0.0.5.1" }, "openapi": "3.1.0", "paths": { "/contracts": { "get": { "description": "Get contracts published on chain. Results are returned in pages, with paging being specified by request headers.", "operationId": "getContracts", "parameters": [ { "in": "query", "name": "roleCurrency", "schema": { "items": { "description": "The hex-encoded minting policy ID for a native Cardano token", "pattern": "^[a-fA-F0-9]*$", "type": "string" }, "type": "array" } }, { "in": "query", "name": "tag", "schema": { "items": { "type": "string" }, "type": "array" } }, { "in": "query", "name": "partyAddress", "schema": { "items": { "description": "A cardano address, in Bech32 format", "example": "addr1w94f8ywk4fg672xasahtk4t9k6w3aql943uxz5rt62d4dvq8evxaf", "type": "string" }, "type": "array" } }, { "in": "query", "name": "partyRole", "schema": { "items": { "description": "A minting policy ID and a token name identifying a specific asset type. Encoded as policyId.tokenName.", "pattern": "^[a-fA-F0-9]*\\..*$", "type": "string" }, "type": "array" } }, { "in": "header", "name": "Range", "required": false, "schema": { "type": "string" } } ], "responses": { "206": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/GetContractsResponse" } } }, "description": "", "headers": { "Accept-Ranges": { "schema": { "items": { "enum": [ "contractId" ], "type": "string" }, "type": "array" } }, "Content-Range": { "schema": { "type": "string" } }, "Next-Range": { "schema": { "type": "string" } }, "Total-Count": { "schema": { "maximum": 9223372036854775807, "minimum": -9223372036854775808, "type": "integer" } }, "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `Range` or `partyRole` or `partyAddress` or `tag` or `roleCurrency`" } }, "security": [], "summary": "Get contracts" }, "post": { "description": "Build an unsigned (Cardano) transaction body which opens a new Marlowe contract. This unsigned transaction must be signed by a wallet (such as a CIP-30 or CIP-45 wallet) before being submitted. To submit the signed transaction, use the PUT /contracts/{contractId} endpoint.", "operationId": "createContract", "parameters": [ { "description": "Where to send staking rewards for the Marlowe script outputs of this contract.", "in": "header", "name": "X-Stake-Address", "required": false, "schema": { "description": "A cardano stake address, in Bech32 format", "example": "stake1ux7lyy9nhecm033qsmel9awnr22up6jadlzkrxufr78w82gsfsn0d", "type": "string" } }, { "in": "header", "name": "X-Change-Address", "required": true, "schema": { "description": "A cardano address, in Bech32 format", "example": "addr1w94f8ywk4fg672xasahtk4t9k6w3aql943uxz5rt62d4dvq8evxaf", "type": "string" } }, { "in": "header", "name": "X-Address", "required": false, "schema": { "description": "A comma-separated list of values", "type": "string" } }, { "in": "header", "name": "X-Collateral-UTxO", "required": false, "schema": { "description": "A comma-separated list of values", "type": "string" } } ], "requestBody": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/PostContractsRequest" } } } }, "responses": { "201": { "content": { "application/vendor.iog.marlowe-runtime.contract-tx-json": { "schema": { "$ref": "#/components/schemas/CreateContractResponse" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `X-Collateral-UTxO` or `X-Address` or `X-Change-Address` or `body` or `X-Stake-Address`" } }, "security": [], "summary": "Create a new contract" } }, "/contracts/sources": { "post": { "description": "Upload a bundle of marlowe objects as contract sources. This API supports request body streaming, with newline framing between request bundles.", "operationId": "createContractSources", "parameters": [ { "description": "The label of the top-level contract object in the bundle(s).", "in": "query", "name": "main", "required": true, "schema": { "description": "An arbitrary text identifier for an object in a Marlowe object bundle.", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectBundle" } }, "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/ObjectBundle" } } } }, "responses": { "200": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/PostContractSourceResponse" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `body` or `main`" } }, "security": [], "summary": "Upload contract sources" } }, "/contracts/sources/{contractSourceId}": { "get": { "operationId": "getContractSourceById", "parameters": [ { "in": "path", "name": "contractSourceId", "required": true, "schema": { "description": "The hex-encoded identifier of a Marlowe contract source", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" } }, { "allowEmptyValue": true, "in": "query", "name": "expand", "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/Contract" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `expand`" }, "404": { "description": "`contractSourceId` not found" } }, "security": [], "summary": "Get contract source by ID" } }, "/contracts/sources/{contractSourceId}/adjacency": { "get": { "description": "Get the contract source IDs which are adjacent to a contract source (they appear directly in the contract source).", "operationId": "getContractSourceAdjacency", "parameters": [ { "in": "path", "name": "contractSourceId", "required": true, "schema": { "description": "The hex-encoded identifier of a Marlowe contract source", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" } } ], "responses": { "200": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/ContractSourceIds" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "404": { "description": "`contractSourceId` not found" } }, "security": [], "summary": "Get adjacent contract source IDs by ID" } }, "/contracts/sources/{contractSourceId}/closure": { "get": { "description": "Get the contract source IDs which appear in the full hierarchy of a contract source (including the ID of the contract source its self).", "operationId": "getContractSourceClosure", "parameters": [ { "in": "path", "name": "contractSourceId", "required": true, "schema": { "description": "The hex-encoded identifier of a Marlowe contract source", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" } } ], "responses": { "200": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/ContractSourceIds" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "404": { "description": "`contractSourceId` not found" } }, "security": [], "summary": "Get contract source closure by ID" } }, "/contracts/{contractId}": { "get": { "operationId": "getContractById", "parameters": [ { "in": "path", "name": "contractId", "required": true, "schema": { "description": "A reference to a transaction output with a transaction ID and index. The value must be URL encoded by replacing the '#' character with %23.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231", "pattern": "^[a-fA-F0-9]{64}%23[0-9]+$", "type": "string" } } ], "responses": { "200": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/GetContractResponse" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "404": { "description": "`contractId` not found" } }, "security": [], "summary": "Get contract by ID" }, "put": { "description": "Submit a signed (Cardano) transaction that opens a new Marlowe contract. The transaction must have originally been created by the POST /contracts endpoint. This endpoint will respond when the transaction is submitted successfully to the local node, which means it will not wait for the transaction to be published in a block. Use the GET /contracts/{contractId} endpoint to poll the on-chain status.", "operationId": "submitContract", "parameters": [ { "in": "path", "name": "contractId", "required": true, "schema": { "description": "A reference to a transaction output with a transaction ID and index. The value must be URL encoded by replacing the '#' character with %23.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231", "pattern": "^[a-fA-F0-9]{64}%23[0-9]+$", "type": "string" } } ], "requestBody": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/TextEnvelope" } } } }, "responses": { "202": { "content": { "application/json;charset=utf-8": {} }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `body`" }, "404": { "description": "`contractId` not found" } }, "security": [], "summary": "Submit contract to chain" } }, "/contracts/{contractId}/next": { "get": { "description": "Get inputs which could be performed on a contract withing a time range by the requested parties.", "operationId": "getNextStepsForContract", "parameters": [ { "in": "path", "name": "contractId", "required": true, "schema": { "description": "A reference to a transaction output with a transaction ID and index. The value must be URL encoded by replacing the '#' character with %23.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231", "pattern": "^[a-fA-F0-9]{64}%23[0-9]+$", "type": "string" } }, { "description": "The beginning of the validity range.", "in": "query", "name": "validityStart", "required": true, "schema": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, { "description": "The end of the validity range.", "in": "query", "name": "validityEnd", "required": true, "schema": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, { "in": "query", "name": "party", "schema": { "items": { "description": "Party (A role name or an Address)", "type": "string" }, "type": "array" } } ], "responses": { "200": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/Next" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `party` or `validityEnd` or `validityStart`" }, "404": { "description": "`contractId` not found" } }, "security": [], "summary": "Get next contract steps" } }, "/contracts/{contractId}/transactions": { "get": { "description": "Get published transactions for a contract. Results are returned in pages, with paging being specified by request headers.", "operationId": "getTransactionsForContract", "parameters": [ { "in": "path", "name": "contractId", "required": true, "schema": { "description": "A reference to a transaction output with a transaction ID and index. The value must be URL encoded by replacing the '#' character with %23.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231", "pattern": "^[a-fA-F0-9]{64}%23[0-9]+$", "type": "string" } }, { "in": "header", "name": "Range", "required": false, "schema": { "type": "string" } } ], "responses": { "206": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/GetTransactionsResponse" } } }, "description": "", "headers": { "Accept-Ranges": { "schema": { "items": { "enum": [ "transactionId" ], "type": "string" }, "type": "array" } }, "Content-Range": { "schema": { "type": "string" } }, "Next-Range": { "schema": { "type": "string" } }, "Total-Count": { "schema": { "maximum": 9223372036854775807, "minimum": -9223372036854775808, "type": "integer" } }, "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `Range`" }, "404": { "description": "`contractId` not found" } }, "security": [], "summary": "Get transactions for contract" }, "post": { "description": "Build an unsigned (Cardano) transaction body which applies inputs to an open Marlowe contract. This unsigned transaction must be signed by a wallet (such as a CIP-30 or CIP-45 wallet) before being submitted. To submit the signed transaction, use the PUT /contracts/{contractId}/transactions/{transactionId} endpoint.", "operationId": "applyInputsToContract", "parameters": [ { "in": "path", "name": "contractId", "required": true, "schema": { "description": "A reference to a transaction output with a transaction ID and index. The value must be URL encoded by replacing the '#' character with %23.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231", "pattern": "^[a-fA-F0-9]{64}%23[0-9]+$", "type": "string" } }, { "in": "header", "name": "X-Change-Address", "required": true, "schema": { "description": "A cardano address, in Bech32 format", "example": "addr1w94f8ywk4fg672xasahtk4t9k6w3aql943uxz5rt62d4dvq8evxaf", "type": "string" } }, { "in": "header", "name": "X-Address", "required": false, "schema": { "description": "A comma-separated list of values", "type": "string" } }, { "in": "header", "name": "X-Collateral-UTxO", "required": false, "schema": { "description": "A comma-separated list of values", "type": "string" } } ], "requestBody": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/PostTransactionsRequest" } } } }, "responses": { "201": { "content": { "application/vendor.iog.marlowe-runtime.apply-inputs-tx-json": { "schema": { "$ref": "#/components/schemas/ApplyInputsResponse" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `X-Collateral-UTxO` or `X-Address` or `X-Change-Address` or `body`" }, "404": { "description": "`contractId` not found" } }, "security": [], "summary": "Apply inputs to contract" } }, "/contracts/{contractId}/transactions/{transactionId}": { "get": { "operationId": "getContractTransactionById", "parameters": [ { "in": "path", "name": "contractId", "required": true, "schema": { "description": "A reference to a transaction output with a transaction ID and index. The value must be URL encoded by replacing the '#' character with %23.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231", "pattern": "^[a-fA-F0-9]{64}%23[0-9]+$", "type": "string" } }, { "in": "path", "name": "transactionId", "required": true, "schema": { "description": "The hex-encoded identifier of a Cardano transaction", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" } } ], "responses": { "200": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/GetTransactionResponse" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "404": { "description": "`contractId` or `transactionId` not found" } }, "security": [], "summary": "Get contract transaction by ID" }, "put": { "description": "Submit a signed (Cardano) transaction that applies inputs to an open Marlowe contract. The transaction must have originally been created by the POST /contracts/{contractId}/transactions endpoint. This endpoint will respond when the transaction is submitted successfully to the local node, which means it will not wait for the transaction to be published in a block. Use the GET /contracts/{contractId}/transactions/{transactionId} endpoint to poll the on-chain status.", "operationId": "submitContractTransaction", "parameters": [ { "in": "path", "name": "contractId", "required": true, "schema": { "description": "A reference to a transaction output with a transaction ID and index. The value must be URL encoded by replacing the '#' character with %23.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231", "pattern": "^[a-fA-F0-9]{64}%23[0-9]+$", "type": "string" } }, { "in": "path", "name": "transactionId", "required": true, "schema": { "description": "The hex-encoded identifier of a Cardano transaction", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" } } ], "requestBody": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/TextEnvelope" } } } }, "responses": { "202": { "content": { "application/json;charset=utf-8": {} }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `body`" }, "404": { "description": "`contractId` or `transactionId` not found" } }, "security": [], "summary": "Submit contract input application" } }, "/healthcheck": { "get": { "description": "Check if the server is running and ready to respond to requests.", "operationId": "healthcheck", "responses": { "200": { "content": { "application/json;charset=utf-8": {} }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } } }, "security": [], "summary": "Test server status" } }, "/payouts": { "get": { "description": "Get payouts to parties from role-based contracts. Results are returned in pages, with paging being specified by request headers.", "operationId": "getPayouts", "parameters": [ { "in": "query", "name": "contractId", "schema": { "items": { "description": "A reference to a transaction output with a transaction ID and index. The value must be URL encoded by replacing the '#' character with %23.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231", "pattern": "^[a-fA-F0-9]{64}%23[0-9]+$", "type": "string" }, "type": "array" } }, { "in": "query", "name": "roleToken", "schema": { "items": { "description": "A minting policy ID and a token name identifying a specific asset type. Encoded as policyId.tokenName.", "pattern": "^[a-fA-F0-9]*\\..*$", "type": "string" }, "type": "array" } }, { "description": "Whether to include available or withdrawn payouts in the results.", "in": "query", "name": "status", "required": false, "schema": { "description": "The status of a payout. Either it is available to be withdrawn, or it has already been withdrawn.", "enum": [ "available", "withdrawn" ], "type": "string" } }, { "in": "header", "name": "Range", "required": false, "schema": { "type": "string" } } ], "responses": { "206": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/GetPayoutsResponse" } } }, "description": "", "headers": { "Accept-Ranges": { "schema": { "items": { "enum": [ "payoutId" ], "type": "string" }, "type": "array" } }, "Content-Range": { "schema": { "type": "string" } }, "Next-Range": { "schema": { "type": "string" } }, "Total-Count": { "schema": { "maximum": 9223372036854775807, "minimum": -9223372036854775808, "type": "integer" } }, "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `Range` or `status` or `roleToken` or `contractId`" } }, "security": [], "summary": "Get role payouts" } }, "/payouts/{payoutId}": { "get": { "operationId": "getPayoutById", "parameters": [ { "in": "path", "name": "payoutId", "required": true, "schema": { "description": "A reference to a transaction output with a transaction ID and index. The value must be URL encoded by replacing the '#' character with %23.", "example": "98d601c9307dd43307cf68a03aad0086d4e07a789b66919ccf9f7f7676577eb7%231", "pattern": "^[a-fA-F0-9]{64}%23[0-9]+$", "type": "string" } } ], "responses": { "200": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/GetPayoutResponse" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "404": { "description": "`payoutId` not found" } }, "security": [], "summary": "Get payout by ID" } }, "/withdrawals": { "get": { "description": "Get published withdrawal transactions. Results are returned in pages, with paging being specified by request headers.", "operationId": "getWithdrawals", "parameters": [ { "in": "query", "name": "roleCurrency", "schema": { "items": { "description": "The hex-encoded minting policy ID for a native Cardano token", "pattern": "^[a-fA-F0-9]*$", "type": "string" }, "type": "array" } }, { "in": "header", "name": "Range", "required": false, "schema": { "type": "string" } } ], "responses": { "206": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/GetWithdrawalsResponse" } } }, "description": "", "headers": { "Accept-Ranges": { "schema": { "items": { "enum": [ "withdrawalId" ], "type": "string" }, "type": "array" } }, "Content-Range": { "schema": { "type": "string" } }, "Next-Range": { "schema": { "type": "string" } }, "Total-Count": { "schema": { "maximum": 9223372036854775807, "minimum": -9223372036854775808, "type": "integer" } }, "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `Range` or `roleCurrency`" } }, "security": [], "summary": "Get withdrawals" }, "post": { "description": "Build an unsigned (Cardano) transaction body which withdraws available payouts from a role payout validator. This unsigned transaction must be signed by a wallet (such as a CIP-30 or CIP-45 wallet) before being submitted. To submit the signed transaction, use the PUT /withdrawals/{withdrawalId} endpoint.", "operationId": "withdrawPayouts", "parameters": [ { "in": "header", "name": "X-Change-Address", "required": true, "schema": { "description": "A cardano address, in Bech32 format", "example": "addr1w94f8ywk4fg672xasahtk4t9k6w3aql943uxz5rt62d4dvq8evxaf", "type": "string" } }, { "in": "header", "name": "X-Address", "required": false, "schema": { "description": "A comma-separated list of values", "type": "string" } }, { "in": "header", "name": "X-Collateral-UTxO", "required": false, "schema": { "description": "A comma-separated list of values", "type": "string" } } ], "requestBody": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/PostWithdrawalsRequest" } } } }, "responses": { "201": { "content": { "application/vendor.iog.marlowe-runtime.withdraw-tx-json": { "schema": { "$ref": "#/components/schemas/WithdrawPayoutsResponse" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `X-Collateral-UTxO` or `X-Address` or `X-Change-Address` or `body`" } }, "security": [], "summary": "Withdraw payouts" } }, "/withdrawals/{withdrawalId}": { "get": { "operationId": "getWithdrawalById", "parameters": [ { "in": "path", "name": "withdrawalId", "required": true, "schema": { "description": "The hex-encoded identifier of a Cardano transaction", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" } } ], "responses": { "200": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/Withdrawal" } } }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "404": { "description": "`withdrawalId` not found" } }, "security": [], "summary": "Get withdrawal by ID" }, "put": { "description": "Submit a signed (Cardano) transaction that withdraws available payouts from a role payout validator. The transaction must have originally been created by the POST /withdrawals endpoint. This endpoint will respond when the transaction is submitted successfully to the local node, which means it will not wait for the transaction to be published in a block. Use the GET /withdrawals/{withdrawalId} endpoint to poll the on-chain status.", "operationId": "submitWithdrawal", "parameters": [ { "in": "path", "name": "withdrawalId", "required": true, "schema": { "description": "The hex-encoded identifier of a Cardano transaction", "pattern": "^[a-fA-F0-9]{64}$", "type": "string" } } ], "requestBody": { "content": { "application/json;charset=utf-8": { "schema": { "$ref": "#/components/schemas/TextEnvelope" } } } }, "responses": { "202": { "content": { "application/json;charset=utf-8": {} }, "description": "", "headers": { "X-Network-Id": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "type": "string" }, { "type": "integer" } ] } }, "X-Node-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Chain-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Tip": { "schema": { "description": "The latest known point in the chain on a peer.", "oneOf": [ { "properties": { "genesisTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "genesisTimeUTC" ], "type": "object" }, { "properties": { "blockHeader": { "$ref": "#/components/schemas/BlockHeader" }, "slotTimeUTC": { "format": "yyyy-mm-ddThh:MM:ssZ", "type": "string" } }, "required": [ "blockHeader", "slotTimeUTC" ], "type": "object" } ] } }, "X-Runtime-Version": { "schema": { "pattern": "^\\d+(\\.\\d+)*$", "type": "string" } } } }, "400": { "description": "Invalid `body`" }, "404": { "description": "`withdrawalId` not found" } }, "security": [], "summary": "Submit payout withdrawal" } } }, "servers": [ { "url": "https://marlowe-runtime-preprod-web.scdev.aws.iohkdev.io" }, { "url": "https://marlowe-runtime-preview-web.scdev.aws.iohkdev.io" }, { "url": "https://marlowe-runtime-mainnet-web.scdev.aws.iohkdev.io" }, { "url": "http://localhost:3780" } ] }