Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
louisinger committed Oct 18, 2024
2 parents 7a8ccbf + b1c9261 commit 1e20a65
Show file tree
Hide file tree
Showing 112 changed files with 5,857 additions and 2,098 deletions.
123 changes: 95 additions & 28 deletions api-spec/openapi/swagger/ark/v1/service.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,37 @@
]
}
},
"/v1/transactions": {
"get": {
"operationId": "ArkService_GetTransactionsStream",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/v1GetTransactionsStreamResponse"
},
"error": {
"$ref": "#/definitions/rpcStatus"
}
},
"title": "Stream result of v1GetTransactionsStreamResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"ArkService"
]
}
},
"/v1/vtxos/{address}": {
"get": {
"operationId": "ArkService_ListVtxos",
Expand Down Expand Up @@ -480,12 +511,6 @@
"properties": {
"signedRedeemTx": {
"type": "string"
},
"signedUnconditionalForfeitTxs": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -517,12 +542,6 @@
"signedRedeemTx": {
"type": "string",
"title": "signed only by the ASP"
},
"usignedUnconditionalForfeitTxs": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -620,6 +639,17 @@
}
}
},
"v1GetTransactionsStreamResponse": {
"type": "object",
"properties": {
"round": {
"$ref": "#/definitions/v1RoundTransaction"
},
"redeem": {
"$ref": "#/definitions/v1RedeemTransaction"
}
}
},
"v1Input": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -693,20 +723,6 @@
}
}
},
"v1PendingPayment": {
"type": "object",
"properties": {
"redeemTx": {
"type": "string"
},
"unconditionalForfeitTxs": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"v1PingResponse": {
"type": "object",
"properties": {
Expand All @@ -727,6 +743,28 @@
}
}
},
"v1RedeemTransaction": {
"type": "object",
"properties": {
"txid": {
"type": "string"
},
"spentVtxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Outpoint"
}
},
"spendableVtxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Vtxo"
}
}
}
},
"v1RegisterInputsForNextRoundRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -896,6 +934,35 @@
],
"default": "ROUND_STAGE_UNSPECIFIED"
},
"v1RoundTransaction": {
"type": "object",
"properties": {
"txid": {
"type": "string"
},
"spentVtxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Outpoint"
}
},
"spendableVtxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Vtxo"
}
},
"claimedBoardingUtxos": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Outpoint"
}
}
}
},
"v1SubmitSignedForfeitTxsRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1001,8 +1068,8 @@
"pending": {
"type": "boolean"
},
"pendingData": {
"$ref": "#/definitions/v1PendingPayment"
"redeemTx": {
"type": "string"
},
"amount": {
"type": "string",
Expand Down
32 changes: 26 additions & 6 deletions api-spec/protobuf/ark/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ service ArkService {
get: "/v1/vtxos/{address}"
};
}
rpc GetTransactionsStream(GetTransactionsStreamRequest) returns (stream GetTransactionsStreamResponse) {
option (google.api.http) = {
get: "/v1/transactions"
};
}
}

message GetInfoRequest {}
Expand Down Expand Up @@ -188,12 +193,10 @@ message CreatePaymentRequest {
}
message CreatePaymentResponse {
string signed_redeem_tx = 1; // signed only by the ASP
repeated string usigned_unconditional_forfeit_txs = 2;
}

message CompletePaymentRequest {
string signed_redeem_tx = 1;
repeated string signed_unconditional_forfeit_txs = 2;
}
message CompletePaymentResponse {}

Expand Down Expand Up @@ -313,11 +316,28 @@ message Vtxo {
int64 expire_at = 6;
bool swept = 7;
bool pending = 8;
PendingPayment pending_data = 9;
string redeem_tx = 9;
uint64 amount = 10;
}

message PendingPayment {
string redeem_tx = 1;
repeated string unconditional_forfeit_txs =2;

message GetTransactionsStreamRequest {}
message GetTransactionsStreamResponse {
oneof tx {
RoundTransaction round = 1;
RedeemTransaction redeem = 2;
}
}

message RoundTransaction {
string txid = 1;
repeated Outpoint spent_vtxos = 2;
repeated Vtxo spendable_vtxos = 3;
repeated Outpoint claimed_boarding_utxos = 4;
}

message RedeemTransaction {
string txid = 1;
repeated Outpoint spent_vtxos = 2;
repeated Vtxo spendable_vtxos = 3;
}
Loading

0 comments on commit 1e20a65

Please sign in to comment.