/
workflow.pb.go
1478 lines (1323 loc) 路 61.6 KB
/
workflow.pb.go
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
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.30.0
// protoc (unknown)
// source: coinbase/staking/orchestration/v1/workflow.proto
package v1
import (
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// State defines an enumeration of states for a staking transaction.
type TxStepOutput_State int32
const (
// Unspecified transaction state, this is for backwards compatibility.
TxStepOutput_STATE_UNSPECIFIED TxStepOutput_State = 0
// Tx has not yet been constructed in the backend.
TxStepOutput_STATE_NOT_CONSTRUCTED TxStepOutput_State = 1
// Tx construction is over in the backend.
TxStepOutput_STATE_CONSTRUCTED TxStepOutput_State = 2
// Tx is waiting to be externally broadcasted by the customer.
TxStepOutput_STATE_PENDING_EXT_BROADCAST TxStepOutput_State = 16
// Tx has been signed and returned to the backend.
TxStepOutput_STATE_SIGNED TxStepOutput_State = 4
// Tx is being broadcasted to the network.
TxStepOutput_STATE_BROADCASTING TxStepOutput_State = 5
// Tx is waiting for confirmation.
TxStepOutput_STATE_CONFIRMING TxStepOutput_State = 6
// Tx has been confirmed to be included in a block.
TxStepOutput_STATE_CONFIRMED TxStepOutput_State = 7
// Tx has been finalized.
TxStepOutput_STATE_FINALIZED TxStepOutput_State = 8
// Tx construction or broadcasting failed.
TxStepOutput_STATE_FAILED TxStepOutput_State = 9
// Tx has been successfully executed.
TxStepOutput_STATE_SUCCESS TxStepOutput_State = 10
)
// Enum value maps for TxStepOutput_State.
var (
TxStepOutput_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "STATE_NOT_CONSTRUCTED",
2: "STATE_CONSTRUCTED",
16: "STATE_PENDING_EXT_BROADCAST",
4: "STATE_SIGNED",
5: "STATE_BROADCASTING",
6: "STATE_CONFIRMING",
7: "STATE_CONFIRMED",
8: "STATE_FINALIZED",
9: "STATE_FAILED",
10: "STATE_SUCCESS",
}
TxStepOutput_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"STATE_NOT_CONSTRUCTED": 1,
"STATE_CONSTRUCTED": 2,
"STATE_PENDING_EXT_BROADCAST": 16,
"STATE_SIGNED": 4,
"STATE_BROADCASTING": 5,
"STATE_CONFIRMING": 6,
"STATE_CONFIRMED": 7,
"STATE_FINALIZED": 8,
"STATE_FAILED": 9,
"STATE_SUCCESS": 10,
}
)
func (x TxStepOutput_State) Enum() *TxStepOutput_State {
p := new(TxStepOutput_State)
*p = x
return p
}
func (x TxStepOutput_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TxStepOutput_State) Descriptor() protoreflect.EnumDescriptor {
return file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[0].Descriptor()
}
func (TxStepOutput_State) Type() protoreflect.EnumType {
return &file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[0]
}
func (x TxStepOutput_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TxStepOutput_State.Descriptor instead.
func (TxStepOutput_State) EnumDescriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{0, 0}
}
// The unit of wait time.
type WaitStepOutput_WaitUnit int32
const (
// Unspecified wait time.
WaitStepOutput_WAIT_UNIT_UNSPECIFIED WaitStepOutput_WaitUnit = 0
// Wait time measured in seconds.
WaitStepOutput_WAIT_UNIT_SECONDS WaitStepOutput_WaitUnit = 1
// Wait time measured in blocks.
WaitStepOutput_WAIT_UNIT_BLOCKS WaitStepOutput_WaitUnit = 2
// Wait time measured in epochs.
WaitStepOutput_WAIT_UNIT_EPOCHS WaitStepOutput_WaitUnit = 3
// Wait time measured in checkpoints.
WaitStepOutput_WAIT_UNIT_CHECKPOINTS WaitStepOutput_WaitUnit = 4
)
// Enum value maps for WaitStepOutput_WaitUnit.
var (
WaitStepOutput_WaitUnit_name = map[int32]string{
0: "WAIT_UNIT_UNSPECIFIED",
1: "WAIT_UNIT_SECONDS",
2: "WAIT_UNIT_BLOCKS",
3: "WAIT_UNIT_EPOCHS",
4: "WAIT_UNIT_CHECKPOINTS",
}
WaitStepOutput_WaitUnit_value = map[string]int32{
"WAIT_UNIT_UNSPECIFIED": 0,
"WAIT_UNIT_SECONDS": 1,
"WAIT_UNIT_BLOCKS": 2,
"WAIT_UNIT_EPOCHS": 3,
"WAIT_UNIT_CHECKPOINTS": 4,
}
)
func (x WaitStepOutput_WaitUnit) Enum() *WaitStepOutput_WaitUnit {
p := new(WaitStepOutput_WaitUnit)
*p = x
return p
}
func (x WaitStepOutput_WaitUnit) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (WaitStepOutput_WaitUnit) Descriptor() protoreflect.EnumDescriptor {
return file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[1].Descriptor()
}
func (WaitStepOutput_WaitUnit) Type() protoreflect.EnumType {
return &file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[1]
}
func (x WaitStepOutput_WaitUnit) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use WaitStepOutput_WaitUnit.Descriptor instead.
func (WaitStepOutput_WaitUnit) EnumDescriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{1, 0}
}
// WaitStepState defines an enumeration of states for a wait step.
type WaitStepOutput_State int32
const (
// Unspecified wait step state.
WaitStepOutput_STATE_UNSPECIFIED WaitStepOutput_State = 0
// Wait step has not started.
WaitStepOutput_STATE_NOT_STARTED WaitStepOutput_State = 1
// Wait step is in-progress.
WaitStepOutput_STATE_IN_PROGRESS WaitStepOutput_State = 2
// Wait step completed.
WaitStepOutput_STATE_COMPLETED WaitStepOutput_State = 3
)
// Enum value maps for WaitStepOutput_State.
var (
WaitStepOutput_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "STATE_NOT_STARTED",
2: "STATE_IN_PROGRESS",
3: "STATE_COMPLETED",
}
WaitStepOutput_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"STATE_NOT_STARTED": 1,
"STATE_IN_PROGRESS": 2,
"STATE_COMPLETED": 3,
}
)
func (x WaitStepOutput_State) Enum() *WaitStepOutput_State {
p := new(WaitStepOutput_State)
*p = x
return p
}
func (x WaitStepOutput_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (WaitStepOutput_State) Descriptor() protoreflect.EnumDescriptor {
return file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[2].Descriptor()
}
func (WaitStepOutput_State) Type() protoreflect.EnumType {
return &file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[2]
}
func (x WaitStepOutput_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use WaitStepOutput_State.Descriptor instead.
func (WaitStepOutput_State) EnumDescriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{1, 1}
}
// The state of a workflow
type Workflow_State int32
const (
// Unspecified workflow state, this is for backwards compatibility.
Workflow_STATE_UNSPECIFIED Workflow_State = 0
// In Progress represents a workflow that is currently in progress.
Workflow_STATE_IN_PROGRESS Workflow_State = 1
// Waiting for external broadcast represents the workflow is waiting for the customer to broadcast a tx and return its corresponding tx hash.
Workflow_STATE_WAITING_FOR_EXT_BROADCAST Workflow_State = 9
// Completed represents the workflow has completed.
Workflow_STATE_COMPLETED Workflow_State = 3
// Failed represents the workflow has failed.
Workflow_STATE_FAILED Workflow_State = 4
)
// Enum value maps for Workflow_State.
var (
Workflow_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "STATE_IN_PROGRESS",
9: "STATE_WAITING_FOR_EXT_BROADCAST",
3: "STATE_COMPLETED",
4: "STATE_FAILED",
}
Workflow_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"STATE_IN_PROGRESS": 1,
"STATE_WAITING_FOR_EXT_BROADCAST": 9,
"STATE_COMPLETED": 3,
"STATE_FAILED": 4,
}
)
func (x Workflow_State) Enum() *Workflow_State {
p := new(Workflow_State)
*p = x
return p
}
func (x Workflow_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Workflow_State) Descriptor() protoreflect.EnumDescriptor {
return file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[3].Descriptor()
}
func (Workflow_State) Type() protoreflect.EnumType {
return &file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[3]
}
func (x Workflow_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Workflow_State.Descriptor instead.
func (Workflow_State) EnumDescriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{3, 0}
}
// The details of a transaction being constructed and broadcasted to the network.
type TxStepOutput struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The unsigned transaction which was signed in order to be broadcasted.
UnsignedTx string `protobuf:"bytes,1,opt,name=unsigned_tx,json=unsignedTx,proto3" json:"unsigned_tx,omitempty"`
// The signed transaction which was asked to be broadcasted.
SignedTx string `protobuf:"bytes,2,opt,name=signed_tx,json=signedTx,proto3" json:"signed_tx,omitempty"`
// The hash of the broadcasted transaction.
TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
// The state of the transaction step.
State TxStepOutput_State `protobuf:"varint,4,opt,name=state,proto3,enum=coinbase.staking.orchestration.v1.TxStepOutput_State" json:"state,omitempty"`
// The error message if the transaction step failed.
ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
}
func (x *TxStepOutput) Reset() {
*x = TxStepOutput{}
if protoimpl.UnsafeEnabled {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TxStepOutput) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TxStepOutput) ProtoMessage() {}
func (x *TxStepOutput) ProtoReflect() protoreflect.Message {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TxStepOutput.ProtoReflect.Descriptor instead.
func (*TxStepOutput) Descriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{0}
}
func (x *TxStepOutput) GetUnsignedTx() string {
if x != nil {
return x.UnsignedTx
}
return ""
}
func (x *TxStepOutput) GetSignedTx() string {
if x != nil {
return x.SignedTx
}
return ""
}
func (x *TxStepOutput) GetTxHash() string {
if x != nil {
return x.TxHash
}
return ""
}
func (x *TxStepOutput) GetState() TxStepOutput_State {
if x != nil {
return x.State
}
return TxStepOutput_STATE_UNSPECIFIED
}
func (x *TxStepOutput) GetErrorMessage() string {
if x != nil {
return x.ErrorMessage
}
return ""
}
// The output details of a step where we wait for some kind of on-chain activity to finish like reaching a certain checkpoint, epoch or block.
type WaitStepOutput struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The beginning of wait period.
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
// The current wait progress.
Current int64 `protobuf:"varint,2,opt,name=current,proto3" json:"current,omitempty"`
// The target wait end point.
Target int64 `protobuf:"varint,3,opt,name=target,proto3" json:"target,omitempty"`
// The wait unit (like checkpoint, block, epoch etc).
Unit WaitStepOutput_WaitUnit `protobuf:"varint,4,opt,name=unit,proto3,enum=coinbase.staking.orchestration.v1.WaitStepOutput_WaitUnit" json:"unit,omitempty"`
// The state of the wait step.
State WaitStepOutput_State `protobuf:"varint,5,opt,name=state,proto3,enum=coinbase.staking.orchestration.v1.WaitStepOutput_State" json:"state,omitempty"`
}
func (x *WaitStepOutput) Reset() {
*x = WaitStepOutput{}
if protoimpl.UnsafeEnabled {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WaitStepOutput) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WaitStepOutput) ProtoMessage() {}
func (x *WaitStepOutput) ProtoReflect() protoreflect.Message {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WaitStepOutput.ProtoReflect.Descriptor instead.
func (*WaitStepOutput) Descriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{1}
}
func (x *WaitStepOutput) GetStart() int64 {
if x != nil {
return x.Start
}
return 0
}
func (x *WaitStepOutput) GetCurrent() int64 {
if x != nil {
return x.Current
}
return 0
}
func (x *WaitStepOutput) GetTarget() int64 {
if x != nil {
return x.Target
}
return 0
}
func (x *WaitStepOutput) GetUnit() WaitStepOutput_WaitUnit {
if x != nil {
return x.Unit
}
return WaitStepOutput_WAIT_UNIT_UNSPECIFIED
}
func (x *WaitStepOutput) GetState() WaitStepOutput_State {
if x != nil {
return x.State
}
return WaitStepOutput_STATE_UNSPECIFIED
}
// The information for a step in the workflow.
type WorkflowStep struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The human readable name of the step.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The output of the current step. It can be of tx or wait type.
//
// Types that are assignable to Output:
//
// *WorkflowStep_TxStepOutput
// *WorkflowStep_WaitStepOutput
Output isWorkflowStep_Output `protobuf_oneof:"output"`
}
func (x *WorkflowStep) Reset() {
*x = WorkflowStep{}
if protoimpl.UnsafeEnabled {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WorkflowStep) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WorkflowStep) ProtoMessage() {}
func (x *WorkflowStep) ProtoReflect() protoreflect.Message {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WorkflowStep.ProtoReflect.Descriptor instead.
func (*WorkflowStep) Descriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{2}
}
func (x *WorkflowStep) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (m *WorkflowStep) GetOutput() isWorkflowStep_Output {
if m != nil {
return m.Output
}
return nil
}
func (x *WorkflowStep) GetTxStepOutput() *TxStepOutput {
if x, ok := x.GetOutput().(*WorkflowStep_TxStepOutput); ok {
return x.TxStepOutput
}
return nil
}
func (x *WorkflowStep) GetWaitStepOutput() *WaitStepOutput {
if x, ok := x.GetOutput().(*WorkflowStep_WaitStepOutput); ok {
return x.WaitStepOutput
}
return nil
}
type isWorkflowStep_Output interface {
isWorkflowStep_Output()
}
type WorkflowStep_TxStepOutput struct {
// The tx step output (e.g. transaction metadata such as unsigned tx, signed tx etc).
TxStepOutput *TxStepOutput `protobuf:"bytes,2,opt,name=tx_step_output,json=txStepOutput,proto3,oneof"`
}
type WorkflowStep_WaitStepOutput struct {
// The waiting details for any kind like how many checkpoints away for unbonding etc.
WaitStepOutput *WaitStepOutput `protobuf:"bytes,3,opt,name=wait_step_output,json=waitStepOutput,proto3,oneof"`
}
func (*WorkflowStep_TxStepOutput) isWorkflowStep_Output() {}
func (*WorkflowStep_WaitStepOutput) isWorkflowStep_Output() {}
// A Workflow resource.
type Workflow struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The resource name of the workflow.
// Format: projects/{projectUUID}/workflows/{workflowUUID}
// Ex: projects/ 123e4567-e89b-12d3-a456-426614174000/workflows/123e4567-e89b-12d3-a456-426614174000
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The resource name of the action being
// performed.
// Format: protocols/{protocol}/networks/{network}/actions/{action}
Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
// The parameters of the action to take.
//
// Types that are assignable to StakingParameters:
//
// *Workflow_SolanaStakingParameters
// *Workflow_EthereumKilnStakingParameters
StakingParameters isWorkflow_StakingParameters `protobuf_oneof:"staking_parameters"`
// The current state of the workflow.
State Workflow_State `protobuf:"varint,4,opt,name=state,proto3,enum=coinbase.staking.orchestration.v1.Workflow_State" json:"state,omitempty"`
// The index of the current step.
CurrentStepId int32 `protobuf:"varint,5,opt,name=current_step_id,json=currentStepId,proto3" json:"current_step_id,omitempty"`
// The list of steps for this workflow.
Steps []*WorkflowStep `protobuf:"bytes,6,rep,name=steps,proto3" json:"steps,omitempty"`
// The timestamp the workflow was created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// The timestamp the workflow was last updated.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// The timestamp the workflow completed.
CompleteTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=complete_time,json=completeTime,proto3" json:"complete_time,omitempty"`
}
func (x *Workflow) Reset() {
*x = Workflow{}
if protoimpl.UnsafeEnabled {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Workflow) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Workflow) ProtoMessage() {}
func (x *Workflow) ProtoReflect() protoreflect.Message {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Workflow.ProtoReflect.Descriptor instead.
func (*Workflow) Descriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{3}
}
func (x *Workflow) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Workflow) GetAction() string {
if x != nil {
return x.Action
}
return ""
}
func (m *Workflow) GetStakingParameters() isWorkflow_StakingParameters {
if m != nil {
return m.StakingParameters
}
return nil
}
func (x *Workflow) GetSolanaStakingParameters() *SolanaStakingParameters {
if x, ok := x.GetStakingParameters().(*Workflow_SolanaStakingParameters); ok {
return x.SolanaStakingParameters
}
return nil
}
func (x *Workflow) GetEthereumKilnStakingParameters() *EthereumKilnStakingParameters {
if x, ok := x.GetStakingParameters().(*Workflow_EthereumKilnStakingParameters); ok {
return x.EthereumKilnStakingParameters
}
return nil
}
func (x *Workflow) GetState() Workflow_State {
if x != nil {
return x.State
}
return Workflow_STATE_UNSPECIFIED
}
func (x *Workflow) GetCurrentStepId() int32 {
if x != nil {
return x.CurrentStepId
}
return 0
}
func (x *Workflow) GetSteps() []*WorkflowStep {
if x != nil {
return x.Steps
}
return nil
}
func (x *Workflow) GetCreateTime() *timestamppb.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *Workflow) GetUpdateTime() *timestamppb.Timestamp {
if x != nil {
return x.UpdateTime
}
return nil
}
func (x *Workflow) GetCompleteTime() *timestamppb.Timestamp {
if x != nil {
return x.CompleteTime
}
return nil
}
type isWorkflow_StakingParameters interface {
isWorkflow_StakingParameters()
}
type Workflow_SolanaStakingParameters struct {
// Solana staking parameters.
SolanaStakingParameters *SolanaStakingParameters `protobuf:"bytes,9,opt,name=solana_staking_parameters,json=solanaStakingParameters,proto3,oneof"`
}
type Workflow_EthereumKilnStakingParameters struct {
// EthereumKiln staking parameters.
EthereumKilnStakingParameters *EthereumKilnStakingParameters `protobuf:"bytes,10,opt,name=ethereum_kiln_staking_parameters,json=ethereumKilnStakingParameters,proto3,oneof"`
}
func (*Workflow_SolanaStakingParameters) isWorkflow_StakingParameters() {}
func (*Workflow_EthereumKilnStakingParameters) isWorkflow_StakingParameters() {}
// The request message for CreateWorkflow.
type CreateWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The resource name of the parent that owns
// the workflow.
// Format: projects/{project}
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The workflow to create.
Workflow *Workflow `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"`
}
func (x *CreateWorkflowRequest) Reset() {
*x = CreateWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateWorkflowRequest) ProtoMessage() {}
func (x *CreateWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateWorkflowRequest.ProtoReflect.Descriptor instead.
func (*CreateWorkflowRequest) Descriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{4}
}
func (x *CreateWorkflowRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *CreateWorkflowRequest) GetWorkflow() *Workflow {
if x != nil {
return x.Workflow
}
return nil
}
// The message for GetWorkflow.
type GetWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The resource name of the workflow.
// Format: projects/{project}/workflows/{workflow}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GetWorkflowRequest) Reset() {
*x = GetWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWorkflowRequest) ProtoMessage() {}
func (x *GetWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetWorkflowRequest.ProtoReflect.Descriptor instead.
func (*GetWorkflowRequest) Descriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{5}
}
func (x *GetWorkflowRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// The message for ListWorkflows.
type ListWorkflowsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The resource name of the parent that owns
// the collection of networks.
// Format: projects/{project}
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// [AIP-160](https://google.aip.dev/160) filter
// Supported fields:
// - string action: "stake", "unstake"
// - string protocol: "ethereum_kiln"
// - string network: "holesky", "mainnet"
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// The maximum number of workflows to return. The service may
//
// return fewer than this value.
//
// If unspecified, 100 workflows will be returned.
// The maximum value is 1000; values over 1000 will be floored to 1000.
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// A page token as part of the response of a previous call.
// Provide this to retrieve the next page.
//
// When paginating, all other parameters must match the previous
// request to list resources.
PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
}
func (x *ListWorkflowsRequest) Reset() {
*x = ListWorkflowsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListWorkflowsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListWorkflowsRequest) ProtoMessage() {}
func (x *ListWorkflowsRequest) ProtoReflect() protoreflect.Message {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListWorkflowsRequest.ProtoReflect.Descriptor instead.
func (*ListWorkflowsRequest) Descriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{6}
}
func (x *ListWorkflowsRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *ListWorkflowsRequest) GetFilter() string {
if x != nil {
return x.Filter
}
return ""
}
func (x *ListWorkflowsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListWorkflowsRequest) GetPageToken() string {
if x != nil {
return x.PageToken
}
return ""
}
// The response message for ListWorkflows.
type ListWorkflowsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of workflows.
Workflows []*Workflow `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"`
// A token which can be provided as `page_token` to retrieve the next page.
// If this field is omitted, there are no additional pages.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
}
func (x *ListWorkflowsResponse) Reset() {
*x = ListWorkflowsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListWorkflowsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListWorkflowsResponse) ProtoMessage() {}
func (x *ListWorkflowsResponse) ProtoReflect() protoreflect.Message {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListWorkflowsResponse.ProtoReflect.Descriptor instead.
func (*ListWorkflowsResponse) Descriptor() ([]byte, []int) {
return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{7}
}
func (x *ListWorkflowsResponse) GetWorkflows() []*Workflow {
if x != nil {
return x.Workflows
}
return nil
}
func (x *ListWorkflowsResponse) GetNextPageToken() string {
if x != nil {
return x.NextPageToken
}
return ""
}
// The request message for PerformWorkflowStep.
type PerformWorkflowStepRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The resource name of the workflow.
// Format: projects/{project}/workflows/{workflow}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The index of the step to be performed.
Step int32 `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"`
// Transaction metadata. This is either the signed transaction or transaction hash depending on the workflow's broadcast method.
Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *PerformWorkflowStepRequest) Reset() {
*x = PerformWorkflowStepRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}