-
Notifications
You must be signed in to change notification settings - Fork 36
/
query.proto
849 lines (722 loc) · 43.9 KB
/
query.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
syntax = "proto3";
package provenance.metadata.v1;
import "gogoproto/gogo.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "google/api/annotations.proto";
import "provenance/metadata/v1/metadata.proto";
import "provenance/metadata/v1/scope.proto";
import "provenance/metadata/v1/specification.proto";
import "provenance/metadata/v1/objectstore.proto";
option go_package = "github.com/provenance-io/provenance/x/metadata/types";
option java_package = "io.provenance.metadata.v1";
option java_multiple_files = true;
// Query defines the Metadata Query service.
service Query {
// Params queries the parameters of x/metadata module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/provenance/metadata/v1/params";
}
// ---- Primary Data Queries -----
// Scope searches for a scope.
//
// The scope id, if provided, must either be scope uuid, e.g. 91978ba2-5f35-459a-86a7-feca1b0512e0 or a scope address,
// e.g. scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel. The session addr, if provided, must be a bech32 session address,
// e.g. session1qxge0zaztu65tx5x5llv5xc9zts9sqlch3sxwn44j50jzgt8rshvqyfrjcr. The record_addr, if provided, must be a
// bech32 record address, e.g. record1q2ge0zaztu65tx5x5llv5xc9ztsw42dq2jdvmdazuwzcaddhh8gmu3mcze3.
//
// * If only a scope_id is provided, that scope is returned.
// * If only a session_addr is provided, the scope containing that session is returned.
// * If only a record_addr is provided, the scope containing that record is returned.
// * If more than one of scope_id, session_addr, and record_addr are provided, and they don't refer to the same scope,
// a bad request is returned.
//
// Providing a session addr or record addr does not limit the sessions and records returned (if requested).
// Those parameters are only used to find the scope.
//
// By default, sessions and records are not included.
// Set include_sessions and/or include_records to true to include sessions and/or records.
rpc Scope(ScopeRequest) returns (ScopeResponse) {
option (google.api.http) = {
get: "/provenance/metadata/v1/scope/{scope_id}"
additional_bindings: {get: "/provenance/metadata/v1/session/{session_addr}/scope"}
additional_bindings: {get: "/provenance/metadata/v1/record/{record_addr}/scope"}
};
}
// ScopesAll retrieves all scopes.
rpc ScopesAll(ScopesAllRequest) returns (ScopesAllResponse) {
option (google.api.http).get = "/provenance/metadata/v1/scopes/all";
}
// Sessions searches for sessions.
//
// The scope_id can either be scope uuid, e.g. 91978ba2-5f35-459a-86a7-feca1b0512e0 or a scope address, e.g.
// scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel. Similarly, the session_id can either be a uuid or session address, e.g.
// session1qxge0zaztu65tx5x5llv5xc9zts9sqlch3sxwn44j50jzgt8rshvqyfrjcr. The record_addr, if provided, must be a
// bech32 record address, e.g. record1q2ge0zaztu65tx5x5llv5xc9ztsw42dq2jdvmdazuwzcaddhh8gmu3mcze3.
//
// * If only a scope_id is provided, all sessions in that scope are returned.
// * If only a session_id is provided, it must be an address, and that single session is returned.
// * If the session_id is a uuid, then either a scope_id or record_addr must also be provided, and that single session
// is returned.
// * If only a record_addr is provided, the session containing that record will be returned.
// * If a record_name is provided then either a scope_id, session_id as an address, or record_addr must also be
// provided, and the session containing that record will be returned.
//
// A bad request is returned if:
// * The session_id is a uuid and is provided without a scope_id or record_addr.
// * A record_name is provided without any way to identify the scope (e.g. a scope_id, a session_id as an address, or
// a record_addr).
// * Two or more of scope_id, session_id as an address, and record_addr are provided and don't all refer to the same
// scope.
// * A record_addr (or scope_id and record_name) is provided with a session_id and that session does not contain such
// a record.
// * A record_addr and record_name are both provided, but reference different records.
//
// By default, the scope and records are not included.
// Set include_scope and/or include_records to true to include the scope and/or records.
rpc Sessions(SessionsRequest) returns (SessionsResponse) {
option (google.api.http) = {
get: "/provenance/metadata/v1/session/{session_id}"
additional_bindings: {get: "/provenance/metadata/v1/scope/{scope_id}/sessions"}
additional_bindings: {get: "/provenance/metadata/v1/scope/{scope_id}/session/{session_id}"}
additional_bindings: {get: "/provenance/metadata/v1/record/{record_addr}/session"}
additional_bindings: {get: "/provenance/metadata/v1/scope/{scope_id}/record/{record_name}/session"}
};
}
// SessionsAll retrieves all sessions.
rpc SessionsAll(SessionsAllRequest) returns (SessionsAllResponse) {
option (google.api.http).get = "/provenance/metadata/v1/sessions/all";
}
// Records searches for records.
//
// The record_addr, if provided, must be a bech32 record address, e.g.
// record1q2ge0zaztu65tx5x5llv5xc9ztsw42dq2jdvmdazuwzcaddhh8gmu3mcze3. The scope-id can either be scope uuid, e.g.
// 91978ba2-5f35-459a-86a7-feca1b0512e0 or a scope address, e.g. scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel. Similarly,
// the session_id can either be a uuid or session address, e.g.
// session1qxge0zaztu65tx5x5llv5xc9zts9sqlch3sxwn44j50jzgt8rshvqyfrjcr. The name is the name of the record you're
// interested in.
//
// * If only a record_addr is provided, that single record will be returned.
// * If only a scope_id is provided, all records in that scope will be returned.
// * If only a session_id (or scope_id/session_id), all records in that session will be returned.
// * If a name is provided with a scope_id and/or session_id, that single record will be returned.
//
// A bad request is returned if:
// * The session_id is a uuid and no scope_id is provided.
// * There are two or more of record_addr, session_id, and scope_id, and they don't all refer to the same scope.
// * A name is provided, but not a scope_id and/or a session_id.
// * A name and record_addr are provided and the name doesn't match the record_addr.
//
// By default, the scope and sessions are not included.
// Set include_scope and/or include_sessions to true to include the scope and/or sessions.
rpc Records(RecordsRequest) returns (RecordsResponse) {
option (google.api.http) = {
get: "/provenance/metadata/v1/record/{record_addr}"
additional_bindings: {get: "/provenance/metadata/v1/scope/{scope_id}/records"}
additional_bindings: {get: "/provenance/metadata/v1/scope/{scope_id}/record/{name}"}
additional_bindings: {get: "/provenance/metadata/v1/scope/{scope_id}/session/{session_id}/records"}
additional_bindings: {get: "/provenance/metadata/v1/scope/{scope_id}/session/{session_id}/record/{name}"}
additional_bindings: {get: "/provenance/metadata/v1/session/{session_id}/records"}
additional_bindings: {get: "/provenance/metadata/v1/session/{session_id}/record/{name}"}
};
}
// RecordsAll retrieves all records.
rpc RecordsAll(RecordsAllRequest) returns (RecordsAllResponse) {
option (google.api.http).get = "/provenance/metadata/v1/records/all";
}
// Ownership returns the scope identifiers that list the given address as either a data or value owner.
rpc Ownership(OwnershipRequest) returns (OwnershipResponse) {
option (google.api.http).get = "/provenance/metadata/v1/ownership/{address}";
}
// ValueOwnership returns the scope identifiers that list the given address as the value owner.
rpc ValueOwnership(ValueOwnershipRequest) returns (ValueOwnershipResponse) {
option (google.api.http).get = "/provenance/metadata/v1/valueownership/{address}";
}
// ---- Specification Queries -----
// ScopeSpecification returns a scope specification for the given specification id.
//
// The specification_id can either be a uuid, e.g. dc83ea70-eacd-40fe-9adf-1cf6148bf8a2 or a bech32 scope
// specification address, e.g. scopespec1qnwg86nsatx5pl56muw0v9ytlz3qu3jx6m.
//
// By default, the contract and record specifications are not included.
// Set include_contract_specs and/or include_record_specs to true to include contract and/or record specifications.
rpc ScopeSpecification(ScopeSpecificationRequest) returns (ScopeSpecificationResponse) {
option (google.api.http).get = "/provenance/metadata/v1/scopespec/{specification_id}";
}
// ScopeSpecificationsAll retrieves all scope specifications.
rpc ScopeSpecificationsAll(ScopeSpecificationsAllRequest) returns (ScopeSpecificationsAllResponse) {
option (google.api.http).get = "/provenance/metadata/v1/scopespecs/all";
}
// ContractSpecification returns a contract specification for the given specification id.
//
// The specification_id can either be a uuid, e.g. def6bc0a-c9dd-4874-948f-5206e6060a84, a bech32 contract
// specification address, e.g. contractspec1q000d0q2e8w5say53afqdesxp2zqzkr4fn, or a bech32 record specification
// address, e.g. recspec1qh00d0q2e8w5say53afqdesxp2zw42dq2jdvmdazuwzcaddhh8gmuqhez44. If it is a record specification
// address, then the contract specification that contains that record specification is looked up.
//
// By default, the record specifications for this contract specification are not included.
// Set include_record_specs to true to include them in the result.
rpc ContractSpecification(ContractSpecificationRequest) returns (ContractSpecificationResponse) {
option (google.api.http).get = "/provenance/metadata/v1/contractspec/{specification_id}";
}
// ContractSpecificationsAll retrieves all contract specifications.
rpc ContractSpecificationsAll(ContractSpecificationsAllRequest) returns (ContractSpecificationsAllResponse) {
option (google.api.http).get = "/provenance/metadata/v1/contractspecs/all";
}
// RecordSpecificationsForContractSpecification returns the record specifications for the given input.
//
// The specification_id can either be a uuid, e.g. def6bc0a-c9dd-4874-948f-5206e6060a84, a bech32 contract
// specification address, e.g. contractspec1q000d0q2e8w5say53afqdesxp2zqzkr4fn, or a bech32 record specification
// address, e.g. recspec1qh00d0q2e8w5say53afqdesxp2zw42dq2jdvmdazuwzcaddhh8gmuqhez44. If it is a record specification
// address, then the contract specification that contains that record specification is used.
rpc RecordSpecificationsForContractSpecification(RecordSpecificationsForContractSpecificationRequest)
returns (RecordSpecificationsForContractSpecificationResponse) {
option (google.api.http).get = "/provenance/metadata/v1/contractspec/{specification_id}/recordspecs";
}
// RecordSpecification returns a record specification for the given input.
rpc RecordSpecification(RecordSpecificationRequest) returns (RecordSpecificationResponse) {
option (google.api.http) = {
get: "/provenance/metadata/v1/recordspec/{specification_id}"
additional_bindings: {get: "/provenance/metadata/v1/contractspec/{specification_id}/recordspec/{name}"}
};
}
// RecordSpecificationsAll retrieves all record specifications.
rpc RecordSpecificationsAll(RecordSpecificationsAllRequest) returns (RecordSpecificationsAllResponse) {
option (google.api.http).get = "/provenance/metadata/v1/recordspecs/all";
}
// GetByAddr retrieves metadata given any address(es).
rpc GetByAddr(GetByAddrRequest) returns (GetByAddrResponse) {
option (google.api.http).get = "/provenance/metadata/v1/addr/{addrs}";
}
// ---- Object Store Locator Queries -----
// OSLocatorParams returns all parameters for the object store locator sub module.
rpc OSLocatorParams(OSLocatorParamsRequest) returns (OSLocatorParamsResponse) {
option (google.api.http).get = "/provenance/metadata/v1/locator/params";
}
// OSLocator returns an ObjectStoreLocator by its owner's address.
rpc OSLocator(OSLocatorRequest) returns (OSLocatorResponse) {
option (google.api.http).get = "/provenance/metadata/v1/locator/{owner}";
}
// OSLocatorsByURI returns all ObjectStoreLocator entries for a locator uri.
rpc OSLocatorsByURI(OSLocatorsByURIRequest) returns (OSLocatorsByURIResponse) {
option (google.api.http).get = "/provenance/metadata/v1/locator/uri/{uri}";
}
// OSLocatorsByScope returns all ObjectStoreLocator entries for a for all signer's present in the specified scope.
rpc OSLocatorsByScope(OSLocatorsByScopeRequest) returns (OSLocatorsByScopeResponse) {
option (google.api.http).get = "/provenance/metadata/v1/locator/scope/{scope_id}";
}
// OSAllLocators returns all ObjectStoreLocator entries.
rpc OSAllLocators(OSAllLocatorsRequest) returns (OSAllLocatorsResponse) {
option (google.api.http).get = "/provenance/metadata/v1/locators/all";
}
// AccountData gets the account data associated with a metadata address.
// Currently, only scope ids are supported.
rpc AccountData(AccountDataRequest) returns (AccountDataResponse) {
option (google.api.http).get = "/provenance/metadata/v1/accountdata/{metadata_addr}";
}
}
// QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest {
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// params defines the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false];
// request is a copy of the request that generated these results.
QueryParamsRequest request = 98;
}
// ScopeRequest is the request type for the Query/Scope RPC method.
message ScopeRequest {
// scope_id can either be a uuid, e.g. 91978ba2-5f35-459a-86a7-feca1b0512e0 or a bech32 scope address, e.g.
// scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel.
string scope_id = 1 [(gogoproto.moretags) = "yaml:\"scope_id\""];
// session_addr is a bech32 session address, e.g.
// session1qxge0zaztu65tx5x5llv5xc9zts9sqlch3sxwn44j50jzgt8rshvqyfrjcr.
string session_addr = 2 [(gogoproto.moretags) = "yaml:\"session_addr\""];
// record_addr is a bech32 record address, e.g. record1q2ge0zaztu65tx5x5llv5xc9ztsw42dq2jdvmdazuwzcaddhh8gmu3mcze3.
string record_addr = 3 [(gogoproto.moretags) = "yaml:\"record_addr\""];
// include_sessions is a flag for whether to include the sessions of the scope in the response.
bool include_sessions = 10 [(gogoproto.moretags) = "yaml:\"include_sessions\""];
// include_records is a flag for whether to include the records of the scope in the response.
bool include_records = 11 [(gogoproto.moretags) = "yaml:\"include_records\""];
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// ScopeResponse is the response type for the Query/Scope RPC method.
message ScopeResponse {
// scope is the wrapped scope result.
ScopeWrapper scope = 1;
// sessions is any number of wrapped sessions in this scope (if requested).
repeated SessionWrapper sessions = 2 [(gogoproto.moretags) = "yaml:\"sessions,omitempty\""];
// records is any number of wrapped records in this scope (if requested).
repeated RecordWrapper records = 3 [(gogoproto.moretags) = "yaml:\"records,omitempty\""];
// request is a copy of the request that generated these results.
ScopeRequest request = 98;
}
// SessionWrapper contains a single scope and its uuid.
message ScopeWrapper {
// scope is the on-chain scope message.
Scope scope = 1;
// scope_id_info contains information about the id/address of the scope.
ScopeIdInfo scope_id_info = 2 [(gogoproto.moretags) = "yaml:\"scope_id_info\""];
// scope_spec_id_info contains information about the id/address of the scope specification.
ScopeSpecIdInfo scope_spec_id_info = 3 [(gogoproto.moretags) = "yaml:\"scope_spec_id_info\""];
}
// ScopesAllRequest is the request type for the Query/ScopesAll RPC method.
message ScopesAllRequest {
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// ScopesAllResponse is the response type for the Query/ScopesAll RPC method.
message ScopesAllResponse {
// scopes are the wrapped scopes.
repeated ScopeWrapper scopes = 1;
// request is a copy of the request that generated these results.
ScopesAllRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// SessionsRequest is the request type for the Query/Sessions RPC method.
message SessionsRequest {
// scope_id can either be a uuid, e.g. 91978ba2-5f35-459a-86a7-feca1b0512e0 or a bech32 scope address, e.g.
// scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel.
string scope_id = 1 [(gogoproto.moretags) = "yaml:\"scope_id\""];
// session_id can either be a uuid, e.g. 5803f8bc-6067-4eb5-951f-2121671c2ec0 or a bech32 session address, e.g.
// session1qxge0zaztu65tx5x5llv5xc9zts9sqlch3sxwn44j50jzgt8rshvqyfrjcr. This can only be a uuid if a scope_id is also
// provided.
string session_id = 2 [(gogoproto.moretags) = "yaml:\"session_id\""];
// record_addr is a bech32 record address, e.g. record1q2ge0zaztu65tx5x5llv5xc9ztsw42dq2jdvmdazuwzcaddhh8gmu3mcze3.
string record_addr = 3 [(gogoproto.moretags) = "yaml:\"record_addr\""];
// record_name is the name of the record to find the session for in the provided scope.
string record_name = 4 [(gogoproto.moretags) = "yaml:\"record_name\""];
// include_scope is a flag for whether to include the scope containing these sessions in the response.
bool include_scope = 10 [(gogoproto.moretags) = "yaml:\"include_scope\""];
// include_records is a flag for whether to include the records of these sessions in the response.
bool include_records = 11 [(gogoproto.moretags) = "yaml:\"include_records\""];
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// SessionsResponse is the response type for the Query/Sessions RPC method.
message SessionsResponse {
// scope is the wrapped scope that holds these sessions (if requested).
ScopeWrapper scope = 1 [(gogoproto.moretags) = "yaml:\"scope,omitempty\""];
// sessions is any number of wrapped session results.
repeated SessionWrapper sessions = 2;
// records is any number of wrapped records contained in these sessions (if requested).
repeated RecordWrapper records = 3 [(gogoproto.moretags) = "yaml:\"records,omitempty\""];
// request is a copy of the request that generated these results.
SessionsRequest request = 98;
}
// SessionWrapper contains a single session and some extra identifiers for it.
message SessionWrapper {
// session is the on-chain session message.
Session session = 1;
// session_id_info contains information about the id/address of the session.
SessionIdInfo session_id_info = 2 [(gogoproto.moretags) = "yaml:\"session_id_info\""];
// contract_spec_id_info contains information about the id/address of the contract specification.
ContractSpecIdInfo contract_spec_id_info = 3 [(gogoproto.moretags) = "yaml:\"contract_spec_id_info\""];
}
// SessionsAllRequest is the request type for the Query/SessionsAll RPC method.
message SessionsAllRequest {
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// SessionsAllResponse is the response type for the Query/SessionsAll RPC method.
message SessionsAllResponse {
// sessions are the wrapped sessions.
repeated SessionWrapper sessions = 1;
// request is a copy of the request that generated these results.
SessionsAllRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// RecordsRequest is the request type for the Query/Records RPC method.
message RecordsRequest {
// record_addr is a bech32 record address, e.g. record1q2ge0zaztu65tx5x5llv5xc9ztsw42dq2jdvmdazuwzcaddhh8gmu3mcze3.
string record_addr = 1 [(gogoproto.moretags) = "yaml:\"record_addr\""];
// scope_id can either be a uuid, e.g. 91978ba2-5f35-459a-86a7-feca1b0512e0 or a bech32 scope address, e.g.
// scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel.
string scope_id = 2 [(gogoproto.moretags) = "yaml:\"scope_id\""];
// session_id can either be a uuid, e.g. 5803f8bc-6067-4eb5-951f-2121671c2ec0 or a bech32 session address, e.g.
// session1qxge0zaztu65tx5x5llv5xc9zts9sqlch3sxwn44j50jzgt8rshvqyfrjcr. This can only be a uuid if a scope_id is also
// provided.
string session_id = 3 [(gogoproto.moretags) = "yaml:\"session_id\""];
// name is the name of the record to look for
string name = 4;
// include_scope is a flag for whether to include the the scope containing these records in the response.
bool include_scope = 10 [(gogoproto.moretags) = "yaml:\"include_scope\""];
// include_sessions is a flag for whether to include the sessions containing these records in the response.
bool include_sessions = 11 [(gogoproto.moretags) = "yaml:\"include_sessions\""];
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// RecordsResponse is the response type for the Query/Records RPC method.
message RecordsResponse {
// scope is the wrapped scope that holds these records (if requested).
ScopeWrapper scope = 1 [(gogoproto.moretags) = "yaml:\"scope,omitempty\""];
// sessions is any number of wrapped sessions that hold these records (if requested).
repeated SessionWrapper sessions = 2 [(gogoproto.moretags) = "yaml:\"sessions,omitempty\""];
// records is any number of wrapped record results.
repeated RecordWrapper records = 3;
// request is a copy of the request that generated these results.
RecordsRequest request = 98;
}
// RecordWrapper contains a single record and some extra identifiers for it.
message RecordWrapper {
// record is the on-chain record message.
Record record = 1;
// record_id_info contains information about the id/address of the record.
RecordIdInfo record_id_info = 2 [(gogoproto.moretags) = "yaml:\"record_id_info\""];
// record_spec_id_info contains information about the id/address of the record specification.
RecordSpecIdInfo record_spec_id_info = 3 [(gogoproto.moretags) = "yaml:\"record_spec_id_info\""];
}
// RecordsAllRequest is the request type for the Query/RecordsAll RPC method.
message RecordsAllRequest {
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// RecordsAllResponse is the response type for the Query/RecordsAll RPC method.
message RecordsAllResponse {
// records are the wrapped records.
repeated RecordWrapper records = 1;
// request is a copy of the request that generated these results.
RecordsAllRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// OwnershipRequest is the request type for the Query/Ownership RPC method.
message OwnershipRequest {
string address = 1;
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// OwnershipResponse is the response type for the Query/Ownership RPC method.
message OwnershipResponse {
// A list of scope ids (uuid) associated with the given address.
repeated string scope_uuids = 1 [(gogoproto.moretags) = "yaml:\"scope_uuids\""];
// request is a copy of the request that generated these results.
OwnershipRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// ValueOwnershipRequest is the request type for the Query/ValueOwnership RPC method.
message ValueOwnershipRequest {
string address = 1;
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// ValueOwnershipResponse is the response type for the Query/ValueOwnership RPC method.
message ValueOwnershipResponse {
// A list of scope ids (uuid) associated with the given address.
repeated string scope_uuids = 1 [(gogoproto.moretags) = "yaml:\"scope_uuids\""];
// request is a copy of the request that generated these results.
ValueOwnershipRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// ScopeSpecificationRequest is the request type for the Query/ScopeSpecification RPC method.
message ScopeSpecificationRequest {
// specification_id can either be a uuid, e.g. dc83ea70-eacd-40fe-9adf-1cf6148bf8a2 or a bech32 scope specification
// address, e.g. scopespec1qnwg86nsatx5pl56muw0v9ytlz3qu3jx6m.
string specification_id = 1 [(gogoproto.moretags) = "yaml:\"specification_id\""];
// include_contract_specs is a flag for whether to include the contract specifications of the scope specification in
// the response.
bool include_contract_specs = 10 [(gogoproto.moretags) = "yaml:\"include_contract_specs\""];
// include_record_specs is a flag for whether to include the record specifications of the scope specification in the
// response.
bool include_record_specs = 11 [(gogoproto.moretags) = "yaml:\"include_record_specs\""];
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// ScopeSpecificationResponse is the response type for the Query/ScopeSpecification RPC method.
message ScopeSpecificationResponse {
// scope_specification is the wrapped scope specification.
ScopeSpecificationWrapper scope_specification = 1 [(gogoproto.moretags) = "yaml:\"scope_specification\""];
// contract_specs is any number of wrapped contract specifications in this scope specification (if requested).
repeated ContractSpecificationWrapper contract_specs = 2 [(gogoproto.moretags) = "yaml:\"contract_specs,omitempty\""];
// record_specs is any number of wrapped record specifications in this scope specification (if requested).
repeated RecordSpecificationWrapper record_specs = 3 [(gogoproto.moretags) = "yaml:\"record_specs,omitempty\""];
// request is a copy of the request that generated these results.
ScopeSpecificationRequest request = 98;
}
// ScopeSpecificationWrapper contains a single scope specification and some extra identifiers for it.
message ScopeSpecificationWrapper {
// specification is the on-chain scope specification message.
ScopeSpecification specification = 1;
// scope_spec_id_info contains information about the id/address of the scope specification.
ScopeSpecIdInfo scope_spec_id_info = 2 [(gogoproto.moretags) = "yaml:\"scope_spec_id_info\""];
}
// ScopeSpecificationsAllRequest is the request type for the Query/ScopeSpecificationsAll RPC method.
message ScopeSpecificationsAllRequest {
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// ScopeSpecificationsAllResponse is the response type for the Query/ScopeSpecificationsAll RPC method.
message ScopeSpecificationsAllResponse {
// scope_specifications are the wrapped scope specifications.
repeated ScopeSpecificationWrapper scope_specifications = 1 [(gogoproto.moretags) = "yaml:\"scope_specifications\""];
// request is a copy of the request that generated these results.
ScopeSpecificationsAllRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// ContractSpecificationRequest is the request type for the Query/ContractSpecification RPC method.
message ContractSpecificationRequest {
// specification_id can either be a uuid, e.g. def6bc0a-c9dd-4874-948f-5206e6060a84 or a bech32 contract specification
// address, e.g. contractspec1q000d0q2e8w5say53afqdesxp2zqzkr4fn.
// It can also be a record specification address, e.g.
// recspec1qh00d0q2e8w5say53afqdesxp2zw42dq2jdvmdazuwzcaddhh8gmuqhez44.
string specification_id = 1 [(gogoproto.moretags) = "yaml:\"specification_id\""];
// include_record_specs is a flag for whether to include the the record specifications of this contract specification
// in the response.
bool include_record_specs = 10 [(gogoproto.moretags) = "yaml:\"include_record_specs\""];
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// ContractSpecificationResponse is the response type for the Query/ContractSpecification RPC method.
message ContractSpecificationResponse {
// contract_specification is the wrapped contract specification.
ContractSpecificationWrapper contract_specification = 1 [(gogoproto.moretags) = "yaml:\"contract_specification\""];
// record_specifications is any number or wrapped record specifications associated with this contract_specification
// (if requested).
repeated RecordSpecificationWrapper record_specifications = 3
[(gogoproto.moretags) = "yaml:\"record_specifications,omitempty\""];
// request is a copy of the request that generated these results.
ContractSpecificationRequest request = 98;
}
// ContractSpecificationWrapper contains a single contract specification and some extra identifiers for it.
message ContractSpecificationWrapper {
// specification is the on-chain contract specification message.
ContractSpecification specification = 1;
// contract_spec_id_info contains information about the id/address of the contract specification.
ContractSpecIdInfo contract_spec_id_info = 2 [(gogoproto.moretags) = "yaml:\"contract_spec_id_info\""];
}
// ContractSpecificationsAllRequest is the request type for the Query/ContractSpecificationsAll RPC method.
message ContractSpecificationsAllRequest {
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// ContractSpecificationsAllResponse is the response type for the Query/ContractSpecificationsAll RPC method.
message ContractSpecificationsAllResponse {
// contract_specifications are the wrapped contract specifications.
repeated ContractSpecificationWrapper contract_specifications = 1
[(gogoproto.moretags) = "yaml:\"contract_specifications\""];
// request is a copy of the request that generated these results.
ContractSpecificationsAllRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// RecordSpecificationsForContractSpecificationRequest is the request type for the
// Query/RecordSpecificationsForContractSpecification RPC method.
message RecordSpecificationsForContractSpecificationRequest {
// specification_id can either be a uuid, e.g. def6bc0a-c9dd-4874-948f-5206e6060a84 or a bech32 contract specification
// address, e.g. contractspec1q000d0q2e8w5say53afqdesxp2zqzkr4fn.
// It can also be a record specification address, e.g.
// recspec1qh00d0q2e8w5say53afqdesxp2zw42dq2jdvmdazuwzcaddhh8gmuqhez44.
string specification_id = 1 [(gogoproto.moretags) = "yaml:\"specification_id\""];
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// RecordSpecificationsForContractSpecificationResponse is the response type for the
// Query/RecordSpecificationsForContractSpecification RPC method.
message RecordSpecificationsForContractSpecificationResponse {
// record_specifications is any number of wrapped record specifications associated with this contract_specification.
repeated RecordSpecificationWrapper record_specifications = 1
[(gogoproto.moretags) = "yaml:\"record_specifications\""];
// contract_specification_uuid is the uuid of this contract specification.
string contract_specification_uuid = 2 [(gogoproto.moretags) = "yaml:\"contract_specification_uuid\""];
// contract_specification_addr is the contract specification address as a bech32 encoded string.
string contract_specification_addr = 3 [(gogoproto.moretags) = "yaml:\"contract_specification_addr\""];
// request is a copy of the request that generated these results.
RecordSpecificationsForContractSpecificationRequest request = 98;
}
// RecordSpecificationRequest is the request type for the Query/RecordSpecification RPC method.
message RecordSpecificationRequest {
// specification_id can either be a uuid, e.g. def6bc0a-c9dd-4874-948f-5206e6060a84 or a bech32 contract specification
// address, e.g. contractspec1q000d0q2e8w5say53afqdesxp2zqzkr4fn.
// It can also be a record specification address, e.g.
// recspec1qh00d0q2e8w5say53afqdesxp2zw42dq2jdvmdazuwzcaddhh8gmuqhez44.
string specification_id = 1 [(gogoproto.moretags) = "yaml:\"specification_id\""];
// name is the name of the record to look up.
// It is required if the specification_id is a uuid or contract specification address.
// It is ignored if the specification_id is a record specification address.
string name = 2;
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// RecordSpecificationResponse is the response type for the Query/RecordSpecification RPC method.
message RecordSpecificationResponse {
// record_specification is the wrapped record specification.
RecordSpecificationWrapper record_specification = 1 [(gogoproto.moretags) = "yaml:\"record_specification\""];
// request is a copy of the request that generated these results.
RecordSpecificationRequest request = 98;
}
// RecordSpecificationWrapper contains a single record specification and some extra identifiers for it.
message RecordSpecificationWrapper {
// specification is the on-chain record specification message.
RecordSpecification specification = 1;
// record_spec_id_info contains information about the id/address of the record specification.
RecordSpecIdInfo record_spec_id_info = 2 [(gogoproto.moretags) = "yaml:\"record_spec_id_info\""];
}
// RecordSpecificationsAllRequest is the request type for the Query/RecordSpecificationsAll RPC method.
message RecordSpecificationsAllRequest {
// exclude_id_info is a flag for whether to exclude the id info from the response.
bool exclude_id_info = 12 [(gogoproto.moretags) = "yaml:\"exclude_id_info\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// RecordSpecificationsAllResponse is the response type for the Query/RecordSpecificationsAll RPC method.
message RecordSpecificationsAllResponse {
// record_specifications are the wrapped record specifications.
repeated RecordSpecificationWrapper record_specifications = 1
[(gogoproto.moretags) = "yaml:\"record_specifications\""];
// request is a copy of the request that generated these results.
RecordSpecificationsAllRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// GetByAddrRequest is the request type for the Query/GetByAddr RPC method.
message GetByAddrRequest {
// ids are the metadata addresses of the things to look up.
repeated string addrs = 1;
}
// GetByAddrResponse is the response type for the Query/GetByAddr RPC method.
message GetByAddrResponse {
// scopes contains any scopes that were requested and found.
repeated Scope scopes = 1 [(gogoproto.moretags) = "yaml:\"scopes,omitempty\""];
// sessions contains any sessions that were requested and found.
repeated Session sessions = 2 [(gogoproto.moretags) = "yaml:\"sessions,omitempty\""];
// records contains any records that were requested and found.
repeated Record records = 3 [(gogoproto.moretags) = "yaml:\"records,omitempty\""];
// scope_specs contains any scope specifications that were requested and found.
repeated ScopeSpecification scope_specs = 4 [(gogoproto.moretags) = "yaml:\"scope_specs,omitempty\""];
// contract_specs contains any contract specifications that were requested and found.
repeated ContractSpecification contract_specs = 5 [(gogoproto.moretags) = "yaml:\"contract_specs,omitempty\""];
// record_specs contains any record specifications that were requested and found.
repeated RecordSpecification record_specs = 6 [(gogoproto.moretags) = "yaml:\"record_specs,omitempty\""];
// not_found contains any addrs requested but not found.
repeated string not_found = 7 [(gogoproto.moretags) = "yaml:\"not_found,omitempty\""];
}
// OSLocatorParamsRequest is the request type for the Query/OSLocatorParams RPC method.
message OSLocatorParamsRequest {
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// OSLocatorParamsResponse is the response type for the Query/OSLocatorParams RPC method.
message OSLocatorParamsResponse {
// params defines the parameters of the module.
OSLocatorParams params = 1 [(gogoproto.nullable) = false];
// request is a copy of the request that generated these results.
OSLocatorParamsRequest request = 98;
}
// OSLocatorRequest is the request type for the Query/OSLocator RPC method.
message OSLocatorRequest {
string owner = 1;
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// OSLocatorResponse is the response type for the Query/OSLocator RPC method.
message OSLocatorResponse {
ObjectStoreLocator locator = 1;
// request is a copy of the request that generated these results.
OSLocatorRequest request = 98;
}
// OSLocatorsByURIRequest is the request type for the Query/OSLocatorsByURI RPC method.
message OSLocatorsByURIRequest {
string uri = 1;
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// OSLocatorsByURIResponse is the response type for the Query/OSLocatorsByURI RPC method.
message OSLocatorsByURIResponse {
repeated ObjectStoreLocator locators = 1 [(gogoproto.nullable) = false];
// request is a copy of the request that generated these results.
OSLocatorsByURIRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// OSLocatorsByScopeRequest is the request type for the Query/OSLocatorsByScope RPC method.
message OSLocatorsByScopeRequest {
string scope_id = 1 [(gogoproto.moretags) = "yaml:\"scope_id\""];
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
}
// OSLocatorsByScopeResponse is the response type for the Query/OSLocatorsByScope RPC method.
message OSLocatorsByScopeResponse {
repeated ObjectStoreLocator locators = 1 [(gogoproto.nullable) = false];
// request is a copy of the request that generated these results.
OSLocatorsByScopeRequest request = 98;
}
// OSAllLocatorsRequest is the request type for the Query/OSAllLocators RPC method.
message OSAllLocatorsRequest {
// include_request is a flag for whether to include this request in your result.
bool include_request = 98 [(gogoproto.moretags) = "yaml:\"include_request\""];
// pagination defines optional pagination parameters for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 99;
}
// OSAllLocatorsResponse is the response type for the Query/OSAllLocators RPC method.
message OSAllLocatorsResponse {
repeated ObjectStoreLocator locators = 1 [(gogoproto.nullable) = false];
// request is a copy of the request that generated these results.
OSAllLocatorsRequest request = 98;
// pagination provides the pagination information of this response.
cosmos.base.query.v1beta1.PageResponse pagination = 99;
}
// AccountDataRequest is the request type for the Query/AccountData RPC method.
message AccountDataRequest {
// The metadata address to look up.
// Currently, only scope ids are supported.
bytes metadata_addr = 1 [
(gogoproto.nullable) = false,
(gogoproto.customtype) = "MetadataAddress",
(gogoproto.moretags) = "yaml:\"scope_id\""
];
}
// AccountDataResponse is the response type for the Query/AccountData RPC method.
message AccountDataResponse {
// The accountdata for the requested metadata address.
string value = 1;
}