Skip to content

Commit b536a9e

Browse files
authored
New address encoding (#356)
* [common] rework address encoding * new address encoding * replace offchain address by vtxo output key in DB * merge migrations files into init one * fix txbuilder fixtures * fix transaction events
1 parent b1c9261 commit b536a9e

Some content is hidden

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

58 files changed

+2213
-1866
lines changed

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

+15-7
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,17 @@
506506
}
507507
}
508508
},
509+
"v1AsyncPaymentInput": {
510+
"type": "object",
511+
"properties": {
512+
"input": {
513+
"$ref": "#/definitions/v1Input"
514+
},
515+
"forfeitLeafHash": {
516+
"type": "string"
517+
}
518+
}
519+
},
509520
"v1CompletePaymentRequest": {
510521
"type": "object",
511522
"properties": {
@@ -524,7 +535,7 @@
524535
"type": "array",
525536
"items": {
526537
"type": "object",
527-
"$ref": "#/definitions/v1Input"
538+
"$ref": "#/definitions/v1AsyncPaymentInput"
528539
}
529540
},
530541
"outputs": {
@@ -717,9 +728,6 @@
717728
"type": "string",
718729
"format": "uint64",
719730
"description": "Amount to send in satoshis."
720-
},
721-
"descriptor": {
722-
"type": "string"
723731
}
724732
}
725733
},
@@ -1046,9 +1054,6 @@
10461054
"outpoint": {
10471055
"$ref": "#/definitions/v1Outpoint"
10481056
},
1049-
"descriptor": {
1050-
"type": "string"
1051-
},
10521057
"spent": {
10531058
"type": "boolean"
10541059
},
@@ -1074,6 +1079,9 @@
10741079
"amount": {
10751080
"type": "string",
10761081
"format": "uint64"
1082+
},
1083+
"pubkey": {
1084+
"type": "string"
10771085
}
10781086
}
10791087
}

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

+15-12
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,13 @@ message PingResponse {
187187

188188
/* Async Payment API messages */
189189

190+
message AsyncPaymentInput {
191+
Input input = 1;
192+
string forfeit_leaf_hash = 2;
193+
}
194+
190195
message CreatePaymentRequest {
191-
repeated Input inputs = 1;
196+
repeated AsyncPaymentInput inputs = 1;
192197
repeated Output outputs = 2;
193198
}
194199
message CreatePaymentResponse {
@@ -290,7 +295,6 @@ message Input {
290295
message Output {
291296
string address = 1; // onchain or off-chain
292297
uint64 amount = 2; // Amount to send in satoshis.
293-
string descriptor = 3;
294298
}
295299

296300
message Tree {
@@ -309,18 +313,17 @@ message Node {
309313

310314
message Vtxo {
311315
Outpoint outpoint = 1;
312-
string descriptor = 2;
313-
bool spent = 3;
314-
string round_txid = 4;
315-
string spent_by = 5;
316-
int64 expire_at = 6;
317-
bool swept = 7;
318-
bool pending = 8;
319-
string redeem_tx = 9;
320-
uint64 amount = 10;
316+
bool spent = 2;
317+
string round_txid = 3;
318+
string spent_by = 4;
319+
int64 expire_at = 5;
320+
bool swept = 6;
321+
bool pending = 7;
322+
string redeem_tx = 8;
323+
uint64 amount = 9;
324+
string pubkey = 10;
321325
}
322326

323-
324327
message GetTransactionsStreamRequest {}
325328
message GetTransactionsStreamResponse {
326329
oneof tx {

0 commit comments

Comments
 (0)