Files
ark/api-spec/openapi/swagger/ocean/v1/notification.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

266 lines
6.7 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "ocean/v1/notification.proto",
"version": "version not set"
},
"tags": [
{
"name": "NotificationService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"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": {}
},
"v1AddWebhookResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the new webhook."
}
}
},
"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."
}
}
},
"v1ListWebhooksResponse": {
"type": "object",
"properties": {
"webhookInfo": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1WebhookInfo"
},
"description": "The list of info about the webhooks regitered for an action."
}
}
},
"v1RemoveWebhookResponse": {
"type": "object"
},
"v1TransactionNotificationsResponse": {
"type": "object",
"properties": {
"eventType": {
"$ref": "#/definitions/v1TxEventType",
"description": "Tx event type."
},
"accountNames": {
"type": "array",
"items": {
"type": "string"
},
"description": "Account names."
},
"txhex": {
"type": "string",
"description": "Tx in hex format."
},
"txid": {
"type": "string",
"description": "Txid of transaction."
},
"blockDetails": {
"$ref": "#/definitions/v1BlockDetails",
"description": "Details of the block including the tx."
}
}
},
"v1TxEventType": {
"type": "string",
"enum": [
"TX_EVENT_TYPE_UNSPECIFIED",
"TX_EVENT_TYPE_BROADCASTED",
"TX_EVENT_TYPE_UNCONFIRMED",
"TX_EVENT_TYPE_CONFIRMED"
],
"default": "TX_EVENT_TYPE_UNSPECIFIED",
"description": " - TX_EVENT_TYPE_BROADCASTED: Tx broadcasted.\n - TX_EVENT_TYPE_UNCONFIRMED: Tx unconfirmed.\n - TX_EVENT_TYPE_CONFIRMED: Tx confirmed."
},
"v1UnwatchExternalScriptResponse": {
"type": "object"
},
"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."
}
}
},
"v1UtxoEventType": {
"type": "string",
"enum": [
"UTXO_EVENT_TYPE_UNSPECIFIED",
"UTXO_EVENT_TYPE_NEW",
"UTXO_EVENT_TYPE_CONFIRMED",
"UTXO_EVENT_TYPE_LOCKED",
"UTXO_EVENT_TYPE_UNLOCKED",
"UTXO_EVENT_TYPE_SPENT",
"UTXO_EVENT_TYPE_CONFIRMED_SPENT"
],
"default": "UTXO_EVENT_TYPE_UNSPECIFIED"
},
"v1UtxoStatus": {
"type": "object",
"properties": {
"txid": {
"type": "string"
},
"blockInfo": {
"$ref": "#/definitions/v1BlockDetails"
},
"txhex": {
"type": "string"
}
}
},
"v1UtxosNotificationsResponse": {
"type": "object",
"properties": {
"eventType": {
"$ref": "#/definitions/v1UtxoEventType",
"description": "The event's type occured for the utxos."
},
"utxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Utxo"
},
"description": "List of utxos for which occured the event."
}
}
},
"v1WatchExternalScriptResponse": {
"type": "object",
"properties": {
"label": {
"type": "string"
}
}
},
"v1WebhookEventType": {
"type": "string",
"enum": [
"WEBHOOK_EVENT_TYPE_UNSPECIFIED",
"WEBHOOK_EVENT_TYPE_TRANSACTION",
"WEBHOOK_EVENT_TYPE_UTXO"
],
"default": "WEBHOOK_EVENT_TYPE_UNSPECIFIED",
"description": " - WEBHOOK_EVENT_TYPE_TRANSACTION: Receive notification about transactions.\n - WEBHOOK_EVENT_TYPE_UTXO: Receive notifications about utxos."
},
"v1WebhookInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the webhook."
},
"endpoint": {
"type": "string",
"description": "The endpoint of the external service to reach."
},
"isSecured": {
"type": "boolean",
"description": "Whether the outgoing requests are authenticated."
}
}
}
}
}