Skip to content

Commit 7f937e8

Browse files
authored
Vars and fields renaming (#387)
* Rename asp > server * Rename pool > round * Consolidate naming for pubkey/prvkey vars and types * Fix * Fix * Fix wasm * Rename congestionTree > vtxoTree * Fix wasm * Rename payment > request * Rename congestionTree > vtxoTree after syncing with master * Fix Send API in SDK * Fix wasm * Fix wasm * Fixes * Fixes after review * Fix * Fix naming * Fix * Fix e2e tests
1 parent 12d666b commit 7f937e8

File tree

109 files changed

+2289
-2322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2289
-2322
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ For a quick-start with Docker, head over to our [Quick Start guide](https://arkd
3232
## Repository Structure
3333

3434
- [`api-spec`](./api-spec/): Ark Protocol Buffer API specification
35-
- [`client`](./client/): `ark` Single-key wallet CLI for interacting with the ASP
35+
- [`client`](./client/): `ark` Single-key wallet CLI for interacting with the server
3636
- [`common`](./common/): Shared code between the server and client
37-
- [`pkg/client-sdk`](./pkg/client-sdk/): Go SDK for interacting with ASPs running the Ark protocol. It offers WASM bindings to interact with the SDK from the browser and other environments.
38-
- [`server`](./server/): `arkd` Ark Service Provider (ASP) - the always-on daemon
37+
- [`pkg/client-sdk`](./pkg/client-sdk/): Go SDK for interacting with servers running the Ark protocol. It offers WASM bindings to interact with the SDK from the browser and other environments.
38+
- [`server`](./server/): `arkd` Ark server - the always-on daemon
3939

4040
## Development
4141

api-spec/openapi/swagger/ark/v1/service.swagger.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
]
164164
}
165165
},
166-
"/v1/round/ping/{paymentId}": {
166+
"/v1/round/ping/{requestId}": {
167167
"get": {
168168
"operationId": "ArkService_Ping",
169169
"responses": {
@@ -182,7 +182,8 @@
182182
},
183183
"parameters": [
184184
{
185-
"name": "paymentId",
185+
"name": "requestId",
186+
"description": "The id used to register inputs and ouptuts.",
186187
"in": "path",
187188
"required": true,
188189
"type": "string"
@@ -770,7 +771,7 @@
770771
"title": "VTXO outpoint signed with script's secret key"
771772
}
772773
},
773-
"description": "This message is used to prove to the ASP that the user controls the vtxo without revealing the whole VTXO taproot tree."
774+
"description": "This message is used to prove to the server that the user controls the vtxo without revealing the whole VTXO taproot tree."
774775
},
775776
"v1PingResponse": {
776777
"type": "object"
@@ -821,26 +822,24 @@
821822
"v1RegisterInputsForNextRoundResponse": {
822823
"type": "object",
823824
"properties": {
824-
"id": {
825-
"type": "string",
826-
"description": "Mocks wabisabi's blinded credentials."
825+
"requestId": {
826+
"type": "string"
827827
}
828828
}
829829
},
830830
"v1RegisterOutputsForNextRoundRequest": {
831831
"type": "object",
832832
"properties": {
833-
"id": {
834-
"type": "string",
835-
"description": "Mocks wabisabi's blinded credentials."
833+
"requestId": {
834+
"type": "string"
836835
},
837836
"outputs": {
838837
"type": "array",
839838
"items": {
840839
"type": "object",
841840
"$ref": "#/definitions/v1Output"
842841
},
843-
"description": "List of receivers for a registered payment."
842+
"description": "List of receivers for to convert to leaves in the next VTXO tree."
844843
}
845844
}
846845
},
@@ -1058,7 +1057,7 @@
10581057
},
10591058
"signedRoundTx": {
10601059
"type": "string",
1061-
"description": "If payment has boarding input, the user must sign the associated inputs."
1060+
"description": "The user has to sign also the round tx if he registerd a boarding UTXO."
10621061
}
10631062
}
10641063
},

api-spec/protobuf/ark/v1/service.proto

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ service ArkService {
1919
};
2020
};
2121

22-
/* In-Round Payment APIs */
22+
/* In-Round Transaction APIs */
2323

2424
rpc RegisterInputsForNextRound(RegisterInputsForNextRoundRequest) returns (RegisterInputsForNextRoundResponse) {
2525
option (google.api.http) = {
@@ -58,10 +58,12 @@ service ArkService {
5858
};
5959
rpc Ping(PingRequest) returns (PingResponse) {
6060
option (google.api.http) = {
61-
get: "/v1/round/ping/{payment_id}"
61+
get: "/v1/round/ping/{request_id}"
6262
};
6363
};
6464

65+
/* Out-of-Round Transaction APIs */
66+
6567
rpc SubmitRedeemTx(SubmitRedeemTxRequest) returns (SubmitRedeemTxResponse) {
6668
option (google.api.http) = {
6769
post: "/v1/redeem-tx"
@@ -134,22 +136,20 @@ message GetBoardingAddressResponse {
134136
}
135137
}
136138

137-
/* In-Round Payment API messages */
139+
/* In-Round Transaction API messages */
138140

139141
message RegisterInputsForNextRoundRequest {
140142
repeated Input inputs = 1;
141143
optional string ephemeral_pubkey = 2;
142144
repeated string notes = 3;
143145
}
144146
message RegisterInputsForNextRoundResponse {
145-
// Mocks wabisabi's blinded credentials.
146-
string id = 1;
147+
string request_id = 1;
147148
}
148149

149150
message RegisterOutputsForNextRoundRequest {
150-
// Mocks wabisabi's blinded credentials.
151-
string id = 1;
152-
// List of receivers for a registered payment.
151+
string request_id = 1;
152+
// List of receivers for to convert to leaves in the next VTXO tree.
153153
repeated Output outputs = 2;
154154
}
155155
message RegisterOutputsForNextRoundResponse {}
@@ -171,7 +171,7 @@ message SubmitTreeSignaturesResponse {}
171171
message SubmitSignedForfeitTxsRequest {
172172
// Forfeit txs signed by the user.
173173
repeated string signed_forfeit_txs = 1;
174-
// If payment has boarding input, the user must sign the associated inputs.
174+
// The user has to sign also the round tx if he registerd a boarding UTXO.
175175
optional string signed_round_tx = 2;
176176
}
177177
message SubmitSignedForfeitTxsResponse {}
@@ -188,7 +188,8 @@ message GetEventStreamResponse {
188188
}
189189

190190
message PingRequest {
191-
string payment_id = 1;
191+
// The id used to register inputs and ouptuts.
192+
string request_id = 1;
192193
}
193194
message PingResponse {}
194195

@@ -343,7 +344,7 @@ message RedeemTransaction {
343344
repeated Vtxo spendable_vtxos = 3;
344345
}
345346

346-
// This message is used to prove to the ASP that the user controls the vtxo without revealing the whole VTXO taproot tree.
347+
// This message is used to prove to the server that the user controls the vtxo without revealing the whole VTXO taproot tree.
347348
message OwnershipProof {
348349
string control_block = 1;
349350
string script = 2;

0 commit comments

Comments
 (0)