mirror of
https://github.com/aljazceru/ark.git
synced 2026-01-20 20:24:23 +01:00
* Validate connectors client-side when sending offchain * Minor fixes * validate connector input in forfeit txs --------- Co-authored-by: Louis <louis@vulpem.com>
599 lines
13 KiB
JSON
599 lines
13 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "ark/v1/service.proto",
|
|
"version": "version not set"
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "ArkService"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/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",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1GetInfoResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"ArkService"
|
|
]
|
|
}
|
|
},
|
|
"/v1/onboard": {
|
|
"post": {
|
|
"operationId": "ArkService_Onboard",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1OnboardResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1OnboardRequest"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"ArkService"
|
|
]
|
|
}
|
|
},
|
|
"/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/finalize": {
|
|
"post": {
|
|
"operationId": "ArkService_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": [
|
|
"ArkService"
|
|
]
|
|
}
|
|
},
|
|
"/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/ping/{paymentId}": {
|
|
"get": {
|
|
"operationId": "ArkService_Ping",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1PingResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "paymentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": [
|
|
"ArkService"
|
|
]
|
|
}
|
|
},
|
|
"/v1/round/{txid}": {
|
|
"get": {
|
|
"operationId": "ArkService_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": [
|
|
"ArkService"
|
|
]
|
|
}
|
|
},
|
|
"/v1/vtxos/{address}": {
|
|
"get": {
|
|
"operationId": "ArkService_ListVtxos",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1ListVtxosResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": [
|
|
"ArkService"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/protobufAny"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"v1FinalizePaymentRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"signedForfeitTxs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Forfeit txs signed by the user."
|
|
}
|
|
}
|
|
},
|
|
"v1FinalizePaymentResponse": {
|
|
"type": "object"
|
|
},
|
|
"v1GetEventStreamResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"roundFinalization": {
|
|
"$ref": "#/definitions/v1RoundFinalizationEvent"
|
|
},
|
|
"roundFinalized": {
|
|
"$ref": "#/definitions/v1RoundFinalizedEvent"
|
|
},
|
|
"roundFailed": {
|
|
"$ref": "#/definitions/v1RoundFailed"
|
|
}
|
|
}
|
|
},
|
|
"v1GetInfoResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pubkey": {
|
|
"type": "string"
|
|
},
|
|
"roundLifetime": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"unilateralExitDelay": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"v1GetRoundResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"round": {
|
|
"$ref": "#/definitions/v1Round"
|
|
}
|
|
}
|
|
},
|
|
"v1Input": {
|
|
"type": "object",
|
|
"properties": {
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"vout": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
},
|
|
"v1ListVtxosResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"vtxos": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/v1Vtxo"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1Node": {
|
|
"type": "object",
|
|
"properties": {
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"tx": {
|
|
"type": "string"
|
|
},
|
|
"parentTxid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1OnboardRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"boardingTx": {
|
|
"type": "string"
|
|
},
|
|
"congestionTree": {
|
|
"$ref": "#/definitions/v1Tree"
|
|
},
|
|
"userPubkey": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1OnboardResponse": {
|
|
"type": "object"
|
|
},
|
|
"v1Output": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string",
|
|
"description": "Either the offchain or onchain address."
|
|
},
|
|
"amount": {
|
|
"type": "string",
|
|
"format": "uint64",
|
|
"description": "Amount to send in satoshis."
|
|
}
|
|
}
|
|
},
|
|
"v1PingResponse": {
|
|
"type": "object"
|
|
},
|
|
"v1RegisterPaymentRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"inputs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/v1Input"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1RegisterPaymentResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Mocks wabisabi's credentials."
|
|
}
|
|
}
|
|
},
|
|
"v1Round": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"start": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"txid": {
|
|
"type": "string"
|
|
},
|
|
"congestionTree": {
|
|
"$ref": "#/definitions/v1Tree"
|
|
}
|
|
}
|
|
},
|
|
"v1RoundFailed": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1RoundFinalizationEvent": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"poolTx": {
|
|
"type": "string"
|
|
},
|
|
"forfeitTxs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"congestionTree": {
|
|
"$ref": "#/definitions/v1Tree"
|
|
},
|
|
"connectors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1RoundFinalizedEvent": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"poolTxid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1Tree": {
|
|
"type": "object",
|
|
"properties": {
|
|
"levels": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/v1TreeLevel"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1TreeLevel": {
|
|
"type": "object",
|
|
"properties": {
|
|
"nodes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/v1Node"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1Vtxo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"outpoint": {
|
|
"$ref": "#/definitions/v1Input"
|
|
},
|
|
"receiver": {
|
|
"$ref": "#/definitions/v1Output"
|
|
},
|
|
"spent": {
|
|
"type": "boolean"
|
|
},
|
|
"poolTxid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|