-
Notifications
You must be signed in to change notification settings - Fork 35
Add BIP0322 Proof of Funds & implement RegisterIntent
#485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 33 commits
8363c65
642d42c
10c6cd3
44d436f
e425913
d588106
5009334
6ddc8a1
3c919f4
dd29de3
ba17504
8e45def
9fe53e1
5bf3662
72ea4b5
37023ec
1f6e8f7
143d4eb
01be2dc
de82c5f
35667e0
d1794b7
d777044
2a5a6e8
f1b4c53
d6fc955
4ea11a6
1df976d
19c669a
05ac1c4
84df665
c8b9d7b
acac47e
4f9c400
c620f94
09f7ea3
96d4fd7
13c61db
6cf527d
79111f5
79c8a30
8733685
029af91
d7d10a4
4eb096e
0cfcd5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -20,9 +20,9 @@ service ArkService { | |||||||
|
||||||||
/* In-Round Transaction APIs */ | ||||||||
|
||||||||
rpc RegisterInputsForNextRound(RegisterInputsForNextRoundRequest) returns (RegisterInputsForNextRoundResponse) { | ||||||||
rpc RegisterIntent(RegisterIntentRequest) returns (RegisterIntentResponse) { | ||||||||
option (google.api.http) = { | ||||||||
post: "/v1/round/registerInputs" | ||||||||
post: "/v1/round/registerIntent" | ||||||||
body: "*" | ||||||||
}; | ||||||||
}; | ||||||||
|
@@ -70,25 +70,11 @@ service ArkService { | |||||||
}; | ||||||||
} | ||||||||
|
||||||||
/* Nostr APIs */ | ||||||||
|
||||||||
rpc GetTransactionsStream(GetTransactionsStreamRequest) returns (stream GetTransactionsStreamResponse) { | ||||||||
option (google.api.http) = { | ||||||||
get: "/v1/transactions" | ||||||||
}; | ||||||||
} | ||||||||
rpc SetNostrRecipient(SetNostrRecipientRequest) returns (SetNostrRecipientResponse) { | ||||||||
option (google.api.http) = { | ||||||||
post: "/v1/vtxo/nostr" | ||||||||
body: "*" | ||||||||
}; | ||||||||
} | ||||||||
rpc DeleteNostrRecipient(DeleteNostrRecipientRequest) returns (DeleteNostrRecipientResponse) { | ||||||||
option (google.api.http) = { | ||||||||
post: "/v1/vtxo/nostr/delete" | ||||||||
body: "*" | ||||||||
}; | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
message GetInfoRequest {} | ||||||||
|
@@ -99,7 +85,7 @@ message GetInfoResponse { | |||||||
int64 round_interval = 4; | ||||||||
string network = 5; | ||||||||
int64 dust = 6; | ||||||||
string boarding_descriptor_template = 7; | ||||||||
int64 boarding_exit_delay = 7; | ||||||||
repeated string vtxo_descriptor_templates = 8; | ||||||||
string forfeit_address = 9; | ||||||||
MarketHour market_hour = 10; | ||||||||
|
@@ -123,11 +109,13 @@ message GetBoardingAddressResponse { | |||||||
|
||||||||
/* In-Round Transaction API messages */ | ||||||||
|
||||||||
message RegisterInputsForNextRoundRequest { | ||||||||
repeated Input inputs = 1; | ||||||||
message RegisterIntentRequest { | ||||||||
// BIP322 signature embeds the outpoints and the proof of funds | ||||||||
Bip322Signature bip322_signature = 1; | ||||||||
repeated string notes = 2; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the "problem" is BIP322 expecting at least one "real" utxo to be signed. If the intent contains only notes, the bip322 proof will be an unsigned, is it a problem ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just the existence of knowing the note should be enough? Plus, we can technically issue notes that are locked to a script with this proposal? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically a note is a preimage, we can migrate existing notes to a script that uses a hashlock There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we do it in another pr, this became too big already |
||||||||
} | ||||||||
message RegisterInputsForNextRoundResponse { | ||||||||
|
||||||||
message RegisterIntentResponse { | ||||||||
string request_id = 1; | ||||||||
} | ||||||||
|
||||||||
|
@@ -200,14 +188,3 @@ message GetTransactionsStreamResponse { | |||||||
RedeemTransaction redeem = 2; | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
message SetNostrRecipientRequest { | ||||||||
string nostr_recipient = 1; | ||||||||
repeated SignedVtxoOutpoint vtxos = 2; | ||||||||
} | ||||||||
message SetNostrRecipientResponse {} | ||||||||
|
||||||||
message DeleteNostrRecipientRequest { | ||||||||
repeated SignedVtxoOutpoint vtxos = 1; | ||||||||
} | ||||||||
message DeleteNostrRecipientResponse {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not replace it, and only add a new RPC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we do remove it in the medium term, it's a redundant rpc and keeps duplicate logic around input proofs