forked from bisq-network/bisq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pb.proto
2330 lines (2004 loc) · 64.3 KB
/
pb.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
syntax = "proto3";
package io.bisq.protobuffer;
//
// Protobuffer v3 definitions of network messages and persisted objects.
//
option java_package = "protobuf";
option java_multiple_files = true;
///////////////////////////////////////////////////////////////////////////////////////////
// Network messages
///////////////////////////////////////////////////////////////////////////////////////////
// Those are messages sent over wire
message NetworkEnvelope {
int32 message_version = 1;
oneof message {
PreliminaryGetDataRequest preliminary_get_data_request = 2;
GetDataResponse get_data_response = 3;
GetUpdatedDataRequest get_updated_data_request = 4;
GetPeersRequest get_peers_request = 5;
GetPeersResponse get_peers_response = 6;
Ping ping = 7;
Pong pong = 8;
OfferAvailabilityRequest offer_availability_request = 9;
OfferAvailabilityResponse offer_availability_response = 10;
RefreshOfferMessage refresh_offer_message = 11;
AddDataMessage add_data_message = 12;
RemoveDataMessage remove_data_message = 13;
RemoveMailboxDataMessage remove_mailbox_data_message = 14;
CloseConnectionMessage close_connection_message = 15;
PrefixedSealedAndSignedMessage prefixed_sealed_and_signed_message = 16;
InputsForDepositTxRequest inputs_for_deposit_tx_request = 17;
InputsForDepositTxResponse inputs_for_deposit_tx_response = 18;
DepositTxMessage deposit_tx_message = 19;
CounterCurrencyTransferStartedMessage counter_currency_transfer_started_message = 20;
PayoutTxPublishedMessage payout_tx_published_message = 21;
OpenNewDisputeMessage open_new_dispute_message = 22;
PeerOpenedDisputeMessage peer_opened_dispute_message = 23;
ChatMessage chat_message = 24;
DisputeResultMessage dispute_result_message = 25;
PeerPublishedDisputePayoutTxMessage peer_published_dispute_payout_tx_message = 26;
PrivateNotificationMessage private_notification_message = 27;
GetBlocksRequest get_blocks_request = 28;
GetBlocksResponse get_blocks_response = 29;
NewBlockBroadcastMessage new_block_broadcast_message = 30;
AddPersistableNetworkPayloadMessage add_persistable_network_payload_message = 31;
AckMessage ack_message = 32;
RepublishGovernanceDataRequest republish_governance_data_request = 33;
NewDaoStateHashMessage new_dao_state_hash_message = 34;
GetDaoStateHashesRequest get_dao_state_hashes_request = 35;
GetDaoStateHashesResponse get_dao_state_hashes_response = 36;
NewProposalStateHashMessage new_proposal_state_hash_message = 37;
GetProposalStateHashesRequest get_proposal_state_hashes_request = 38;
GetProposalStateHashesResponse get_proposal_state_hashes_response = 39;
NewBlindVoteStateHashMessage new_blind_vote_state_hash_message = 40;
GetBlindVoteStateHashesRequest get_blind_vote_state_hashes_request = 41;
GetBlindVoteStateHashesResponse get_blind_vote_state_hashes_response = 42;
BundleOfEnvelopes bundle_of_envelopes = 43;
MediatedPayoutTxSignatureMessage mediated_payout_tx_signature_message = 44;
MediatedPayoutTxPublishedMessage mediated_payout_tx_published_message = 45;
DelayedPayoutTxSignatureRequest delayed_payout_tx_signature_request = 46;
DelayedPayoutTxSignatureResponse delayed_payout_tx_signature_response = 47;
DepositTxAndDelayedPayoutTxMessage deposit_tx_and_delayed_payout_tx_message = 48;
PeerPublishedDelayedPayoutTxMessage peer_published_delayed_payout_tx_message = 49;
RefreshTradeStateRequest refresh_trade_state_request = 50 [deprecated = true];
TraderSignedWitnessMessage trader_signed_witness_message = 51 [deprecated = true];
GetInventoryRequest get_inventory_request = 52;
GetInventoryResponse get_inventory_response = 53;
ShareBuyerPaymentAccountMessage share_buyer_payment_account_message = 54; // Added at 1.7.0
}
}
///////////////////////////////////////////////////////////////////////////////////////////
// Implementations of NetworkEnvelope
///////////////////////////////////////////////////////////////////////////////////////////
message BundleOfEnvelopes {
repeated NetworkEnvelope envelopes = 1;
}
// get data
message PreliminaryGetDataRequest {
int32 nonce = 21; // This was set to 21 instead of 1 in some old commit so we cannot change it.
repeated bytes excluded_keys = 2;
repeated int32 supported_capabilities = 3;
string version = 4;
}
message GetDataResponse {
int32 request_nonce = 1;
bool is_get_updated_data_response = 2;
repeated StorageEntryWrapper data_set = 3;
repeated int32 supported_capabilities = 4;
repeated PersistableNetworkPayload persistable_network_payload_items = 5;
}
message GetUpdatedDataRequest {
NodeAddress sender_node_address = 1;
int32 nonce = 2;
repeated bytes excluded_keys = 3;
string version = 4;
}
// peers
message GetPeersRequest {
NodeAddress sender_node_address = 1;
int32 nonce = 2;
repeated int32 supported_capabilities = 3;
repeated Peer reported_peers = 4;
}
message GetPeersResponse {
int32 request_nonce = 1;
repeated Peer reported_peers = 2;
repeated int32 supported_capabilities = 3;
}
message Ping {
int32 nonce = 1;
int32 last_round_trip_time = 2;
}
message Pong {
int32 request_nonce = 1;
}
// Inventory
message GetInventoryRequest {
string version = 1;
}
message GetInventoryResponse {
map<string, string> inventory = 1;
}
// offer
message OfferAvailabilityRequest {
string offer_id = 1;
PubKeyRing pub_key_ring = 2;
int64 takers_trade_price = 3;
repeated int32 supported_capabilities = 4;
string uid = 5;
bool is_taker_api_user = 6;
}
message OfferAvailabilityResponse {
string offer_id = 1;
AvailabilityResult availability_result = 2;
repeated int32 supported_capabilities = 3;
string uid = 4;
NodeAddress arbitrator = 5;
NodeAddress mediator = 6;
NodeAddress refund_agent = 7;
}
message RefreshOfferMessage {
bytes hash_of_data_and_seq_nr = 1;
bytes signature = 2;
bytes hash_of_payload = 3;
int32 sequence_number = 4;
}
// storage
message AddDataMessage {
StorageEntryWrapper entry = 1;
}
message RemoveDataMessage {
ProtectedStorageEntry protected_storage_entry = 1;
}
message RemoveMailboxDataMessage {
ProtectedMailboxStorageEntry protected_storage_entry = 1;
}
message AddPersistableNetworkPayloadMessage {
PersistableNetworkPayload payload = 1;
}
// misc
message CloseConnectionMessage {
string reason = 1;
}
message AckMessage {
string uid = 1;
NodeAddress sender_node_address = 2;
string source_type = 3; // enum name. e.g. TradeMessage, DisputeMessage,...
string source_msg_class_name = 4;
string source_uid = 5; // uid of source (TradeMessage)
string source_id = 6; // id of source (tradeId, disputeId)
bool success = 7; // true if source message was processed successfully
string error_message = 8; // optional error message if source message processing failed
}
message PrefixedSealedAndSignedMessage {
NodeAddress node_address = 1;
SealedAndSigned sealed_and_signed = 2;
bytes address_prefix_hash = 3;
string uid = 4;
}
// trade
message InputsForDepositTxRequest {
string trade_id = 1;
NodeAddress sender_node_address = 2;
int64 trade_amount = 3;
int64 trade_price = 4;
int64 tx_fee = 5;
int64 taker_fee = 6;
bool is_currency_for_taker_fee_btc = 7;
repeated RawTransactionInput raw_transaction_inputs = 8;
int64 change_output_value = 9;
string change_output_address = 10;
bytes taker_multi_sig_pub_key = 11;
string taker_payout_address_string = 12;
PubKeyRing taker_pub_key_ring = 13;
PaymentAccountPayload taker_payment_account_payload = 14; // Not used anymore from 1.7.0 but kept for backward compatibility
string taker_account_id = 15;
string taker_fee_tx_id = 16;
repeated NodeAddress accepted_arbitrator_node_addresses = 17;
repeated NodeAddress accepted_mediator_node_addresses = 18;
NodeAddress arbitrator_node_address = 19;
NodeAddress mediator_node_address = 20;
string uid = 21;
bytes account_age_witness_signature_of_offer_id = 22;
int64 current_date = 23;
repeated NodeAddress accepted_refund_agent_node_addresses = 24;
NodeAddress refund_agent_node_address = 25;
bytes hash_of_takers_payment_account_payload = 26;
string takers_payout_method_id = 27;
}
message InputsForDepositTxResponse {
string trade_id = 1;
PaymentAccountPayload maker_payment_account_payload = 2; // Not used anymore from 1.7.0 but kept for backward compatibility
string maker_account_id = 3;
string maker_contract_as_json = 4;
string maker_contract_signature = 5;
string maker_payout_address_string = 6;
bytes prepared_deposit_tx = 7;
repeated RawTransactionInput maker_inputs = 8;
bytes maker_multi_sig_pub_key = 9;
NodeAddress sender_node_address = 10;
string uid = 11;
bytes account_age_witness_signature_of_prepared_deposit_tx = 12;
int64 current_date = 13;
int64 lock_time = 14;
bytes hash_of_makers_payment_account_payload = 15;
string makers_payout_method_id = 16;
}
message DelayedPayoutTxSignatureRequest {
string uid = 1;
string trade_id = 2;
NodeAddress sender_node_address = 3;
bytes delayed_payout_tx = 4;
bytes delayed_payout_tx_seller_signature = 5;
}
message DelayedPayoutTxSignatureResponse {
string uid = 1;
string trade_id = 2;
NodeAddress sender_node_address = 3;
bytes delayed_payout_tx_buyer_signature = 4;
bytes deposit_tx = 5;
}
message DepositTxAndDelayedPayoutTxMessage {
string uid = 1;
string trade_id = 2;
NodeAddress sender_node_address = 3;
bytes deposit_tx = 4;
bytes delayed_payout_tx = 5;
PaymentAccountPayload seller_payment_account_payload = 6;
}
message ShareBuyerPaymentAccountMessage {
string uid = 1;
string trade_id = 2;
NodeAddress sender_node_address = 3;
PaymentAccountPayload buyer_payment_account_payload = 4;
}
message DepositTxMessage {
string uid = 1;
string trade_id = 2;
NodeAddress sender_node_address = 3;
bytes deposit_tx_without_witnesses = 4;
}
message PeerPublishedDelayedPayoutTxMessage {
string uid = 1;
string trade_id = 2;
NodeAddress sender_node_address = 3;
}
message CounterCurrencyTransferStartedMessage {
string trade_id = 1;
string buyer_payout_address = 2;
NodeAddress sender_node_address = 3;
bytes buyer_signature = 4;
string counter_currency_tx_id = 5;
string uid = 6;
string counter_currency_extra_data = 7;
}
message FinalizePayoutTxRequest {
string trade_id = 1;
bytes seller_signature = 2;
string seller_payout_address = 3;
NodeAddress sender_node_address = 4;
string uid = 5;
}
message PayoutTxPublishedMessage {
string trade_id = 1;
bytes payout_tx = 2;
NodeAddress sender_node_address = 3;
string uid = 4;
SignedWitness signed_witness = 5; // Added in v1.4.0
}
message MediatedPayoutTxPublishedMessage {
string trade_id = 1;
bytes payout_tx = 2;
NodeAddress sender_node_address = 3;
string uid = 4;
}
message MediatedPayoutTxSignatureMessage {
string uid = 1;
string trade_id = 3;
bytes tx_signature = 2;
NodeAddress sender_node_address = 4;
}
// Deprecated since 1.4.0
message RefreshTradeStateRequest {
string uid = 1 [deprecated = true];
string trade_id = 2 [deprecated = true];
NodeAddress sender_node_address = 3 [deprecated = true];
}
// Deprecated since 1.4.0
message TraderSignedWitnessMessage {
string uid = 1 [deprecated = true];
string trade_id = 2 [deprecated = true];
NodeAddress sender_node_address = 3 [deprecated = true];
SignedWitness signed_witness = 4 [deprecated = true];
}
// dispute
enum SupportType {
ARBITRATION = 0;
MEDIATION = 1;
TRADE = 2;
REFUND = 3;
}
message OpenNewDisputeMessage {
Dispute dispute = 1;
NodeAddress sender_node_address = 2;
string uid = 3;
SupportType type = 4;
}
message PeerOpenedDisputeMessage {
Dispute dispute = 1;
NodeAddress sender_node_address = 2;
string uid = 3;
SupportType type = 4;
}
message ChatMessage {
int64 date = 1;
string trade_id = 2;
int32 trader_id = 3;
bool sender_is_trader = 4;
string message = 5;
repeated Attachment attachments = 6;
bool arrived = 7;
bool stored_in_mailbox = 8;
bool is_system_message = 9;
NodeAddress sender_node_address = 10;
string uid = 11;
string send_message_error = 12;
bool acknowledged = 13;
string ack_error = 14;
SupportType type = 15;
bool was_displayed = 16;
}
message DisputeResultMessage {
string uid = 1;
DisputeResult dispute_result = 2;
NodeAddress sender_node_address = 3;
SupportType type = 4;
}
message PeerPublishedDisputePayoutTxMessage {
string uid = 1;
bytes transaction = 2;
string trade_id = 3;
NodeAddress sender_node_address = 4;
SupportType type = 5;
}
message PrivateNotificationMessage {
string uid = 1;
NodeAddress sender_node_address = 2;
PrivateNotificationPayload private_notification_payload = 3;
}
// DAO
message GetBlocksRequest {
int32 from_block_height = 1;
int32 nonce = 2;
NodeAddress sender_node_address = 3;
repeated int32 supported_capabilities = 4;
}
message GetBlocksResponse {
// Because of the way how PB implements inheritance we need to use the super class as type
repeated BaseBlock raw_blocks = 1;
int32 request_nonce = 2;
}
message NewBlockBroadcastMessage {
// Because of the way how PB implements inheritance we need to use the super class as type
BaseBlock raw_block = 1;
}
message RepublishGovernanceDataRequest {
}
message NewDaoStateHashMessage {
DaoStateHash state_hash = 1;
}
message NewProposalStateHashMessage {
ProposalStateHash state_hash = 1;
}
message NewBlindVoteStateHashMessage {
BlindVoteStateHash state_hash = 1;
}
message GetDaoStateHashesRequest {
int32 height = 1;
int32 nonce = 2;
}
message GetProposalStateHashesRequest {
int32 height = 1;
int32 nonce = 2;
}
message GetBlindVoteStateHashesRequest {
int32 height = 1;
int32 nonce = 2;
}
message GetDaoStateHashesResponse {
repeated DaoStateHash state_hashes = 1;
int32 request_nonce = 2;
}
message GetProposalStateHashesResponse {
repeated ProposalStateHash state_hashes = 1;
int32 request_nonce = 2;
}
message GetBlindVoteStateHashesResponse {
repeated BlindVoteStateHash state_hashes = 1;
int32 request_nonce = 2;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Payload
///////////////////////////////////////////////////////////////////////////////////////////
// core
message NodeAddress {
string host_name = 1;
int32 port = 2;
}
message Peer {
NodeAddress node_address = 1;
int64 date = 2;
repeated int32 supported_capabilities = 3;
}
message PubKeyRing {
bytes signature_pub_key_bytes = 1;
bytes encryption_pub_key_bytes = 2;
reserved 3; // WAS: string pgp_pub_key_as_pem = 3;
}
message SealedAndSigned {
bytes encrypted_secret_key = 1;
bytes encrypted_payload_with_hmac = 2;
bytes signature = 3;
bytes sig_public_key_bytes = 4;
}
// storage
message StoragePayload {
oneof message {
Alert alert = 1;
Arbitrator arbitrator = 2;
Mediator mediator = 3;
Filter filter = 4;
// TradeStatistics trade_statistics = 5 [deprecated = true]; Removed in v.1.4.0
MailboxStoragePayload mailbox_storage_payload = 6;
OfferPayload offer_payload = 7;
TempProposalPayload temp_proposal_payload = 8;
RefundAgent refund_agent = 9;
}
}
message PersistableNetworkPayload {
oneof message {
AccountAgeWitness account_age_witness = 1;
TradeStatistics2 trade_statistics2 = 2 [deprecated = true];
ProposalPayload proposal_payload = 3;
BlindVotePayload blind_vote_payload = 4;
SignedWitness signed_witness = 5;
TradeStatistics3 trade_statistics3 = 6;
}
}
message ProtectedStorageEntry {
StoragePayload storagePayload = 1;
bytes owner_pub_key_bytes = 2;
int32 sequence_number = 3;
bytes signature = 4;
int64 creation_time_stamp = 5;
}
// mailbox
message StorageEntryWrapper {
oneof message {
ProtectedStorageEntry protected_storage_entry = 1;
ProtectedMailboxStorageEntry protected_mailbox_storage_entry = 2;
}
}
message ProtectedMailboxStorageEntry {
ProtectedStorageEntry entry = 1;
bytes receivers_pub_key_bytes = 2;
}
message DataAndSeqNrPair {
StoragePayload payload = 1;
int32 sequence_number = 2;
}
message MailboxMessageList {
repeated MailboxItem mailbox_item = 1;
}
message RemovedPayloadsMap {
map<string, uint64> date_by_hashes = 1;
}
message IgnoredMailboxMap {
map<string, uint64> data = 1;
}
message MailboxItem {
ProtectedMailboxStorageEntry protected_mailbox_storage_entry = 1;
DecryptedMessageWithPubKey decrypted_message_with_pub_key = 2;
}
message DecryptedMessageWithPubKey {
NetworkEnvelope network_envelope = 1;
bytes signature_pub_key_bytes = 2;
}
// misc
message PrivateNotificationPayload {
string message = 1;
string signature_as_base64 = 2;
bytes sig_public_key_bytes = 3;
}
message PaymentAccountFilter {
string payment_method_id = 1;
string get_method_name = 2;
string value = 3;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Storage payload
///////////////////////////////////////////////////////////////////////////////////////////
message Alert {
string message = 1;
string version = 2;
bool is_update_info = 3;
string signature_as_base64 = 4;
bytes owner_pub_key_bytes = 5;
map<string, string> extra_data = 6;
bool is_pre_release_info = 7;
}
message Arbitrator {
NodeAddress node_address = 1;
repeated string language_codes = 2;
int64 registration_date = 3;
string registration_signature = 4;
bytes registration_pub_key = 5;
PubKeyRing pub_key_ring = 6;
bytes btc_pub_key = 7;
string btc_address = 8;
string email_address = 9;
string info = 10;
map<string, string> extra_data = 11;
}
message Mediator {
NodeAddress node_address = 1;
repeated string language_codes = 2;
int64 registration_date = 3;
string registration_signature = 4;
bytes registration_pub_key = 5;
PubKeyRing pub_key_ring = 6;
string email_address = 7;
string info = 8;
map<string, string> extra_data = 9;
}
message RefundAgent {
NodeAddress node_address = 1;
repeated string language_codes = 2;
int64 registration_date = 3;
string registration_signature = 4;
bytes registration_pub_key = 5;
PubKeyRing pub_key_ring = 6;
string email_address = 7;
string info = 8;
map<string, string> extra_data = 9;
}
message Filter {
repeated string node_addresses_banned_from_trading = 1;
repeated string banned_offer_ids = 2;
repeated PaymentAccountFilter banned_payment_accounts = 3;
string signature_as_base64 = 4;
bytes owner_pub_key_bytes = 5;
map<string, string> extra_data = 6;
repeated string banned_currencies = 7;
repeated string banned_payment_methods = 8;
repeated string arbitrators = 9;
repeated string seed_nodes = 10;
repeated string price_relay_nodes = 11;
bool prevent_public_btc_network = 12;
repeated string btc_nodes = 13;
bool disable_dao = 14;
string disable_dao_below_version = 15;
string disable_trade_below_version = 16;
repeated string mediators = 17;
repeated string refundAgents = 18;
repeated string bannedSignerPubKeys = 19;
repeated string btc_fee_receiver_addresses = 20;
int64 creation_date = 21;
string signer_pub_key_as_hex = 22;
repeated string bannedPrivilegedDevPubKeys = 23;
bool disable_auto_conf = 24;
repeated string banned_auto_conf_explorers = 25;
repeated string node_addresses_banned_from_network = 26;
bool disable_api = 27;
bool disable_mempool_validation = 28;
}
// Deprecated
message TradeStatistics2 {
string base_currency = 1 [deprecated = true];
string counter_currency = 2 [deprecated = true];
OfferPayload.Direction direction = 3 [deprecated = true];
int64 trade_price = 4 [deprecated = true];
int64 trade_amount = 5 [deprecated = true];
int64 trade_date = 6 [deprecated = true];
string payment_method_id = 7 [deprecated = true];
int64 offer_date = 8 [deprecated = true];
bool offer_use_market_based_price = 9 [deprecated = true];
double offer_market_price_margin = 10 [deprecated = true];
int64 offer_amount = 11 [deprecated = true];
int64 offer_min_amount = 12 [deprecated = true];
string offer_id = 13 [deprecated = true];
string deposit_tx_id = 14 [deprecated = true];
bytes hash = 15 [deprecated = true];
map<string, string> extra_data = 16 [deprecated = true];
}
message TradeStatistics3 {
string currency = 1;
int64 price = 2;
int64 amount = 3;
string payment_method = 4;
int64 date = 5;
string mediator = 6;
string refund_agent = 7;
bytes hash = 8;
map<string, string> extra_data = 9;
}
message MailboxStoragePayload {
PrefixedSealedAndSignedMessage prefixed_sealed_and_signed_message = 1;
bytes sender_pub_key_for_add_operation_bytes = 2;
bytes owner_pub_key_bytes = 3;
map<string, string> extra_data = 4;
}
message OfferPayload {
enum Direction {
PB_ERROR = 0;
BUY = 1;
SELL = 2;
}
string id = 1;
int64 date = 2;
NodeAddress owner_node_address = 3;
PubKeyRing pub_key_ring = 4;
Direction direction = 5;
int64 price = 6;
double market_price_margin = 7;
bool use_market_based_price = 8;
int64 amount = 9;
int64 min_amount = 10;
string base_currency_code = 11;
string counter_currency_code = 12;
repeated NodeAddress arbitrator_node_addresses = 13 [deprecated = true]; // not used anymore but still required as old clients check for nonNull
repeated NodeAddress mediator_node_addresses = 14 [deprecated = true]; // not used anymore but still required as old clients check for nonNull
string payment_method_id = 15;
string maker_payment_account_id = 16;
string offer_fee_payment_tx_id = 17;
string country_code = 18;
repeated string accepted_country_codes = 19;
string bank_id = 20;
repeated string accepted_bank_ids = 21;
string version_nr = 22;
int64 block_height_at_offer_creation = 23;
int64 tx_fee = 24;
int64 maker_fee = 25;
bool is_currency_for_maker_fee_btc = 26;
int64 buyer_security_deposit = 27;
int64 seller_security_deposit = 28;
int64 max_trade_limit = 29;
int64 max_trade_period = 30;
bool use_auto_close = 31;
bool use_re_open_after_auto_close = 32;
int64 lower_close_price = 33;
int64 upper_close_price = 34;
bool is_private_offer = 35;
string hash_of_challenge = 36;
map<string, string> extra_data = 37;
int32 protocol_version = 38;
}
message AccountAgeWitness {
bytes hash = 1;
int64 date = 2;
}
message SignedWitness {
enum VerificationMethod {
PB_ERROR = 0;
ARBITRATOR = 1;
TRADE = 2;
}
VerificationMethod verification_method = 1;
bytes account_age_witness_hash = 2;
bytes signature = 3;
bytes signer_pub_key = 4;
bytes witness_owner_pub_key = 5;
int64 date = 6;
int64 trade_amount = 7;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Dispute payload
///////////////////////////////////////////////////////////////////////////////////////////
message Dispute {
enum State {
NEEDS_UPGRADE = 0;
NEW = 1;
OPEN = 2;
REOPENED = 3;
CLOSED = 4;
}
string trade_id = 1;
string id = 2;
int32 trader_id = 3;
bool dispute_opener_is_buyer = 4;
bool dispute_opener_is_maker = 5;
int64 opening_date = 6;
PubKeyRing trader_pub_key_ring = 7;
int64 trade_date = 8;
Contract contract = 9;
bytes contract_hash = 10;
bytes deposit_tx_serialized = 11;
bytes payout_tx_serialized = 12;
string deposit_tx_id = 13;
string payout_tx_id = 14;
string contract_as_json = 15;
string maker_contract_signature = 16;
string taker_contract_signature = 17;
PubKeyRing agent_pub_key_ring = 18;
bool is_support_ticket = 19;
repeated ChatMessage chat_message = 20;
bool is_closed = 21;
DisputeResult dispute_result = 22;
string dispute_payout_tx_id = 23;
SupportType support_type = 24;
string mediators_dispute_result = 25;
string delayed_payout_tx_id = 26;
string donation_address_of_delayed_payout_tx = 27;
State state = 28;
int64 trade_period_end = 29;
map<string, string> extra_data = 30;
}
message Attachment {
string file_name = 1;
bytes bytes = 2;
}
message DisputeResult {
enum Winner {
PB_ERROR_WINNER = 0;
BUYER = 1;
SELLER = 2;
}
enum Reason {
PB_ERROR_REASON = 0;
OTHER = 1;
BUG = 2;
USABILITY = 3;
SCAM = 4;
PROTOCOL_VIOLATION = 5;
NO_REPLY = 6;
BANK_PROBLEMS = 7;
OPTION_TRADE = 8;
SELLER_NOT_RESPONDING = 9;
WRONG_SENDER_ACCOUNT = 10;
TRADE_ALREADY_SETTLED = 11;
PEER_WAS_LATE = 12;
}
string trade_id = 1;
int32 trader_id = 2;
Winner winner = 3;
int32 reason_ordinal = 4;
bool tamper_proof_evidence = 5;
bool id_verification = 6;
bool screen_cast = 7;
string summary_notes = 8;
ChatMessage chat_message = 9;
bytes arbitrator_signature = 10;
int64 buyer_payout_amount = 11;
int64 seller_payout_amount = 12;
bytes arbitrator_pub_key = 13;
int64 close_date = 14;
bool is_loser_publisher = 15;
}
///////////////////////////////////////////////////////////////////////////////////////////
// Trade payload
///////////////////////////////////////////////////////////////////////////////////////////
message Contract {
OfferPayload offer_payload = 1;
int64 trade_amount = 2;
int64 trade_price = 3;
string taker_fee_tx_id = 4;
reserved 5; // WAS: arbitrator_node_address
bool is_buyer_maker_and_seller_taker = 6;
string maker_account_id = 7;
string taker_account_id = 8;
PaymentAccountPayload maker_payment_account_payload = 9; // Not used anymore from 1.7.0 but kept for backward compatibility
PaymentAccountPayload taker_payment_account_payload = 10; // Not used anymore from 1.7.0 but kept for backward compatibility
PubKeyRing maker_pub_key_ring = 11;
PubKeyRing taker_pub_key_ring = 12;
NodeAddress buyer_node_address = 13;
NodeAddress seller_node_address = 14;
string maker_payout_address_string = 15;
string taker_payout_address_string = 16;
bytes maker_multi_sig_pub_key = 17;
bytes taker_multi_sig_pub_key = 18;
NodeAddress mediator_node_address = 19;
int64 lock_time = 20;
NodeAddress refund_agent_node_address = 21;
bytes hash_of_makers_payment_account_payload = 22;
bytes hash_of_takers_payment_account_payload = 23;
string maker_payment_method_id = 24;
string taker_payment_method_id = 25;
}
message RawTransactionInput {
int64 index = 1;
bytes parent_transaction = 2;
int64 value = 3;
int32 script_type_id = 4;
}
enum AvailabilityResult {
PB_ERROR = 0;
UNKNOWN_FAILURE = 1;
AVAILABLE = 2;
OFFER_TAKEN = 3;
PRICE_OUT_OF_TOLERANCE = 4;
MARKET_PRICE_NOT_AVAILABLE = 5;
NO_ARBITRATORS = 6;
NO_MEDIATORS = 7;
USER_IGNORED = 8;
MISSING_MANDATORY_CAPABILITY = 9;
NO_REFUND_AGENTS = 10;
UNCONF_TX_LIMIT_HIT = 11;
MAKER_DENIED_API_USER = 12;
PRICE_CHECK_FAILED = 13;
}
///////////////////////////////////////////////////////////////////////////////////////////
// PaymentAccount payload
///////////////////////////////////////////////////////////////////////////////////////////
message PaymentAccountPayload {
string id = 1;
string payment_method_id = 2;
int64 max_trade_period = 3 [deprecated = true]; // not used anymore but we need to keep it in PB for backward compatibility
oneof message {
AliPayAccountPayload ali_pay_account_payload = 4;
ChaseQuickPayAccountPayload chase_quick_pay_account_payload = 5;
ClearXchangeAccountPayload clear_xchange_account_payload = 6;
CountryBasedPaymentAccountPayload country_based_payment_account_payload = 7;
CryptoCurrencyAccountPayload crypto_currency_account_payload = 8;
FasterPaymentsAccountPayload faster_payments_account_payload = 9;
InteracETransferAccountPayload interac_e_transfer_account_payload = 10;
OKPayAccountPayload o_k_pay_account_payload = 11 [deprecated = true];
PerfectMoneyAccountPayload perfect_money_account_payload = 12;
SwishAccountPayload swish_account_payload = 13;
USPostalMoneyOrderAccountPayload u_s_postal_money_order_account_payload = 14;
UpholdAccountPayload uphold_account_payload = 16;
CashAppAccountPayload cash_app_account_payload = 17 [deprecated = true];
MoneyBeamAccountPayload money_beam_account_payload = 18;
VenmoAccountPayload venmo_account_payload = 19 [deprecated = true];
PopmoneyAccountPayload popmoney_account_payload = 20;
RevolutAccountPayload revolut_account_payload = 21;
WeChatPayAccountPayload we_chat_pay_account_payload = 22;
MoneyGramAccountPayload money_gram_account_payload = 23;
HalCashAccountPayload hal_cash_account_payload = 24;
PromptPayAccountPayload prompt_pay_account_payload = 25;
AdvancedCashAccountPayload advanced_cash_account_payload = 26;
InstantCryptoCurrencyAccountPayload instant_crypto_currency_account_payload = 27;
JapanBankAccountPayload japan_bank_account_payload = 28;
TransferwiseAccountPayload Transferwise_account_payload = 29;
AustraliaPayidPayload australia_payid_payload = 30;
AmazonGiftCardAccountPayload amazon_gift_card_account_payload = 31;
CashByMailAccountPayload cash_by_mail_account_payload = 32;
CapitualAccountPayload capitual_account_payload = 33;