@zoguxprotocol/proto 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,44 @@ import { EventParams, EventParamsSDKType, ProposeParams, ProposeParamsSDKType, S
2
2
  import { BridgeEventInfo, BridgeEventInfoSDKType } from "./bridge_event_info";
3
3
  import { MsgCompleteBridge, MsgCompleteBridgeSDKType } from "./tx";
4
4
  import { WithdrawalRequest, WithdrawalRequestSDKType } from "./withdrawal";
5
+ import { Long, DeepPartial } from "../../helpers";
5
6
  import * as _m0 from "protobufjs/minimal";
6
- import { DeepPartial, Long } from "../../helpers";
7
+ /**
8
+ * QueryVerifyWithdrawalForTSSRequest is a request type for the
9
+ * VerifyWithdrawalForTSS RPC method.
10
+ */
11
+
12
+ export interface QueryVerifyWithdrawalForTSSRequest {
13
+ withdrawalId: string;
14
+ requiredConfirmations: Long;
15
+ }
16
+ /**
17
+ * QueryVerifyWithdrawalForTSSRequest is a request type for the
18
+ * VerifyWithdrawalForTSS RPC method.
19
+ */
20
+
21
+ export interface QueryVerifyWithdrawalForTSSRequestSDKType {
22
+ withdrawal_id: string;
23
+ required_confirmations: Long;
24
+ }
25
+ /**
26
+ * QueryVerifyWithdrawalForTSSResponse is a response type for the
27
+ * VerifyWithdrawalForTSS RPC method.
28
+ */
29
+
30
+ export interface QueryVerifyWithdrawalForTSSResponse {
31
+ verified: boolean;
32
+ messageHash: Uint8Array;
33
+ }
34
+ /**
35
+ * QueryVerifyWithdrawalForTSSResponse is a response type for the
36
+ * VerifyWithdrawalForTSS RPC method.
37
+ */
38
+
39
+ export interface QueryVerifyWithdrawalForTSSResponseSDKType {
40
+ verified: boolean;
41
+ message_hash: Uint8Array;
42
+ }
7
43
  /** QueryEventParamsRequest is a request type for the EventParams RPC method. */
8
44
 
9
45
  export interface QueryEventParamsRequest {}
@@ -332,6 +368,116 @@ export interface QueryWithdrawalByChainAndNonceResponseSDKType {
332
368
  found: boolean;
333
369
  }
334
370
 
371
+ function createBaseQueryVerifyWithdrawalForTSSRequest(): QueryVerifyWithdrawalForTSSRequest {
372
+ return {
373
+ withdrawalId: "",
374
+ requiredConfirmations: Long.UZERO
375
+ };
376
+ }
377
+
378
+ export const QueryVerifyWithdrawalForTSSRequest = {
379
+ encode(message: QueryVerifyWithdrawalForTSSRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
380
+ if (message.withdrawalId !== "") {
381
+ writer.uint32(10).string(message.withdrawalId);
382
+ }
383
+
384
+ if (!message.requiredConfirmations.isZero()) {
385
+ writer.uint32(16).uint64(message.requiredConfirmations);
386
+ }
387
+
388
+ return writer;
389
+ },
390
+
391
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryVerifyWithdrawalForTSSRequest {
392
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
393
+ let end = length === undefined ? reader.len : reader.pos + length;
394
+ const message = createBaseQueryVerifyWithdrawalForTSSRequest();
395
+
396
+ while (reader.pos < end) {
397
+ const tag = reader.uint32();
398
+
399
+ switch (tag >>> 3) {
400
+ case 1:
401
+ message.withdrawalId = reader.string();
402
+ break;
403
+
404
+ case 2:
405
+ message.requiredConfirmations = (reader.uint64() as Long);
406
+ break;
407
+
408
+ default:
409
+ reader.skipType(tag & 7);
410
+ break;
411
+ }
412
+ }
413
+
414
+ return message;
415
+ },
416
+
417
+ fromPartial(object: DeepPartial<QueryVerifyWithdrawalForTSSRequest>): QueryVerifyWithdrawalForTSSRequest {
418
+ const message = createBaseQueryVerifyWithdrawalForTSSRequest();
419
+ message.withdrawalId = object.withdrawalId ?? "";
420
+ message.requiredConfirmations = object.requiredConfirmations !== undefined && object.requiredConfirmations !== null ? Long.fromValue(object.requiredConfirmations) : Long.UZERO;
421
+ return message;
422
+ }
423
+
424
+ };
425
+
426
+ function createBaseQueryVerifyWithdrawalForTSSResponse(): QueryVerifyWithdrawalForTSSResponse {
427
+ return {
428
+ verified: false,
429
+ messageHash: new Uint8Array()
430
+ };
431
+ }
432
+
433
+ export const QueryVerifyWithdrawalForTSSResponse = {
434
+ encode(message: QueryVerifyWithdrawalForTSSResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
435
+ if (message.verified === true) {
436
+ writer.uint32(8).bool(message.verified);
437
+ }
438
+
439
+ if (message.messageHash.length !== 0) {
440
+ writer.uint32(18).bytes(message.messageHash);
441
+ }
442
+
443
+ return writer;
444
+ },
445
+
446
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryVerifyWithdrawalForTSSResponse {
447
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
448
+ let end = length === undefined ? reader.len : reader.pos + length;
449
+ const message = createBaseQueryVerifyWithdrawalForTSSResponse();
450
+
451
+ while (reader.pos < end) {
452
+ const tag = reader.uint32();
453
+
454
+ switch (tag >>> 3) {
455
+ case 1:
456
+ message.verified = reader.bool();
457
+ break;
458
+
459
+ case 2:
460
+ message.messageHash = reader.bytes();
461
+ break;
462
+
463
+ default:
464
+ reader.skipType(tag & 7);
465
+ break;
466
+ }
467
+ }
468
+
469
+ return message;
470
+ },
471
+
472
+ fromPartial(object: DeepPartial<QueryVerifyWithdrawalForTSSResponse>): QueryVerifyWithdrawalForTSSResponse {
473
+ const message = createBaseQueryVerifyWithdrawalForTSSResponse();
474
+ message.verified = object.verified ?? false;
475
+ message.messageHash = object.messageHash ?? new Uint8Array();
476
+ return message;
477
+ }
478
+
479
+ };
480
+
335
481
  function createBaseQueryEventParamsRequest(): QueryEventParamsRequest {
336
482
  return {};
337
483
  }
@@ -137,19 +137,90 @@ export interface MsgSubmitWithdrawalSignatureResponse {}
137
137
  /** MsgSubmitWithdrawalSignatureResponse is the response. */
138
138
 
139
139
  export interface MsgSubmitWithdrawalSignatureResponseSDKType {}
140
- /** MsgCompleteWithdrawal finalizes a withdrawal after threshold signatures. */
140
+ /**
141
+ * MsgMarkWithdrawalSubmitted marks a withdrawal as submitted to EVM chain.
142
+ * Called by signer after successfully submitting to EVM.
143
+ */
144
+
145
+ export interface MsgMarkWithdrawalSubmitted {
146
+ /** Signer who submitted the withdrawal. */
147
+ signer: string;
148
+ /** Withdrawal ID. */
149
+
150
+ withdrawalId: string;
151
+ /** EVM transaction hash. */
152
+
153
+ evmTxHash: string;
154
+ }
155
+ /**
156
+ * MsgMarkWithdrawalSubmitted marks a withdrawal as submitted to EVM chain.
157
+ * Called by signer after successfully submitting to EVM.
158
+ */
159
+
160
+ export interface MsgMarkWithdrawalSubmittedSDKType {
161
+ signer: string;
162
+ withdrawal_id: string;
163
+ evm_tx_hash: string;
164
+ }
165
+ /** MsgMarkWithdrawalSubmittedResponse is the response. */
166
+
167
+ export interface MsgMarkWithdrawalSubmittedResponse {}
168
+ /** MsgMarkWithdrawalSubmittedResponse is the response. */
169
+
170
+ export interface MsgMarkWithdrawalSubmittedResponseSDKType {}
171
+ /**
172
+ * MsgConfirmWithdrawal confirms a withdrawal was processed on EVM.
173
+ * Called when we receive WithdrawalProcessed event from bridge contract.
174
+ */
175
+
176
+ export interface MsgConfirmWithdrawal {
177
+ signer: string;
178
+ /** Withdrawal ID to confirm. */
179
+
180
+ withdrawalId: string;
181
+ /** EVM transaction hash confirming the withdrawal. */
182
+
183
+ evmTxHash: string;
184
+ }
185
+ /**
186
+ * MsgConfirmWithdrawal confirms a withdrawal was processed on EVM.
187
+ * Called when we receive WithdrawalProcessed event from bridge contract.
188
+ */
189
+
190
+ export interface MsgConfirmWithdrawalSDKType {
191
+ signer: string;
192
+ withdrawal_id: string;
193
+ evm_tx_hash: string;
194
+ }
195
+ /** MsgConfirmWithdrawalResponse is the response. */
196
+
197
+ export interface MsgConfirmWithdrawalResponse {}
198
+ /** MsgConfirmWithdrawalResponse is the response. */
199
+
200
+ export interface MsgConfirmWithdrawalResponseSDKType {}
201
+ /**
202
+ * MsgCompleteWithdrawal finalizes a withdrawal after threshold signatures.
203
+ * DEPRECATED: Use MsgConfirmWithdrawal instead for the new flow.
204
+ */
141
205
 
142
206
  export interface MsgCompleteWithdrawal {
143
207
  authority: string;
144
208
  /** Withdrawal ID to complete. */
145
209
 
146
210
  withdrawalId: string;
211
+ /** EVM transaction hash (optional, for legacy compatibility). */
212
+
213
+ evmTxHash: string;
147
214
  }
148
- /** MsgCompleteWithdrawal finalizes a withdrawal after threshold signatures. */
215
+ /**
216
+ * MsgCompleteWithdrawal finalizes a withdrawal after threshold signatures.
217
+ * DEPRECATED: Use MsgConfirmWithdrawal instead for the new flow.
218
+ */
149
219
 
150
220
  export interface MsgCompleteWithdrawalSDKType {
151
221
  authority: string;
152
222
  withdrawal_id: string;
223
+ evm_tx_hash: string;
153
224
  }
154
225
  /** MsgCompleteWithdrawalResponse is the response. */
155
226
 
@@ -694,10 +765,209 @@ export const MsgSubmitWithdrawalSignatureResponse = {
694
765
 
695
766
  };
696
767
 
768
+ function createBaseMsgMarkWithdrawalSubmitted(): MsgMarkWithdrawalSubmitted {
769
+ return {
770
+ signer: "",
771
+ withdrawalId: "",
772
+ evmTxHash: ""
773
+ };
774
+ }
775
+
776
+ export const MsgMarkWithdrawalSubmitted = {
777
+ encode(message: MsgMarkWithdrawalSubmitted, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
778
+ if (message.signer !== "") {
779
+ writer.uint32(10).string(message.signer);
780
+ }
781
+
782
+ if (message.withdrawalId !== "") {
783
+ writer.uint32(18).string(message.withdrawalId);
784
+ }
785
+
786
+ if (message.evmTxHash !== "") {
787
+ writer.uint32(26).string(message.evmTxHash);
788
+ }
789
+
790
+ return writer;
791
+ },
792
+
793
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgMarkWithdrawalSubmitted {
794
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
795
+ let end = length === undefined ? reader.len : reader.pos + length;
796
+ const message = createBaseMsgMarkWithdrawalSubmitted();
797
+
798
+ while (reader.pos < end) {
799
+ const tag = reader.uint32();
800
+
801
+ switch (tag >>> 3) {
802
+ case 1:
803
+ message.signer = reader.string();
804
+ break;
805
+
806
+ case 2:
807
+ message.withdrawalId = reader.string();
808
+ break;
809
+
810
+ case 3:
811
+ message.evmTxHash = reader.string();
812
+ break;
813
+
814
+ default:
815
+ reader.skipType(tag & 7);
816
+ break;
817
+ }
818
+ }
819
+
820
+ return message;
821
+ },
822
+
823
+ fromPartial(object: DeepPartial<MsgMarkWithdrawalSubmitted>): MsgMarkWithdrawalSubmitted {
824
+ const message = createBaseMsgMarkWithdrawalSubmitted();
825
+ message.signer = object.signer ?? "";
826
+ message.withdrawalId = object.withdrawalId ?? "";
827
+ message.evmTxHash = object.evmTxHash ?? "";
828
+ return message;
829
+ }
830
+
831
+ };
832
+
833
+ function createBaseMsgMarkWithdrawalSubmittedResponse(): MsgMarkWithdrawalSubmittedResponse {
834
+ return {};
835
+ }
836
+
837
+ export const MsgMarkWithdrawalSubmittedResponse = {
838
+ encode(_: MsgMarkWithdrawalSubmittedResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
839
+ return writer;
840
+ },
841
+
842
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgMarkWithdrawalSubmittedResponse {
843
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
844
+ let end = length === undefined ? reader.len : reader.pos + length;
845
+ const message = createBaseMsgMarkWithdrawalSubmittedResponse();
846
+
847
+ while (reader.pos < end) {
848
+ const tag = reader.uint32();
849
+
850
+ switch (tag >>> 3) {
851
+ default:
852
+ reader.skipType(tag & 7);
853
+ break;
854
+ }
855
+ }
856
+
857
+ return message;
858
+ },
859
+
860
+ fromPartial(_: DeepPartial<MsgMarkWithdrawalSubmittedResponse>): MsgMarkWithdrawalSubmittedResponse {
861
+ const message = createBaseMsgMarkWithdrawalSubmittedResponse();
862
+ return message;
863
+ }
864
+
865
+ };
866
+
867
+ function createBaseMsgConfirmWithdrawal(): MsgConfirmWithdrawal {
868
+ return {
869
+ signer: "",
870
+ withdrawalId: "",
871
+ evmTxHash: ""
872
+ };
873
+ }
874
+
875
+ export const MsgConfirmWithdrawal = {
876
+ encode(message: MsgConfirmWithdrawal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
877
+ if (message.signer !== "") {
878
+ writer.uint32(10).string(message.signer);
879
+ }
880
+
881
+ if (message.withdrawalId !== "") {
882
+ writer.uint32(18).string(message.withdrawalId);
883
+ }
884
+
885
+ if (message.evmTxHash !== "") {
886
+ writer.uint32(26).string(message.evmTxHash);
887
+ }
888
+
889
+ return writer;
890
+ },
891
+
892
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgConfirmWithdrawal {
893
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
894
+ let end = length === undefined ? reader.len : reader.pos + length;
895
+ const message = createBaseMsgConfirmWithdrawal();
896
+
897
+ while (reader.pos < end) {
898
+ const tag = reader.uint32();
899
+
900
+ switch (tag >>> 3) {
901
+ case 1:
902
+ message.signer = reader.string();
903
+ break;
904
+
905
+ case 2:
906
+ message.withdrawalId = reader.string();
907
+ break;
908
+
909
+ case 3:
910
+ message.evmTxHash = reader.string();
911
+ break;
912
+
913
+ default:
914
+ reader.skipType(tag & 7);
915
+ break;
916
+ }
917
+ }
918
+
919
+ return message;
920
+ },
921
+
922
+ fromPartial(object: DeepPartial<MsgConfirmWithdrawal>): MsgConfirmWithdrawal {
923
+ const message = createBaseMsgConfirmWithdrawal();
924
+ message.signer = object.signer ?? "";
925
+ message.withdrawalId = object.withdrawalId ?? "";
926
+ message.evmTxHash = object.evmTxHash ?? "";
927
+ return message;
928
+ }
929
+
930
+ };
931
+
932
+ function createBaseMsgConfirmWithdrawalResponse(): MsgConfirmWithdrawalResponse {
933
+ return {};
934
+ }
935
+
936
+ export const MsgConfirmWithdrawalResponse = {
937
+ encode(_: MsgConfirmWithdrawalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
938
+ return writer;
939
+ },
940
+
941
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgConfirmWithdrawalResponse {
942
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
943
+ let end = length === undefined ? reader.len : reader.pos + length;
944
+ const message = createBaseMsgConfirmWithdrawalResponse();
945
+
946
+ while (reader.pos < end) {
947
+ const tag = reader.uint32();
948
+
949
+ switch (tag >>> 3) {
950
+ default:
951
+ reader.skipType(tag & 7);
952
+ break;
953
+ }
954
+ }
955
+
956
+ return message;
957
+ },
958
+
959
+ fromPartial(_: DeepPartial<MsgConfirmWithdrawalResponse>): MsgConfirmWithdrawalResponse {
960
+ const message = createBaseMsgConfirmWithdrawalResponse();
961
+ return message;
962
+ }
963
+
964
+ };
965
+
697
966
  function createBaseMsgCompleteWithdrawal(): MsgCompleteWithdrawal {
698
967
  return {
699
968
  authority: "",
700
- withdrawalId: ""
969
+ withdrawalId: "",
970
+ evmTxHash: ""
701
971
  };
702
972
  }
703
973
 
@@ -711,6 +981,10 @@ export const MsgCompleteWithdrawal = {
711
981
  writer.uint32(18).string(message.withdrawalId);
712
982
  }
713
983
 
984
+ if (message.evmTxHash !== "") {
985
+ writer.uint32(26).string(message.evmTxHash);
986
+ }
987
+
714
988
  return writer;
715
989
  },
716
990
 
@@ -731,6 +1005,10 @@ export const MsgCompleteWithdrawal = {
731
1005
  message.withdrawalId = reader.string();
732
1006
  break;
733
1007
 
1008
+ case 3:
1009
+ message.evmTxHash = reader.string();
1010
+ break;
1011
+
734
1012
  default:
735
1013
  reader.skipType(tag & 7);
736
1014
  break;
@@ -744,6 +1022,7 @@ export const MsgCompleteWithdrawal = {
744
1022
  const message = createBaseMsgCompleteWithdrawal();
745
1023
  message.authority = object.authority ?? "";
746
1024
  message.withdrawalId = object.withdrawalId ?? "";
1025
+ message.evmTxHash = object.evmTxHash ?? "";
747
1026
  return message;
748
1027
  }
749
1028
 
@@ -2,7 +2,7 @@ import { MsgAddTokenInfo, MsgAddTokenInfoResponse, MsgRemoveTokenInfo, MsgRemove
2
2
  import { Rpc } from "../../helpers";
3
3
  import * as _m0 from "protobufjs/minimal";
4
4
  import { MsgAcknowledgeBridges, MsgAcknowledgeBridgesResponse, MsgCompleteBridge, MsgCompleteBridgeResponse, MsgUpdateEventParams, MsgUpdateEventParamsResponse, MsgUpdateProposeParams, MsgUpdateProposeParamsResponse, MsgUpdateSafetyParams, MsgUpdateSafetyParamsResponse } from "./tx";
5
- import { MsgRequestWithdrawal, MsgRequestWithdrawalResponse, MsgSubmitWithdrawalSignature, MsgSubmitWithdrawalSignatureResponse, MsgCompleteWithdrawal, MsgCompleteWithdrawalResponse, MsgCancelWithdrawal, MsgCancelWithdrawalResponse, MsgUpdateWhitelist, MsgUpdateWhitelistResponse, MsgUpdateTSSParams, MsgUpdateTSSParamsResponse } from "./tss";
5
+ import { MsgRequestWithdrawal, MsgRequestWithdrawalResponse, MsgSubmitWithdrawalSignature, MsgSubmitWithdrawalSignatureResponse, MsgMarkWithdrawalSubmitted, MsgMarkWithdrawalSubmittedResponse, MsgConfirmWithdrawal, MsgConfirmWithdrawalResponse, MsgCompleteWithdrawal, MsgCompleteWithdrawalResponse, MsgCancelWithdrawal, MsgCancelWithdrawalResponse, MsgUpdateWhitelist, MsgUpdateWhitelistResponse, MsgUpdateTSSParams, MsgUpdateTSSParamsResponse } from "./tss";
6
6
  /** Msg defines the Msg service. */
7
7
 
8
8
  export interface Msg {
@@ -29,7 +29,16 @@ export interface Msg {
29
29
  /** SubmitWithdrawalSignature allows validators to submit TSS signatures. */
30
30
 
31
31
  submitWithdrawalSignature(request: MsgSubmitWithdrawalSignature): Promise<MsgSubmitWithdrawalSignatureResponse>;
32
- /** CompleteWithdrawal finalizes a withdrawal after threshold signatures. */
32
+ /** MarkWithdrawalSubmitted marks a withdrawal as submitted to EVM. */
33
+
34
+ markWithdrawalSubmitted(request: MsgMarkWithdrawalSubmitted): Promise<MsgMarkWithdrawalSubmittedResponse>;
35
+ /** ConfirmWithdrawal confirms a withdrawal was processed on EVM. */
36
+
37
+ confirmWithdrawal(request: MsgConfirmWithdrawal): Promise<MsgConfirmWithdrawalResponse>;
38
+ /**
39
+ * CompleteWithdrawal finalizes a withdrawal after threshold signatures.
40
+ * DEPRECATED: Use ConfirmWithdrawal instead.
41
+ */
33
42
 
34
43
  completeWithdrawal(request: MsgCompleteWithdrawal): Promise<MsgCompleteWithdrawalResponse>;
35
44
  /** CancelWithdrawal cancels a timed-out withdrawal. */
@@ -63,6 +72,8 @@ export class MsgClientImpl implements Msg {
63
72
  this.updateSafetyParams = this.updateSafetyParams.bind(this);
64
73
  this.requestWithdrawal = this.requestWithdrawal.bind(this);
65
74
  this.submitWithdrawalSignature = this.submitWithdrawalSignature.bind(this);
75
+ this.markWithdrawalSubmitted = this.markWithdrawalSubmitted.bind(this);
76
+ this.confirmWithdrawal = this.confirmWithdrawal.bind(this);
66
77
  this.completeWithdrawal = this.completeWithdrawal.bind(this);
67
78
  this.cancelWithdrawal = this.cancelWithdrawal.bind(this);
68
79
  this.updateWhitelist = this.updateWhitelist.bind(this);
@@ -114,6 +125,18 @@ export class MsgClientImpl implements Msg {
114
125
  return promise.then(data => MsgSubmitWithdrawalSignatureResponse.decode(new _m0.Reader(data)));
115
126
  }
116
127
 
128
+ markWithdrawalSubmitted(request: MsgMarkWithdrawalSubmitted): Promise<MsgMarkWithdrawalSubmittedResponse> {
129
+ const data = MsgMarkWithdrawalSubmitted.encode(request).finish();
130
+ const promise = this.rpc.request("zogux.bridge.Msg", "MarkWithdrawalSubmitted", data);
131
+ return promise.then(data => MsgMarkWithdrawalSubmittedResponse.decode(new _m0.Reader(data)));
132
+ }
133
+
134
+ confirmWithdrawal(request: MsgConfirmWithdrawal): Promise<MsgConfirmWithdrawalResponse> {
135
+ const data = MsgConfirmWithdrawal.encode(request).finish();
136
+ const promise = this.rpc.request("zogux.bridge.Msg", "ConfirmWithdrawal", data);
137
+ return promise.then(data => MsgConfirmWithdrawalResponse.decode(new _m0.Reader(data)));
138
+ }
139
+
117
140
  completeWithdrawal(request: MsgCompleteWithdrawal): Promise<MsgCompleteWithdrawalResponse> {
118
141
  const data = MsgCompleteWithdrawal.encode(request).finish();
119
142
  const promise = this.rpc.request("zogux.bridge.Msg", "CompleteWithdrawal", data);
@@ -12,7 +12,7 @@ export enum WithdrawalStatus {
12
12
  /** WITHDRAWAL_STATUS_SIGNED - Withdrawal has enough TSS signatures */
13
13
  WITHDRAWAL_STATUS_SIGNED = 2,
14
14
 
15
- /** WITHDRAWAL_STATUS_COMPLETED - Withdrawal has been completed */
15
+ /** WITHDRAWAL_STATUS_COMPLETED - Withdrawal has been completed (confirmed on EVM) */
16
16
  WITHDRAWAL_STATUS_COMPLETED = 3,
17
17
 
18
18
  /** WITHDRAWAL_STATUS_FAILED - Withdrawal has failed */
@@ -20,6 +20,9 @@ export enum WithdrawalStatus {
20
20
 
21
21
  /** WITHDRAWAL_STATUS_CANCELLED - Withdrawal has been cancelled */
22
22
  WITHDRAWAL_STATUS_CANCELLED = 5,
23
+
24
+ /** WITHDRAWAL_STATUS_SUBMITTED - Withdrawal has been submitted to EVM chain, waiting for confirmation */
25
+ WITHDRAWAL_STATUS_SUBMITTED = 6,
23
26
  UNRECOGNIZED = -1,
24
27
  }
25
28
  export const WithdrawalStatusSDKType = WithdrawalStatus;
@@ -49,6 +52,10 @@ export function withdrawalStatusFromJSON(object: any): WithdrawalStatus {
49
52
  case "WITHDRAWAL_STATUS_CANCELLED":
50
53
  return WithdrawalStatus.WITHDRAWAL_STATUS_CANCELLED;
51
54
 
55
+ case 6:
56
+ case "WITHDRAWAL_STATUS_SUBMITTED":
57
+ return WithdrawalStatus.WITHDRAWAL_STATUS_SUBMITTED;
58
+
52
59
  case -1:
53
60
  case "UNRECOGNIZED":
54
61
  default:
@@ -75,6 +82,9 @@ export function withdrawalStatusToJSON(object: WithdrawalStatus): string {
75
82
  case WithdrawalStatus.WITHDRAWAL_STATUS_CANCELLED:
76
83
  return "WITHDRAWAL_STATUS_CANCELLED";
77
84
 
85
+ case WithdrawalStatus.WITHDRAWAL_STATUS_SUBMITTED:
86
+ return "WITHDRAWAL_STATUS_SUBMITTED";
87
+
78
88
  case WithdrawalStatus.UNRECOGNIZED:
79
89
  default:
80
90
  return "UNRECOGNIZED";
@@ -121,6 +131,15 @@ export interface WithdrawalRequest {
121
131
  /** Cancellation reason (if cancelled) */
122
132
 
123
133
  cancelReason: string;
134
+ /** EVM token address for signature verification (resolved from token pairs) */
135
+
136
+ evmTokenAddress: string;
137
+ /** Source chain decimals for the token */
138
+
139
+ srcDecimals: number;
140
+ /** Destination chain decimals for the token */
141
+
142
+ dstDecimals: number;
124
143
  }
125
144
  /** WithdrawalRequest represents a pending withdrawal request. */
126
145
 
@@ -138,6 +157,9 @@ export interface WithdrawalRequestSDKType {
138
157
  signature_count: number;
139
158
  completed_height: Long;
140
159
  cancel_reason: string;
160
+ evm_token_address: string;
161
+ src_decimals: number;
162
+ dst_decimals: number;
141
163
  }
142
164
 
143
165
  function createBaseWithdrawalRequest(): WithdrawalRequest {
@@ -154,7 +176,10 @@ function createBaseWithdrawalRequest(): WithdrawalRequest {
154
176
  tssSignatures: [],
155
177
  signatureCount: 0,
156
178
  completedHeight: Long.UZERO,
157
- cancelReason: ""
179
+ cancelReason: "",
180
+ evmTokenAddress: "",
181
+ srcDecimals: 0,
182
+ dstDecimals: 0
158
183
  };
159
184
  }
160
185
 
@@ -212,6 +237,18 @@ export const WithdrawalRequest = {
212
237
  writer.uint32(106).string(message.cancelReason);
213
238
  }
214
239
 
240
+ if (message.evmTokenAddress !== "") {
241
+ writer.uint32(114).string(message.evmTokenAddress);
242
+ }
243
+
244
+ if (message.srcDecimals !== 0) {
245
+ writer.uint32(120).uint32(message.srcDecimals);
246
+ }
247
+
248
+ if (message.dstDecimals !== 0) {
249
+ writer.uint32(128).uint32(message.dstDecimals);
250
+ }
251
+
215
252
  return writer;
216
253
  },
217
254
 
@@ -276,6 +313,18 @@ export const WithdrawalRequest = {
276
313
  message.cancelReason = reader.string();
277
314
  break;
278
315
 
316
+ case 14:
317
+ message.evmTokenAddress = reader.string();
318
+ break;
319
+
320
+ case 15:
321
+ message.srcDecimals = reader.uint32();
322
+ break;
323
+
324
+ case 16:
325
+ message.dstDecimals = reader.uint32();
326
+ break;
327
+
279
328
  default:
280
329
  reader.skipType(tag & 7);
281
330
  break;
@@ -300,6 +349,9 @@ export const WithdrawalRequest = {
300
349
  message.signatureCount = object.signatureCount ?? 0;
301
350
  message.completedHeight = object.completedHeight !== undefined && object.completedHeight !== null ? Long.fromValue(object.completedHeight) : Long.UZERO;
302
351
  message.cancelReason = object.cancelReason ?? "";
352
+ message.evmTokenAddress = object.evmTokenAddress ?? "";
353
+ message.srcDecimals = object.srcDecimals ?? 0;
354
+ message.dstDecimals = object.dstDecimals ?? 0;
303
355
  return message;
304
356
  }
305
357