API Renaming (#334)

* Update service.proto

Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>

* Update buf.yaml

* Fix API order and naming

* Update server

* Update sdk

* Revert update to buf.yaml

* Fix permissions

---------

Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>
Co-authored-by: Marco Argentieri <3596602+tiero@users.noreply.github.com>
This commit is contained in:
Pietralberto Mazza
2024-09-26 19:21:41 +02:00
committed by GitHub
parent 7676b3ddd2
commit f36a747c59
42 changed files with 6501 additions and 3869 deletions

View File

@@ -48,37 +48,6 @@
]
}
},
"/v1/events": {
"get": {
"operationId": "ArkService_GetEventStream",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/v1GetEventStreamResponse"
},
"error": {
"$ref": "#/definitions/rpcStatus"
}
},
"title": "Stream result of v1GetEventStreamResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"ArkService"
]
}
},
"/v1/info": {
"get": {
"operationId": "ArkService_GetInfo",
@@ -133,38 +102,6 @@
]
}
},
"/v1/payment/claim": {
"post": {
"operationId": "ArkService_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": [
"ArkService"
]
}
},
"/v1/payment/complete": {
"post": {
"operationId": "ArkService_CompletePayment",
@@ -197,14 +134,45 @@
]
}
},
"/v1/payment/finalize": {
"post": {
"operationId": "ArkService_FinalizePayment",
"/v1/round/events": {
"get": {
"operationId": "ArkService_GetEventStream",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/v1GetEventStreamResponse"
},
"error": {
"$ref": "#/definitions/rpcStatus"
}
},
"title": "Stream result of v1GetEventStreamResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"ArkService"
]
}
},
"/v1/round/id/{id}": {
"get": {
"operationId": "ArkService_GetRoundById",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1FinalizePaymentResponse"
"$ref": "#/definitions/v1GetRoundByIdResponse"
}
},
"default": {
@@ -216,12 +184,10 @@
},
"parameters": [
{
"name": "body",
"in": "body",
"name": "id",
"in": "path",
"required": true,
"schema": {
"$ref": "#/definitions/v1FinalizePaymentRequest"
}
"type": "string"
}
],
"tags": [
@@ -229,103 +195,7 @@
]
}
},
"/v1/payment/register": {
"post": {
"operationId": "ArkService_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": [
"ArkService"
]
}
},
"/v1/payment/tree/nonces": {
"post": {
"operationId": "ArkService_SendTreeNonces",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1SendTreeNoncesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1SendTreeNoncesRequest"
}
}
],
"tags": [
"ArkService"
]
}
},
"/v1/payment/tree/signatures": {
"post": {
"operationId": "ArkService_SendTreeSignatures",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1SendTreeSignaturesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1SendTreeSignaturesRequest"
}
}
],
"tags": [
"ArkService"
]
}
},
"/v1/ping/{paymentId}": {
"/v1/round/ping/{paymentId}": {
"get": {
"operationId": "ArkService_Ping",
"responses": {
@@ -355,14 +225,14 @@
]
}
},
"/v1/round/id/{id}": {
"get": {
"operationId": "ArkService_GetRoundById",
"/v1/round/registerInputs": {
"post": {
"operationId": "ArkService_RegisterInputsForNextRound",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetRoundByIdResponse"
"$ref": "#/definitions/v1RegisterInputsForNextRoundResponse"
}
},
"default": {
@@ -374,10 +244,140 @@
},
"parameters": [
{
"name": "id",
"in": "path",
"name": "body",
"in": "body",
"required": true,
"type": "string"
"schema": {
"$ref": "#/definitions/v1RegisterInputsForNextRoundRequest"
}
}
],
"tags": [
"ArkService"
]
}
},
"/v1/round/registerOutputs": {
"post": {
"operationId": "ArkService_RegisterOutputsForNextRound",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1RegisterOutputsForNextRoundResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1RegisterOutputsForNextRoundRequest"
}
}
],
"tags": [
"ArkService"
]
}
},
"/v1/round/submitForfeitTxs": {
"post": {
"operationId": "ArkService_SubmitSignedForfeitTxs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1SubmitSignedForfeitTxsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1SubmitSignedForfeitTxsRequest"
}
}
],
"tags": [
"ArkService"
]
}
},
"/v1/round/tree/submitNonces": {
"post": {
"operationId": "ArkService_SubmitTreeNonces",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1SubmitTreeNoncesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1SubmitTreeNoncesRequest"
}
}
],
"tags": [
"ArkService"
]
}
},
"/v1/round/tree/submitSignatures": {
"post": {
"operationId": "ArkService_SubmitTreeSignatures",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1SubmitTreeSignaturesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1SubmitTreeSignaturesRequest"
}
}
],
"tags": [
@@ -475,26 +475,6 @@
}
}
},
"v1ClaimPaymentRequest": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Mocks wabisabi's credentials."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Output"
},
"description": "List of receivers for a registered payment."
}
}
},
"v1ClaimPaymentResponse": {
"type": "object"
},
"v1CompletePaymentRequest": {
"type": "object",
"properties": {
@@ -546,25 +526,6 @@
}
}
},
"v1FinalizePaymentRequest": {
"type": "object",
"properties": {
"signedForfeitTxs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Forfeit txs signed by the user."
},
"signedRoundTx": {
"type": "string",
"description": "If payment has boarding input, the user must sign the associated inputs."
}
}
},
"v1FinalizePaymentResponse": {
"type": "object"
},
"v1GetBoardingAddressRequest": {
"type": "object",
"properties": {
@@ -632,6 +593,12 @@
"boardingDescriptorTemplate": {
"type": "string"
},
"vtxoDescriptorTemplates": {
"type": "array",
"items": {
"type": "string"
}
},
"forfeitAddress": {
"type": "string"
}
@@ -714,16 +681,15 @@
"properties": {
"address": {
"type": "string",
"title": "onchain"
},
"descriptor": {
"type": "string",
"title": "offchain"
"title": "onchain or off-chain"
},
"amount": {
"type": "string",
"format": "uint64",
"description": "Amount to send in satoshis."
},
"descriptor": {
"type": "string"
}
}
},
@@ -761,7 +727,7 @@
}
}
},
"v1RegisterPaymentRequest": {
"v1RegisterInputsForNextRoundRequest": {
"type": "object",
"properties": {
"inputs": {
@@ -776,15 +742,35 @@
}
}
},
"v1RegisterPaymentResponse": {
"v1RegisterInputsForNextRoundResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Mocks wabisabi's credentials."
"description": "Mocks wabisabi's blinded credentials."
}
}
},
"v1RegisterOutputsForNextRoundRequest": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Mocks wabisabi's blinded credentials."
},
"outputs": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Output"
},
"description": "List of receivers for a registered payment."
}
}
},
"v1RegisterOutputsForNextRoundResponse": {
"type": "object"
},
"v1Round": {
"type": "object",
"properties": {
@@ -910,7 +896,26 @@
],
"default": "ROUND_STAGE_UNSPECIFIED"
},
"v1SendTreeNoncesRequest": {
"v1SubmitSignedForfeitTxsRequest": {
"type": "object",
"properties": {
"signedForfeitTxs": {
"type": "array",
"items": {
"type": "string"
},
"description": "Forfeit txs signed by the user."
},
"signedRoundTx": {
"type": "string",
"description": "If payment has boarding input, the user must sign the associated inputs."
}
}
},
"v1SubmitSignedForfeitTxsResponse": {
"type": "object"
},
"v1SubmitTreeNoncesRequest": {
"type": "object",
"properties": {
"roundId": {
@@ -924,10 +929,10 @@
}
}
},
"v1SendTreeNoncesResponse": {
"v1SubmitTreeNoncesResponse": {
"type": "object"
},
"v1SendTreeSignaturesRequest": {
"v1SubmitTreeSignaturesRequest": {
"type": "object",
"properties": {
"roundId": {
@@ -941,7 +946,7 @@
}
}
},
"v1SendTreeSignaturesResponse": {
"v1SubmitTreeSignaturesResponse": {
"type": "object"
},
"v1Tree": {