@zoguxprotocol/proto 0.1.8 → 0.1.9

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.
@@ -151,6 +151,12 @@ export interface MsgMarkWithdrawalSubmitted {
151
151
  /** EVM transaction hash. */
152
152
 
153
153
  evmTxHash: string;
154
+ /**
155
+ * EVM bytes32 message from RequestedWithdrawal event.
156
+ * Must be exactly 32 bytes.
157
+ */
158
+
159
+ message: Uint8Array;
154
160
  }
155
161
  /**
156
162
  * MsgMarkWithdrawalSubmitted marks a withdrawal as submitted to EVM chain.
@@ -161,6 +167,7 @@ export interface MsgMarkWithdrawalSubmittedSDKType {
161
167
  signer: string;
162
168
  withdrawal_id: string;
163
169
  evm_tx_hash: string;
170
+ message: Uint8Array;
164
171
  }
165
172
  /** MsgMarkWithdrawalSubmittedResponse is the response. */
166
173
 
@@ -228,7 +235,12 @@ export interface MsgCompleteWithdrawalResponse {}
228
235
  /** MsgCompleteWithdrawalResponse is the response. */
229
236
 
230
237
  export interface MsgCompleteWithdrawalResponseSDKType {}
231
- /** MsgCancelWithdrawal cancels a timed-out withdrawal and refunds. */
238
+ /**
239
+ * MsgCancelWithdrawal cancels a timed-out withdrawal and refunds.
240
+ * The `authority` must be the same account that originally requested the
241
+ * withdrawal (i.e. the withdrawal owner). Only the owner can cancel their
242
+ * own pending withdrawal.
243
+ */
232
244
 
233
245
  export interface MsgCancelWithdrawal {
234
246
  authority: string;
@@ -239,7 +251,12 @@ export interface MsgCancelWithdrawal {
239
251
 
240
252
  reason: string;
241
253
  }
242
- /** MsgCancelWithdrawal cancels a timed-out withdrawal and refunds. */
254
+ /**
255
+ * MsgCancelWithdrawal cancels a timed-out withdrawal and refunds.
256
+ * The `authority` must be the same account that originally requested the
257
+ * withdrawal (i.e. the withdrawal owner). Only the owner can cancel their
258
+ * own pending withdrawal.
259
+ */
243
260
 
244
261
  export interface MsgCancelWithdrawalSDKType {
245
262
  authority: string;
@@ -252,6 +269,74 @@ export interface MsgCancelWithdrawalResponse {}
252
269
  /** MsgCancelWithdrawalResponse is the response. */
253
270
 
254
271
  export interface MsgCancelWithdrawalResponseSDKType {}
272
+ /**
273
+ * MsgFailWithdrawal marks a withdrawal as failed (e.g. TSS timeout, EVM revert);
274
+ * funds remain locked until resolved by admin via ResolveWithdrawal.
275
+ */
276
+
277
+ export interface MsgFailWithdrawal {
278
+ authority: string;
279
+ /** Withdrawal ID to mark as failed. */
280
+
281
+ withdrawalId: string;
282
+ /** Reason for failure (e.g. "tss_timeout", "evm_revert"). */
283
+
284
+ reason: string;
285
+ /** Optional EVM tx hash when failure is due to EVM revert; used as proof in indexer. */
286
+
287
+ evmTxHash: string;
288
+ }
289
+ /**
290
+ * MsgFailWithdrawal marks a withdrawal as failed (e.g. TSS timeout, EVM revert);
291
+ * funds remain locked until resolved by admin via ResolveWithdrawal.
292
+ */
293
+
294
+ export interface MsgFailWithdrawalSDKType {
295
+ authority: string;
296
+ withdrawal_id: string;
297
+ reason: string;
298
+ evm_tx_hash: string;
299
+ }
300
+ /** MsgFailWithdrawalResponse is the response. */
301
+
302
+ export interface MsgFailWithdrawalResponse {}
303
+ /** MsgFailWithdrawalResponse is the response. */
304
+
305
+ export interface MsgFailWithdrawalResponseSDKType {}
306
+ /**
307
+ * MsgResolveWithdrawal sends locked funds of a failed withdrawal to an
308
+ * admin-specified destination (refund to user or another address).
309
+ */
310
+
311
+ export interface MsgResolveWithdrawal {
312
+ authority: string;
313
+ /** Withdrawal ID (must be in FAILED status). */
314
+
315
+ withdrawalId: string;
316
+ /** Destination address for the locked funds (e.g. user for refund, or treasury). */
317
+
318
+ destinationAddress: string;
319
+ /** Optional reason for audit (e.g. "refund", "treasury_recovery"). */
320
+
321
+ reason: string;
322
+ }
323
+ /**
324
+ * MsgResolveWithdrawal sends locked funds of a failed withdrawal to an
325
+ * admin-specified destination (refund to user or another address).
326
+ */
327
+
328
+ export interface MsgResolveWithdrawalSDKType {
329
+ authority: string;
330
+ withdrawal_id: string;
331
+ destination_address: string;
332
+ reason: string;
333
+ }
334
+ /** MsgResolveWithdrawalResponse is the response. */
335
+
336
+ export interface MsgResolveWithdrawalResponse {}
337
+ /** MsgResolveWithdrawalResponse is the response. */
338
+
339
+ export interface MsgResolveWithdrawalResponseSDKType {}
255
340
 
256
341
  function createBaseTSSValidator(): TSSValidator {
257
342
  return {
@@ -769,7 +854,8 @@ function createBaseMsgMarkWithdrawalSubmitted(): MsgMarkWithdrawalSubmitted {
769
854
  return {
770
855
  signer: "",
771
856
  withdrawalId: "",
772
- evmTxHash: ""
857
+ evmTxHash: "",
858
+ message: new Uint8Array()
773
859
  };
774
860
  }
775
861
 
@@ -787,6 +873,10 @@ export const MsgMarkWithdrawalSubmitted = {
787
873
  writer.uint32(26).string(message.evmTxHash);
788
874
  }
789
875
 
876
+ if (message.message.length !== 0) {
877
+ writer.uint32(34).bytes(message.message);
878
+ }
879
+
790
880
  return writer;
791
881
  },
792
882
 
@@ -811,6 +901,10 @@ export const MsgMarkWithdrawalSubmitted = {
811
901
  message.evmTxHash = reader.string();
812
902
  break;
813
903
 
904
+ case 4:
905
+ message.message = reader.bytes();
906
+ break;
907
+
814
908
  default:
815
909
  reader.skipType(tag & 7);
816
910
  break;
@@ -825,6 +919,7 @@ export const MsgMarkWithdrawalSubmitted = {
825
919
  message.signer = object.signer ?? "";
826
920
  message.withdrawalId = object.withdrawalId ?? "";
827
921
  message.evmTxHash = object.evmTxHash ?? "";
922
+ message.message = object.message ?? new Uint8Array();
828
923
  return message;
829
924
  }
830
925
 
@@ -1159,4 +1254,222 @@ export const MsgCancelWithdrawalResponse = {
1159
1254
  return message;
1160
1255
  }
1161
1256
 
1257
+ };
1258
+
1259
+ function createBaseMsgFailWithdrawal(): MsgFailWithdrawal {
1260
+ return {
1261
+ authority: "",
1262
+ withdrawalId: "",
1263
+ reason: "",
1264
+ evmTxHash: ""
1265
+ };
1266
+ }
1267
+
1268
+ export const MsgFailWithdrawal = {
1269
+ encode(message: MsgFailWithdrawal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1270
+ if (message.authority !== "") {
1271
+ writer.uint32(10).string(message.authority);
1272
+ }
1273
+
1274
+ if (message.withdrawalId !== "") {
1275
+ writer.uint32(18).string(message.withdrawalId);
1276
+ }
1277
+
1278
+ if (message.reason !== "") {
1279
+ writer.uint32(26).string(message.reason);
1280
+ }
1281
+
1282
+ if (message.evmTxHash !== "") {
1283
+ writer.uint32(34).string(message.evmTxHash);
1284
+ }
1285
+
1286
+ return writer;
1287
+ },
1288
+
1289
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgFailWithdrawal {
1290
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1291
+ let end = length === undefined ? reader.len : reader.pos + length;
1292
+ const message = createBaseMsgFailWithdrawal();
1293
+
1294
+ while (reader.pos < end) {
1295
+ const tag = reader.uint32();
1296
+
1297
+ switch (tag >>> 3) {
1298
+ case 1:
1299
+ message.authority = reader.string();
1300
+ break;
1301
+
1302
+ case 2:
1303
+ message.withdrawalId = reader.string();
1304
+ break;
1305
+
1306
+ case 3:
1307
+ message.reason = reader.string();
1308
+ break;
1309
+
1310
+ case 4:
1311
+ message.evmTxHash = reader.string();
1312
+ break;
1313
+
1314
+ default:
1315
+ reader.skipType(tag & 7);
1316
+ break;
1317
+ }
1318
+ }
1319
+
1320
+ return message;
1321
+ },
1322
+
1323
+ fromPartial(object: DeepPartial<MsgFailWithdrawal>): MsgFailWithdrawal {
1324
+ const message = createBaseMsgFailWithdrawal();
1325
+ message.authority = object.authority ?? "";
1326
+ message.withdrawalId = object.withdrawalId ?? "";
1327
+ message.reason = object.reason ?? "";
1328
+ message.evmTxHash = object.evmTxHash ?? "";
1329
+ return message;
1330
+ }
1331
+
1332
+ };
1333
+
1334
+ function createBaseMsgFailWithdrawalResponse(): MsgFailWithdrawalResponse {
1335
+ return {};
1336
+ }
1337
+
1338
+ export const MsgFailWithdrawalResponse = {
1339
+ encode(_: MsgFailWithdrawalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1340
+ return writer;
1341
+ },
1342
+
1343
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgFailWithdrawalResponse {
1344
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1345
+ let end = length === undefined ? reader.len : reader.pos + length;
1346
+ const message = createBaseMsgFailWithdrawalResponse();
1347
+
1348
+ while (reader.pos < end) {
1349
+ const tag = reader.uint32();
1350
+
1351
+ switch (tag >>> 3) {
1352
+ default:
1353
+ reader.skipType(tag & 7);
1354
+ break;
1355
+ }
1356
+ }
1357
+
1358
+ return message;
1359
+ },
1360
+
1361
+ fromPartial(_: DeepPartial<MsgFailWithdrawalResponse>): MsgFailWithdrawalResponse {
1362
+ const message = createBaseMsgFailWithdrawalResponse();
1363
+ return message;
1364
+ }
1365
+
1366
+ };
1367
+
1368
+ function createBaseMsgResolveWithdrawal(): MsgResolveWithdrawal {
1369
+ return {
1370
+ authority: "",
1371
+ withdrawalId: "",
1372
+ destinationAddress: "",
1373
+ reason: ""
1374
+ };
1375
+ }
1376
+
1377
+ export const MsgResolveWithdrawal = {
1378
+ encode(message: MsgResolveWithdrawal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1379
+ if (message.authority !== "") {
1380
+ writer.uint32(10).string(message.authority);
1381
+ }
1382
+
1383
+ if (message.withdrawalId !== "") {
1384
+ writer.uint32(18).string(message.withdrawalId);
1385
+ }
1386
+
1387
+ if (message.destinationAddress !== "") {
1388
+ writer.uint32(26).string(message.destinationAddress);
1389
+ }
1390
+
1391
+ if (message.reason !== "") {
1392
+ writer.uint32(34).string(message.reason);
1393
+ }
1394
+
1395
+ return writer;
1396
+ },
1397
+
1398
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgResolveWithdrawal {
1399
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1400
+ let end = length === undefined ? reader.len : reader.pos + length;
1401
+ const message = createBaseMsgResolveWithdrawal();
1402
+
1403
+ while (reader.pos < end) {
1404
+ const tag = reader.uint32();
1405
+
1406
+ switch (tag >>> 3) {
1407
+ case 1:
1408
+ message.authority = reader.string();
1409
+ break;
1410
+
1411
+ case 2:
1412
+ message.withdrawalId = reader.string();
1413
+ break;
1414
+
1415
+ case 3:
1416
+ message.destinationAddress = reader.string();
1417
+ break;
1418
+
1419
+ case 4:
1420
+ message.reason = reader.string();
1421
+ break;
1422
+
1423
+ default:
1424
+ reader.skipType(tag & 7);
1425
+ break;
1426
+ }
1427
+ }
1428
+
1429
+ return message;
1430
+ },
1431
+
1432
+ fromPartial(object: DeepPartial<MsgResolveWithdrawal>): MsgResolveWithdrawal {
1433
+ const message = createBaseMsgResolveWithdrawal();
1434
+ message.authority = object.authority ?? "";
1435
+ message.withdrawalId = object.withdrawalId ?? "";
1436
+ message.destinationAddress = object.destinationAddress ?? "";
1437
+ message.reason = object.reason ?? "";
1438
+ return message;
1439
+ }
1440
+
1441
+ };
1442
+
1443
+ function createBaseMsgResolveWithdrawalResponse(): MsgResolveWithdrawalResponse {
1444
+ return {};
1445
+ }
1446
+
1447
+ export const MsgResolveWithdrawalResponse = {
1448
+ encode(_: MsgResolveWithdrawalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1449
+ return writer;
1450
+ },
1451
+
1452
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgResolveWithdrawalResponse {
1453
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
1454
+ let end = length === undefined ? reader.len : reader.pos + length;
1455
+ const message = createBaseMsgResolveWithdrawalResponse();
1456
+
1457
+ while (reader.pos < end) {
1458
+ const tag = reader.uint32();
1459
+
1460
+ switch (tag >>> 3) {
1461
+ default:
1462
+ reader.skipType(tag & 7);
1463
+ break;
1464
+ }
1465
+ }
1466
+
1467
+ return message;
1468
+ },
1469
+
1470
+ fromPartial(_: DeepPartial<MsgResolveWithdrawalResponse>): MsgResolveWithdrawalResponse {
1471
+ const message = createBaseMsgResolveWithdrawalResponse();
1472
+ return message;
1473
+ }
1474
+
1162
1475
  };
@@ -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, MsgMarkWithdrawalSubmitted, MsgMarkWithdrawalSubmittedResponse, MsgConfirmWithdrawal, MsgConfirmWithdrawalResponse, MsgCompleteWithdrawal, MsgCompleteWithdrawalResponse, MsgCancelWithdrawal, MsgCancelWithdrawalResponse, MsgUpdateWhitelist, MsgUpdateWhitelistResponse, MsgUpdateTSSParams, MsgUpdateTSSParamsResponse } from "./tss";
5
+ import { MsgRequestWithdrawal, MsgRequestWithdrawalResponse, MsgSubmitWithdrawalSignature, MsgSubmitWithdrawalSignatureResponse, MsgMarkWithdrawalSubmitted, MsgMarkWithdrawalSubmittedResponse, MsgConfirmWithdrawal, MsgConfirmWithdrawalResponse, MsgCompleteWithdrawal, MsgCompleteWithdrawalResponse, MsgCancelWithdrawal, MsgCancelWithdrawalResponse, MsgFailWithdrawal, MsgFailWithdrawalResponse, MsgResolveWithdrawal, MsgResolveWithdrawalResponse, MsgUpdateWhitelist, MsgUpdateWhitelistResponse, MsgUpdateTSSParams, MsgUpdateTSSParamsResponse } from "./tss";
6
6
  /** Msg defines the Msg service. */
7
7
 
8
8
  export interface Msg {
@@ -44,6 +44,12 @@ export interface Msg {
44
44
  /** CancelWithdrawal cancels a timed-out withdrawal. */
45
45
 
46
46
  cancelWithdrawal(request: MsgCancelWithdrawal): Promise<MsgCancelWithdrawalResponse>;
47
+ /** FailWithdrawal marks a withdrawal as failed; funds remain locked until ResolveWithdrawal. */
48
+
49
+ failWithdrawal(request: MsgFailWithdrawal): Promise<MsgFailWithdrawalResponse>;
50
+ /** ResolveWithdrawal sends locked funds of a failed withdrawal to a destination chosen by authority. */
51
+
52
+ resolveWithdrawal(request: MsgResolveWithdrawal): Promise<MsgResolveWithdrawalResponse>;
47
53
  /** UpdateWhitelist updates the whitelist for permissioned mode. */
48
54
 
49
55
  updateWhitelist(request: MsgUpdateWhitelist): Promise<MsgUpdateWhitelistResponse>;
@@ -76,6 +82,8 @@ export class MsgClientImpl implements Msg {
76
82
  this.confirmWithdrawal = this.confirmWithdrawal.bind(this);
77
83
  this.completeWithdrawal = this.completeWithdrawal.bind(this);
78
84
  this.cancelWithdrawal = this.cancelWithdrawal.bind(this);
85
+ this.failWithdrawal = this.failWithdrawal.bind(this);
86
+ this.resolveWithdrawal = this.resolveWithdrawal.bind(this);
79
87
  this.updateWhitelist = this.updateWhitelist.bind(this);
80
88
  this.updateTSSParams = this.updateTSSParams.bind(this);
81
89
  this.addTokenInfo = this.addTokenInfo.bind(this);
@@ -149,6 +157,18 @@ export class MsgClientImpl implements Msg {
149
157
  return promise.then(data => MsgCancelWithdrawalResponse.decode(new _m0.Reader(data)));
150
158
  }
151
159
 
160
+ failWithdrawal(request: MsgFailWithdrawal): Promise<MsgFailWithdrawalResponse> {
161
+ const data = MsgFailWithdrawal.encode(request).finish();
162
+ const promise = this.rpc.request("zogux.bridge.Msg", "FailWithdrawal", data);
163
+ return promise.then(data => MsgFailWithdrawalResponse.decode(new _m0.Reader(data)));
164
+ }
165
+
166
+ resolveWithdrawal(request: MsgResolveWithdrawal): Promise<MsgResolveWithdrawalResponse> {
167
+ const data = MsgResolveWithdrawal.encode(request).finish();
168
+ const promise = this.rpc.request("zogux.bridge.Msg", "ResolveWithdrawal", data);
169
+ return promise.then(data => MsgResolveWithdrawalResponse.decode(new _m0.Reader(data)));
170
+ }
171
+
152
172
  updateWhitelist(request: MsgUpdateWhitelist): Promise<MsgUpdateWhitelistResponse> {
153
173
  const data = MsgUpdateWhitelist.encode(request).finish();
154
174
  const promise = this.rpc.request("zogux.bridge.Msg", "UpdateWhitelist", data);
@@ -23,6 +23,9 @@ export enum WithdrawalStatus {
23
23
 
24
24
  /** WITHDRAWAL_STATUS_SUBMITTED - Withdrawal has been submitted to EVM chain, waiting for confirmation */
25
25
  WITHDRAWAL_STATUS_SUBMITTED = 6,
26
+
27
+ /** WITHDRAWAL_STATUS_RESOLVED - Withdrawal was failed and admin has resolved it (funds sent to destination) */
28
+ WITHDRAWAL_STATUS_RESOLVED = 7,
26
29
  UNRECOGNIZED = -1,
27
30
  }
28
31
  export const WithdrawalStatusSDKType = WithdrawalStatus;
@@ -56,6 +59,10 @@ export function withdrawalStatusFromJSON(object: any): WithdrawalStatus {
56
59
  case "WITHDRAWAL_STATUS_SUBMITTED":
57
60
  return WithdrawalStatus.WITHDRAWAL_STATUS_SUBMITTED;
58
61
 
62
+ case 7:
63
+ case "WITHDRAWAL_STATUS_RESOLVED":
64
+ return WithdrawalStatus.WITHDRAWAL_STATUS_RESOLVED;
65
+
59
66
  case -1:
60
67
  case "UNRECOGNIZED":
61
68
  default:
@@ -85,6 +92,9 @@ export function withdrawalStatusToJSON(object: WithdrawalStatus): string {
85
92
  case WithdrawalStatus.WITHDRAWAL_STATUS_SUBMITTED:
86
93
  return "WITHDRAWAL_STATUS_SUBMITTED";
87
94
 
95
+ case WithdrawalStatus.WITHDRAWAL_STATUS_RESOLVED:
96
+ return "WITHDRAWAL_STATUS_RESOLVED";
97
+
88
98
  case WithdrawalStatus.UNRECOGNIZED:
89
99
  default:
90
100
  return "UNRECOGNIZED";
@@ -140,6 +150,12 @@ export interface WithdrawalRequest {
140
150
  /** Destination chain decimals for the token */
141
151
 
142
152
  dstDecimals: number;
153
+ /**
154
+ * EVM bytes32 message from RequestedWithdrawal event.
155
+ * Populated when the withdrawal is submitted to EVM.
156
+ */
157
+
158
+ message: Uint8Array;
143
159
  }
144
160
  /** WithdrawalRequest represents a pending withdrawal request. */
145
161
 
@@ -160,6 +176,22 @@ export interface WithdrawalRequestSDKType {
160
176
  evm_token_address: string;
161
177
  src_decimals: number;
162
178
  dst_decimals: number;
179
+ message: Uint8Array;
180
+ }
181
+ /** WithdrawalEventInfo stores in-consensus cursor info for acknowledged withdrawal events. */
182
+
183
+ export interface WithdrawalEventInfo {
184
+ /** NextId is the next sequential withdrawal event id to acknowledge. */
185
+ nextId: Long;
186
+ /** EthBlockHeight is the Ethereum block height of the last acknowledged withdrawal event. */
187
+
188
+ ethBlockHeight: Long;
189
+ }
190
+ /** WithdrawalEventInfo stores in-consensus cursor info for acknowledged withdrawal events. */
191
+
192
+ export interface WithdrawalEventInfoSDKType {
193
+ next_id: Long;
194
+ eth_block_height: Long;
163
195
  }
164
196
 
165
197
  function createBaseWithdrawalRequest(): WithdrawalRequest {
@@ -179,7 +211,8 @@ function createBaseWithdrawalRequest(): WithdrawalRequest {
179
211
  cancelReason: "",
180
212
  evmTokenAddress: "",
181
213
  srcDecimals: 0,
182
- dstDecimals: 0
214
+ dstDecimals: 0,
215
+ message: new Uint8Array()
183
216
  };
184
217
  }
185
218
 
@@ -249,6 +282,10 @@ export const WithdrawalRequest = {
249
282
  writer.uint32(128).uint32(message.dstDecimals);
250
283
  }
251
284
 
285
+ if (message.message.length !== 0) {
286
+ writer.uint32(138).bytes(message.message);
287
+ }
288
+
252
289
  return writer;
253
290
  },
254
291
 
@@ -325,6 +362,10 @@ export const WithdrawalRequest = {
325
362
  message.dstDecimals = reader.uint32();
326
363
  break;
327
364
 
365
+ case 17:
366
+ message.message = reader.bytes();
367
+ break;
368
+
328
369
  default:
329
370
  reader.skipType(tag & 7);
330
371
  break;
@@ -352,6 +393,62 @@ export const WithdrawalRequest = {
352
393
  message.evmTokenAddress = object.evmTokenAddress ?? "";
353
394
  message.srcDecimals = object.srcDecimals ?? 0;
354
395
  message.dstDecimals = object.dstDecimals ?? 0;
396
+ message.message = object.message ?? new Uint8Array();
397
+ return message;
398
+ }
399
+
400
+ };
401
+
402
+ function createBaseWithdrawalEventInfo(): WithdrawalEventInfo {
403
+ return {
404
+ nextId: Long.UZERO,
405
+ ethBlockHeight: Long.UZERO
406
+ };
407
+ }
408
+
409
+ export const WithdrawalEventInfo = {
410
+ encode(message: WithdrawalEventInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
411
+ if (!message.nextId.isZero()) {
412
+ writer.uint32(8).uint64(message.nextId);
413
+ }
414
+
415
+ if (!message.ethBlockHeight.isZero()) {
416
+ writer.uint32(16).uint64(message.ethBlockHeight);
417
+ }
418
+
419
+ return writer;
420
+ },
421
+
422
+ decode(input: _m0.Reader | Uint8Array, length?: number): WithdrawalEventInfo {
423
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
424
+ let end = length === undefined ? reader.len : reader.pos + length;
425
+ const message = createBaseWithdrawalEventInfo();
426
+
427
+ while (reader.pos < end) {
428
+ const tag = reader.uint32();
429
+
430
+ switch (tag >>> 3) {
431
+ case 1:
432
+ message.nextId = (reader.uint64() as Long);
433
+ break;
434
+
435
+ case 2:
436
+ message.ethBlockHeight = (reader.uint64() as Long);
437
+ break;
438
+
439
+ default:
440
+ reader.skipType(tag & 7);
441
+ break;
442
+ }
443
+ }
444
+
445
+ return message;
446
+ },
447
+
448
+ fromPartial(object: DeepPartial<WithdrawalEventInfo>): WithdrawalEventInfo {
449
+ const message = createBaseWithdrawalEventInfo();
450
+ message.nextId = object.nextId !== undefined && object.nextId !== null ? Long.fromValue(object.nextId) : Long.UZERO;
451
+ message.ethBlockHeight = object.ethBlockHeight !== undefined && object.ethBlockHeight !== null ? Long.fromValue(object.ethBlockHeight) : Long.UZERO;
355
452
  return message;
356
453
  }
357
454