Files
ark/api-spec/openapi/swagger/ocean/v1/transaction.swagger.json
Marco Argentieri f0a90c06ee Move api-spec to root folder (#242)
* api-spec: move the api-spec to root and init go.mod

* go mod tidy

* move buf files in the root as well

* gh action for api-spec changes only

* gh action for api-spec on push and pr
2024-08-13 00:54:06 +02:00

403 lines
9.7 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "ocean/v1/transaction.proto",
"version": "version not set"
},
"tags": [
{
"name": "TransactionService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"SelectUtxosRequestStrategy": {
"type": "string",
"enum": [
"STRATEGY_UNSPECIFIED",
"STRATEGY_BRANCH_BOUND",
"STRATEGY_FRAGMENT"
],
"default": "STRATEGY_UNSPECIFIED",
"description": "Coin-selection algorithm."
},
"googlerpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"v1BlindPsetResponse": {
"type": "object",
"properties": {
"pset": {
"type": "string",
"description": "Updated partial transaction with blinded inputs/outputs in base64 format."
}
}
},
"v1BlockDetails": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "Hash of the block."
},
"height": {
"type": "string",
"format": "uint64",
"description": "Heighth (index) of the block."
},
"timestamp": {
"type": "string",
"format": "int64",
"description": "Timestamp of the block."
}
}
},
"v1BroadcastTransactionResponse": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "Hash of the broadcasted transaction."
}
}
},
"v1BurnResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1ClaimPegInResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1CreatePsetResponse": {
"type": "object",
"properties": {
"pset": {
"type": "string",
"description": "New partial transaction in base64 format."
}
}
},
"v1EstimateFeesResponse": {
"type": "object",
"properties": {
"feeAmount": {
"type": "string",
"format": "uint64"
}
}
},
"v1GetTransactionResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Raw transaction in hex format."
},
"blockDetails": {
"$ref": "#/definitions/v1BlockDetails",
"description": "Deatils of the block including the transaction."
}
}
},
"v1Input": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "Previous output txid."
},
"index": {
"type": "integer",
"format": "int64",
"description": "Previous tx output index."
},
"script": {
"type": "string",
"description": "Prevout script."
},
"scriptsigSize": {
"type": "string",
"format": "uint64",
"description": "Input scriptsig size."
},
"witnessSize": {
"type": "string",
"format": "uint64",
"description": "Input witness size."
}
}
},
"v1LockUtxosResponse": {
"type": "object",
"properties": {
"expirationDate": {
"type": "string",
"format": "int64"
}
}
},
"v1MintResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1Output": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"description": "Asset hash."
},
"amount": {
"type": "string",
"format": "uint64",
"description": "Sent amount."
},
"address": {
"type": "string",
"description": "Address to send funds to."
},
"script": {
"type": "string",
"description": "ScriptPubkey to send funds to (alternative to address)."
},
"blindingPubkey": {
"type": "string",
"description": "Blinding public key to make output confidential (alternative to address)."
}
}
},
"v1PegInAddressResponse": {
"type": "object",
"properties": {
"accountName": {
"type": "string",
"description": "Account name."
},
"mainChainAddress": {
"type": "string",
"description": "Main-chain deposit address to send bitcoin to."
},
"claimScript": {
"type": "string",
"description": "Claim script committed to by the main-chain address."
}
}
},
"v1RemintResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1SelectUtxosResponse": {
"type": "object",
"properties": {
"utxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Utxo"
},
"description": "List of selected utxos."
},
"change": {
"type": "string",
"format": "uint64",
"description": "Eventual change amount if utxos cumulative sum exceeds the target amount."
},
"expirationDate": {
"type": "string",
"format": "int64",
"description": "Expiration date for the selected utxo, which are temporary locked to\nprevent double spending them."
}
}
},
"v1SignPsetResponse": {
"type": "object",
"properties": {
"pset": {
"type": "string",
"description": "Signed partial transaction in base64 format."
}
}
},
"v1SignPsetWithSchnorrKeyResponse": {
"type": "object",
"properties": {
"signedTx": {
"type": "string"
}
}
},
"v1SignTransactionResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Raw signed transaction."
}
}
},
"v1TransferResponse": {
"type": "object",
"properties": {
"txHex": {
"type": "string",
"description": "Signed tx in hex format."
}
}
},
"v1UnblindedInput": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"format": "int64",
"description": "Index of the pset input."
},
"asset": {
"type": "string",
"description": "Revealed prevout asset."
},
"amount": {
"type": "string",
"format": "uint64",
"description": "Revealed prevout amount."
},
"assetBlinder": {
"type": "string",
"description": "Prevout asset blinder."
},
"amountBlinder": {
"type": "string",
"description": "Prevout amount blinder."
}
}
},
"v1UpdatePsetResponse": {
"type": "object",
"properties": {
"pset": {
"type": "string",
"description": "Updated partial transaction in base64 format."
}
}
},
"v1Utxo": {
"type": "object",
"properties": {
"txid": {
"type": "string",
"description": "Txid of the uxo."
},
"index": {
"type": "integer",
"format": "int64",
"description": "Output index."
},
"asset": {
"type": "string",
"description": "Asset."
},
"value": {
"type": "string",
"format": "uint64",
"description": "Value."
},
"script": {
"type": "string",
"description": "Script."
},
"assetBlinder": {
"type": "string",
"description": "Asset blinder for confidential utxo."
},
"valueBlinder": {
"type": "string",
"description": "Value blinder for confidential utxo."
},
"accountName": {
"type": "string",
"description": "Namespace of the account owning the utxo."
},
"spentStatus": {
"$ref": "#/definitions/v1UtxoStatus",
"description": "Info about utxo's spent status."
},
"confirmedStatus": {
"$ref": "#/definitions/v1UtxoStatus",
"description": "Info about utxo's confirmation status."
},
"redeemScript": {
"type": "string",
"description": "Redeem script locking the utxo in case its owned by a multisig account."
}
}
},
"v1UtxoStatus": {
"type": "object",
"properties": {
"txid": {
"type": "string"
},
"blockInfo": {
"$ref": "#/definitions/v1BlockDetails"
},
"txhex": {
"type": "string"
}
}
}
}
}