mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 04:34:19 +01:00
Make the round participants sign the vtxo tree (#271)
* [proto] add APIs to send and receive musig2 signing data * [common] add serialization functions for nonces and signatures * [application] implements tree signing * fix: remove old debug logs * [proto] cleaning * [common] fix musig2.go * [application] fixes and logs * [interface] fix: stop forwarding 2 times the events * [client] add musig2 support + sign the tree when joining a round * [interface] add new APIs into permissions.go * [application][proto] rework PingResponse (return all events type) * [common] split SetKeys into 2 distinct methods * [client] fixes according to musig2.go changes * [sdk] support tree signing + new PingResponse * [sdk] fixes * [application] revert event channel type * [application] use domain.RoundEvent as lastEvent type * [application] remove IsCovenantLess * comments * [application] revert roundAborted changes * [interface] remove bitcointree dependencie
This commit is contained in:
@@ -261,6 +261,70 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/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}": {
|
||||
"get": {
|
||||
"operationId": "ArkService_Ping",
|
||||
@@ -323,7 +387,6 @@
|
||||
},
|
||||
"/v1/round/{txid}": {
|
||||
"get": {
|
||||
"summary": "TODO BTC: signTree rpc",
|
||||
"operationId": "ArkService_GetRound",
|
||||
"responses": {
|
||||
"200": {
|
||||
@@ -502,14 +565,19 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"roundFinalization": {
|
||||
"$ref": "#/definitions/v1RoundFinalizationEvent",
|
||||
"title": "TODO: BTC add \"signTree\" event"
|
||||
"$ref": "#/definitions/v1RoundFinalizationEvent"
|
||||
},
|
||||
"roundFinalized": {
|
||||
"$ref": "#/definitions/v1RoundFinalizedEvent"
|
||||
},
|
||||
"roundFailed": {
|
||||
"$ref": "#/definitions/v1RoundFailed"
|
||||
},
|
||||
"roundSigning": {
|
||||
"$ref": "#/definitions/v1RoundSigningEvent"
|
||||
},
|
||||
"roundSigningNoncesGenerated": {
|
||||
"$ref": "#/definitions/v1RoundSigningNoncesGeneratedEvent"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -649,14 +717,20 @@
|
||||
"v1PingResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"forfeitTxs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"event": {
|
||||
"roundFinalization": {
|
||||
"$ref": "#/definitions/v1RoundFinalizationEvent"
|
||||
},
|
||||
"roundFinalized": {
|
||||
"$ref": "#/definitions/v1RoundFinalizedEvent"
|
||||
},
|
||||
"roundFailed": {
|
||||
"$ref": "#/definitions/v1RoundFailed"
|
||||
},
|
||||
"roundSigning": {
|
||||
"$ref": "#/definitions/v1RoundSigningEvent"
|
||||
},
|
||||
"roundSigningNoncesGenerated": {
|
||||
"$ref": "#/definitions/v1RoundSigningNoncesGeneratedEvent"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -669,6 +743,9 @@
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/v1Input"
|
||||
}
|
||||
},
|
||||
"ephemeralPubkey": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -766,6 +843,34 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1RoundSigningEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"cosignersPubkeys": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"unsignedTree": {
|
||||
"$ref": "#/definitions/v1Tree"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1RoundSigningNoncesGeneratedEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeNonces": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1RoundStage": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -777,6 +882,40 @@
|
||||
],
|
||||
"default": "ROUND_STAGE_UNSPECIFIED"
|
||||
},
|
||||
"v1SendTreeNoncesRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"roundId": {
|
||||
"type": "string"
|
||||
},
|
||||
"publicKey": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeNonces": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1SendTreeNoncesResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1SendTreeSignaturesRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"roundId": {
|
||||
"type": "string"
|
||||
},
|
||||
"publicKey": {
|
||||
"type": "string"
|
||||
},
|
||||
"treeSignatures": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1SendTreeSignaturesResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1Tree": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user