mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 20:54:20 +01:00
Ocean connection support (#9)
* Update protos & Add ocean protos * Add adapters & config entry for ocean wallet addr * Update deps
This commit is contained in:
committed by
GitHub
parent
19cbaeba40
commit
b0bd610944
326
api-spec/openapi/swagger/coordinator/v1/service.swagger.json
Normal file
326
api-spec/openapi/swagger/coordinator/v1/service.swagger.json
Normal file
@@ -0,0 +1,326 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "coordinator/v1/service.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "CoordinatorService"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/v1/payment/claim": {
|
||||
"post": {
|
||||
"operationId": "CoordinatorService_ClaimPayment",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1ClaimPaymentResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1ClaimPaymentRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"CoordinatorService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/payment/finalize": {
|
||||
"post": {
|
||||
"operationId": "CoordinatorService_FinalizePayment",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1FinalizePaymentResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1FinalizePaymentRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"CoordinatorService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/payment/register": {
|
||||
"post": {
|
||||
"operationId": "CoordinatorService_RegisterPayment",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1RegisterPaymentResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1RegisterPaymentRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"CoordinatorService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/round/{txid}": {
|
||||
"get": {
|
||||
"operationId": "CoordinatorService_GetRound",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1GetRoundResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "txid",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"CoordinatorService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/rounds": {
|
||||
"post": {
|
||||
"operationId": "CoordinatorService_ListRounds",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1ListRoundsResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1ListRoundsRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"CoordinatorService"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ClaimPaymentRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Mocks wabisabi's credentials."
|
||||
},
|
||||
"outputs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1Output"
|
||||
},
|
||||
"description": "List of receivers for a registered payment."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ClaimPaymentResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1FinalizePaymentRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"signedVtx": {
|
||||
"type": "string",
|
||||
"description": "Forfeit tx signed also by the user."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1FinalizePaymentResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1GetRoundResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"round": {
|
||||
"$ref": "#/definitions/v1Round"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ListRoundsRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"start": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"end": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ListRoundsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rounds": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1Round"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1Output": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pubkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1RegisterPaymentRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"vtx": {
|
||||
"type": "string",
|
||||
"description": "Unsigned forfeit tx sending all funds back to the ASP."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1RegisterPaymentResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Mocks wabisabi's credentials."
|
||||
},
|
||||
"signedVtx": {
|
||||
"type": "string",
|
||||
"description": "Forfeit tx signed by the ASP."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1Round": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"start": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"end": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"txid": {
|
||||
"type": "string"
|
||||
},
|
||||
"outputs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1Output"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
323
api-spec/openapi/swagger/ocean/v1/account.swagger.json
Normal file
323
api-spec/openapi/swagger/ocean/v1/account.swagger.json
Normal file
@@ -0,0 +1,323 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "ocean/v1/account.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "AccountService"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"TemplateFormat": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"FORMAT_UNSPECIFIED",
|
||||
"FORMAT_DESCRIPTOR",
|
||||
"FORMAT_MINISCRIPT",
|
||||
"FORMAT_IONIO",
|
||||
"FORMAT_RAW"
|
||||
],
|
||||
"default": "FORMAT_UNSPECIFIED"
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1AccountInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"description": "Account namespace."
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Account label."
|
||||
},
|
||||
"derivationPath": {
|
||||
"type": "string",
|
||||
"description": "Derivation path."
|
||||
},
|
||||
"xpubs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Xpubs."
|
||||
},
|
||||
"masterBlindingKey": {
|
||||
"type": "string",
|
||||
"description": "The master blinding key of the account to derive blinding keypairs from."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1BalanceInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirmedBalance": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "Balance of utxos with 1+ confirmations."
|
||||
},
|
||||
"unconfirmedBalance": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "Balance of utxos with no confirmations."
|
||||
},
|
||||
"lockedBalance": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "Balance of locked utxos."
|
||||
},
|
||||
"totalBalance": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "Total balance."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1BalanceResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"balance": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/v1BalanceInfo"
|
||||
},
|
||||
"description": "The balance (total, confirmed, unconfirmed) per each asset."
|
||||
}
|
||||
}
|
||||
},
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1CreateAccountBIP44Response": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"info": {
|
||||
"$ref": "#/definitions/v1AccountInfo",
|
||||
"description": "Info about the new account."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1CreateAccountCustomResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"info": {
|
||||
"$ref": "#/definitions/v1AccountInfo",
|
||||
"description": "Info about the new account."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1CreateAccountMultiSigResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"info": {
|
||||
"$ref": "#/definitions/v1AccountInfo",
|
||||
"description": "Info about the new account."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1DeleteAccountResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1DeriveAddressesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"addresses": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1DeriveChangeAddressesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"addresses": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ListAddressesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"addresses": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ListUtxosResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"spendableUtxos": {
|
||||
"$ref": "#/definitions/v1Utxos",
|
||||
"description": "List of spendable utxos."
|
||||
},
|
||||
"lockedUtxos": {
|
||||
"$ref": "#/definitions/v1Utxos",
|
||||
"description": "List of currently locked utxos."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1SetAccountLabelResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"info": {
|
||||
"$ref": "#/definitions/v1AccountInfo",
|
||||
"description": "Info about the updated account."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1SetAccountTemplateResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1Template": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"format": {
|
||||
"$ref": "#/definitions/TemplateFormat"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1Utxos": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
"description": "Account namespace."
|
||||
},
|
||||
"utxos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1Utxo"
|
||||
},
|
||||
"description": "List of utxos."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
250
api-spec/openapi/swagger/ocean/v1/notification.swagger.json
Normal file
250
api-spec/openapi/swagger/ocean/v1/notification.swagger.json
Normal file
@@ -0,0 +1,250 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "ocean/v1/notification.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "NotificationService"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"$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."
|
||||
},
|
||||
"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"
|
||||
],
|
||||
"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": {
|
||||
"$ref": "#/definitions/v1Utxo"
|
||||
},
|
||||
"description": "List of utxos for which occured the event."
|
||||
}
|
||||
}
|
||||
},
|
||||
"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."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
383
api-spec/openapi/swagger/ocean/v1/transaction.swagger.json
Normal file
383
api-spec/openapi/swagger/ocean/v1/transaction.swagger.json
Normal file
@@ -0,0 +1,383 @@
|
||||
{
|
||||
"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."
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"$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."
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
43
api-spec/openapi/swagger/ocean/v1/types.swagger.json
Normal file
43
api-spec/openapi/swagger/ocean/v1/types.swagger.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "ocean/v1/types.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
195
api-spec/openapi/swagger/ocean/v1/wallet.swagger.json
Normal file
195
api-spec/openapi/swagger/ocean/v1/wallet.swagger.json
Normal file
@@ -0,0 +1,195 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "ocean/v1/wallet.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "WalletService"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"GetInfoResponseNetwork": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"NETWORK_UNSPECIFIED",
|
||||
"NETWORK_MAINNET",
|
||||
"NETWORK_TESTNET",
|
||||
"NETWORK_REGTEST"
|
||||
],
|
||||
"default": "NETWORK_UNSPECIFIED"
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1AccountInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"description": "Account namespace."
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Account label."
|
||||
},
|
||||
"derivationPath": {
|
||||
"type": "string",
|
||||
"description": "Derivation path."
|
||||
},
|
||||
"xpubs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Xpubs."
|
||||
},
|
||||
"masterBlindingKey": {
|
||||
"type": "string",
|
||||
"description": "The master blinding key of the account to derive blinding keypairs from."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1AuthResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"verified": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1BuildInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Number of the version."
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"description": "Hash of the commit."
|
||||
},
|
||||
"date": {
|
||||
"type": "string",
|
||||
"description": "Date of the commit."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1ChangePasswordResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1CreateWalletResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1GenSeedResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mnemonic": {
|
||||
"type": "string",
|
||||
"description": "A mnemonic from where deriving signing and blinding key pairs."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1GetInfoResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"network": {
|
||||
"$ref": "#/definitions/GetInfoResponseNetwork",
|
||||
"title": "The Liquid network of the wallet"
|
||||
},
|
||||
"nativeAsset": {
|
||||
"type": "string",
|
||||
"description": "The Liquid Bitcoin (LBTC) asset hash of the network."
|
||||
},
|
||||
"rootPath": {
|
||||
"type": "string",
|
||||
"description": "The root derivation path of the HD wallet."
|
||||
},
|
||||
"birthdayBlockHash": {
|
||||
"type": "string",
|
||||
"description": "The hash of the block at wallet creation time."
|
||||
},
|
||||
"birthdayBlockHeight": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "The height of the block at wallet creation time."
|
||||
},
|
||||
"accounts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1AccountInfo"
|
||||
},
|
||||
"description": "List containing info about the wallet accounts."
|
||||
},
|
||||
"buildInfo": {
|
||||
"$ref": "#/definitions/v1BuildInfo",
|
||||
"description": "Info about the current version of the ocean wallet."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1LockResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1RestoreWalletResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "String message returned within the process."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1StatusResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"initialized": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the wallet is initialized with seeds."
|
||||
},
|
||||
"synced": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the wallet is in sync, meaning it's keeping track of every utxo\nof every account."
|
||||
},
|
||||
"unlocked": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the wallet is unlocked."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1UnlockResponse": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user