Skip to content

Commit 7f278b5

Browse files
louisingeraltafan
andauthored
Represent intents as psbts instead of raw txs (#722)
* rework intent proof * update proto * bump to go-sdk "intent-proof-rework" branch * fixes * optional taptree in RegisterIntent * typo and nit fixes * Rename message IntentProof > Intent * Update deps --------- Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
1 parent 6d919d6 commit 7f278b5

File tree

27 files changed

+896
-791
lines changed

27 files changed

+896
-791
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -286,17 +286,6 @@
286286
}
287287
}
288288
},
289-
"v1Bip322Signature": {
290-
"type": "object",
291-
"properties": {
292-
"signature": {
293-
"type": "string"
294-
},
295-
"message": {
296-
"type": "string"
297-
}
298-
}
299-
},
300289
"v1CreateNoteRequest": {
301290
"type": "object",
302291
"properties": {
@@ -415,6 +404,17 @@
415404
}
416405
}
417406
},
407+
"v1Intent": {
408+
"type": "object",
409+
"properties": {
410+
"proof": {
411+
"type": "string"
412+
},
413+
"message": {
414+
"type": "string"
415+
}
416+
}
417+
},
418418
"v1IntentInfo": {
419419
"type": "object",
420420
"properties": {
@@ -452,8 +452,8 @@
452452
"type": "string"
453453
}
454454
},
455-
"proof": {
456-
"$ref": "#/definitions/v1Bip322Signature"
455+
"intent": {
456+
"$ref": "#/definitions/v1Intent"
457457
}
458458
}
459459
},

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -460,17 +460,6 @@
460460
}
461461
}
462462
},
463-
"v1Bip322Signature": {
464-
"type": "object",
465-
"properties": {
466-
"signature": {
467-
"type": "string"
468-
},
469-
"message": {
470-
"type": "string"
471-
}
472-
}
473-
},
474463
"v1ConfirmRegistrationRequest": {
475464
"type": "object",
476465
"properties": {
@@ -485,9 +474,9 @@
485474
"v1DeleteIntentRequest": {
486475
"type": "object",
487476
"properties": {
488-
"proof": {
489-
"$ref": "#/definitions/v1Bip322Signature",
490-
"description": "A BIP322 signature that includes any of the inputs of the intent to be deleted to prove the\nownership of that intent."
477+
"intent": {
478+
"$ref": "#/definitions/v1Intent",
479+
"description": "an intent proof that includes any of the inputs of the intent to be deleted to prove the\nownership of that intent."
491480
}
492481
}
493482
},
@@ -609,6 +598,17 @@
609598
}
610599
}
611600
},
601+
"v1Intent": {
602+
"type": "object",
603+
"properties": {
604+
"proof": {
605+
"type": "string"
606+
},
607+
"message": {
608+
"type": "string"
609+
}
610+
}
611+
},
612612
"v1MarketHour": {
613613
"type": "object",
614614
"properties": {
@@ -646,8 +646,8 @@
646646
"type": "object",
647647
"properties": {
648648
"intent": {
649-
"$ref": "#/definitions/v1Bip322Signature",
650-
"description": "BIP322 signature embeds the outpoints to be spent and new ones to be created, as well as the\nthe proof of funds."
649+
"$ref": "#/definitions/v1Intent",
650+
"description": "an intent proof that embeds the outpoints to be spent and new ones to be created, as well as the\nproof of funds."
651651
}
652652
}
653653
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ message IntentInfo {
143143
repeated IntentInput inputs = 4;
144144
repeated IntentInput boarding_inputs = 5;
145145
repeated string cosigners_public_keys = 6;
146-
Bip322Signature proof = 7;
146+
Intent intent = 7;
147147
}
148148

149149
message Output {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,18 @@ message GetInfoResponse {
143143
}
144144

145145
message RegisterIntentRequest {
146-
// BIP322 signature embeds the outpoints to be spent and new ones to be created, as well as the
147-
// the proof of funds.
148-
Bip322Signature intent = 1;
146+
// an intent proof that embeds the outpoints to be spent and new ones to be created, as well as the
147+
// proof of funds.
148+
Intent intent = 1;
149149
}
150150
message RegisterIntentResponse {
151151
string intent_id = 1;
152152
}
153153

154154
message DeleteIntentRequest {
155-
// A BIP322 signature that includes any of the inputs of the intent to be deleted to prove the
155+
// an intent proof that includes any of the inputs of the intent to be deleted to prove the
156156
// ownership of that intent.
157-
Bip322Signature proof = 1;
157+
Intent intent = 1;
158158
}
159159
message DeleteIntentResponse {}
160160

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ message Tapscripts {
4848
repeated string scripts = 1;
4949
}
5050

51-
message Bip322Signature {
52-
string signature = 1;
51+
message Intent {
52+
string proof = 1;
5353
string message = 2;
5454
}
5555

api-spec/protobuf/gen/ark/v1/admin.pb.go

Lines changed: 88 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-spec/protobuf/gen/ark/v1/service.pb.go

Lines changed: 22 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)