@zoguxprotocol/proto 0.1.2 → 0.1.4
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.
- package/package.json +2 -2
- package/src/codegen/cosmos/bundle.ts +6 -6
- package/src/codegen/zogux/assets/tx.rpc.msg.ts +24 -0
- package/src/codegen/zogux/assets/tx.ts +113 -1
- package/src/codegen/zogux/bridge/events.ts +235 -5
- package/src/codegen/zogux/bridge/genesis.ts +16 -2
- package/src/codegen/zogux/bridge/params.ts +27 -31
- package/src/codegen/zogux/bridge/query.lcd.ts +9 -1
- package/src/codegen/zogux/bridge/query.rpc.Query.ts +15 -1
- package/src/codegen/zogux/bridge/query.ts +147 -1
- package/src/codegen/zogux/bridge/tss.ts +282 -3
- package/src/codegen/zogux/bridge/tx.rpc.msg.ts +25 -2
- package/src/codegen/zogux/bridge/withdrawal.ts +54 -2
- package/src/codegen/zogux/bundle.ts +45 -43
- package/src/codegen/zogux/indexer/events/events.ts +107 -31
- package/src/codegen/zogux/rpc.tx.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoguxprotocol/proto",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"access": "public",
|
|
5
5
|
"description": "Protos for Zogux protocol",
|
|
6
6
|
"author": "Zogux Trading Inc.",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/zoguxprotocol/zogux-chain/issues"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@cosmjs/stargate": "^0.
|
|
38
|
+
"@cosmjs/stargate": "^0.33.1",
|
|
39
39
|
"@dydxprotocol/node-service-base-dev": "^0.3.2",
|
|
40
40
|
"@osmonauts/lcd": "^0.6.0",
|
|
41
41
|
"@osmonauts/telescope": "0.86.0",
|
|
@@ -184,9 +184,9 @@ import * as _344 from "./slashing/v1beta1/tx.rpc.msg";
|
|
|
184
184
|
import * as _345 from "./staking/v1beta1/tx.rpc.msg";
|
|
185
185
|
import * as _346 from "./upgrade/v1beta1/tx.rpc.msg";
|
|
186
186
|
import * as _347 from "./vesting/v1beta1/tx.rpc.msg";
|
|
187
|
-
import * as
|
|
188
|
-
import * as
|
|
189
|
-
import * as
|
|
187
|
+
import * as _413 from "./lcd";
|
|
188
|
+
import * as _414 from "./rpc.query";
|
|
189
|
+
import * as _415 from "./rpc.tx";
|
|
190
190
|
export namespace cosmos {
|
|
191
191
|
export namespace app {
|
|
192
192
|
export namespace runtime {
|
|
@@ -571,8 +571,8 @@ export namespace cosmos {
|
|
|
571
571
|
..._347
|
|
572
572
|
};
|
|
573
573
|
}
|
|
574
|
-
export const ClientFactory = { ...
|
|
575
|
-
...
|
|
576
|
-
...
|
|
574
|
+
export const ClientFactory = { ..._413,
|
|
575
|
+
..._414,
|
|
576
|
+
..._415
|
|
577
577
|
};
|
|
578
578
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Rpc } from "../../helpers";
|
|
2
|
+
import * as _m0 from "protobufjs/minimal";
|
|
3
|
+
import { MsgCreateAsset, MsgCreateAssetResponse } from "./tx";
|
|
4
|
+
/** Msg defines the Msg service. */
|
|
5
|
+
|
|
6
|
+
export interface Msg {
|
|
7
|
+
/** CreateAsset allows the authority to create a new asset. */
|
|
8
|
+
createAsset(request: MsgCreateAsset): Promise<MsgCreateAssetResponse>;
|
|
9
|
+
}
|
|
10
|
+
export class MsgClientImpl implements Msg {
|
|
11
|
+
private readonly rpc: Rpc;
|
|
12
|
+
|
|
13
|
+
constructor(rpc: Rpc) {
|
|
14
|
+
this.rpc = rpc;
|
|
15
|
+
this.createAsset = this.createAsset.bind(this);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
createAsset(request: MsgCreateAsset): Promise<MsgCreateAssetResponse> {
|
|
19
|
+
const data = MsgCreateAsset.encode(request).finish();
|
|
20
|
+
const promise = this.rpc.request("zogux.assets.Msg", "CreateAsset", data);
|
|
21
|
+
return promise.then(data => MsgCreateAssetResponse.decode(new _m0.Reader(data)));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
@@ -1 +1,113 @@
|
|
|
1
|
-
|
|
1
|
+
import { Asset, AssetSDKType } from "./asset";
|
|
2
|
+
import * as _m0 from "protobufjs/minimal";
|
|
3
|
+
import { DeepPartial } from "../../helpers";
|
|
4
|
+
/** MsgCreateAsset defines a message for creating a new asset. */
|
|
5
|
+
|
|
6
|
+
export interface MsgCreateAsset {
|
|
7
|
+
/** The authority to create the asset (e.g. governance module). */
|
|
8
|
+
authority: string;
|
|
9
|
+
/** The asset to create. */
|
|
10
|
+
|
|
11
|
+
asset?: Asset;
|
|
12
|
+
}
|
|
13
|
+
/** MsgCreateAsset defines a message for creating a new asset. */
|
|
14
|
+
|
|
15
|
+
export interface MsgCreateAssetSDKType {
|
|
16
|
+
authority: string;
|
|
17
|
+
asset?: AssetSDKType;
|
|
18
|
+
}
|
|
19
|
+
/** MsgCreateAssetResponse defines the Msg/CreateAsset response type. */
|
|
20
|
+
|
|
21
|
+
export interface MsgCreateAssetResponse {}
|
|
22
|
+
/** MsgCreateAssetResponse defines the Msg/CreateAsset response type. */
|
|
23
|
+
|
|
24
|
+
export interface MsgCreateAssetResponseSDKType {}
|
|
25
|
+
|
|
26
|
+
function createBaseMsgCreateAsset(): MsgCreateAsset {
|
|
27
|
+
return {
|
|
28
|
+
authority: "",
|
|
29
|
+
asset: undefined
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const MsgCreateAsset = {
|
|
34
|
+
encode(message: MsgCreateAsset, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
35
|
+
if (message.authority !== "") {
|
|
36
|
+
writer.uint32(10).string(message.authority);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (message.asset !== undefined) {
|
|
40
|
+
Asset.encode(message.asset, writer.uint32(18).fork()).ldelim();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return writer;
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateAsset {
|
|
47
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
48
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
49
|
+
const message = createBaseMsgCreateAsset();
|
|
50
|
+
|
|
51
|
+
while (reader.pos < end) {
|
|
52
|
+
const tag = reader.uint32();
|
|
53
|
+
|
|
54
|
+
switch (tag >>> 3) {
|
|
55
|
+
case 1:
|
|
56
|
+
message.authority = reader.string();
|
|
57
|
+
break;
|
|
58
|
+
|
|
59
|
+
case 2:
|
|
60
|
+
message.asset = Asset.decode(reader, reader.uint32());
|
|
61
|
+
break;
|
|
62
|
+
|
|
63
|
+
default:
|
|
64
|
+
reader.skipType(tag & 7);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return message;
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
fromPartial(object: DeepPartial<MsgCreateAsset>): MsgCreateAsset {
|
|
73
|
+
const message = createBaseMsgCreateAsset();
|
|
74
|
+
message.authority = object.authority ?? "";
|
|
75
|
+
message.asset = object.asset !== undefined && object.asset !== null ? Asset.fromPartial(object.asset) : undefined;
|
|
76
|
+
return message;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
function createBaseMsgCreateAssetResponse(): MsgCreateAssetResponse {
|
|
82
|
+
return {};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const MsgCreateAssetResponse = {
|
|
86
|
+
encode(_: MsgCreateAssetResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
87
|
+
return writer;
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateAssetResponse {
|
|
91
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
92
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
93
|
+
const message = createBaseMsgCreateAssetResponse();
|
|
94
|
+
|
|
95
|
+
while (reader.pos < end) {
|
|
96
|
+
const tag = reader.uint32();
|
|
97
|
+
|
|
98
|
+
switch (tag >>> 3) {
|
|
99
|
+
default:
|
|
100
|
+
reader.skipType(tag & 7);
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return message;
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
fromPartial(_: DeepPartial<MsgCreateAssetResponse>): MsgCreateAssetResponse {
|
|
109
|
+
const message = createBaseMsgCreateAssetResponse();
|
|
110
|
+
return message;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
};
|
|
@@ -14,7 +14,7 @@ export interface EventWithdrawalRequested {
|
|
|
14
14
|
/** Destination address on target chain */
|
|
15
15
|
|
|
16
16
|
toAddress: string;
|
|
17
|
-
/** Amount to withdraw */
|
|
17
|
+
/** Amount to withdraw (in EVM decimals after conversion) */
|
|
18
18
|
|
|
19
19
|
amount: string;
|
|
20
20
|
/** Target chain ID */
|
|
@@ -32,6 +32,15 @@ export interface EventWithdrawalRequested {
|
|
|
32
32
|
/** Estimated timeout for signatures */
|
|
33
33
|
|
|
34
34
|
timeoutSeconds: Long;
|
|
35
|
+
/** Token address on EVM chain */
|
|
36
|
+
|
|
37
|
+
tokenAddress: string;
|
|
38
|
+
/** Source chain token decimals (Zogux) */
|
|
39
|
+
|
|
40
|
+
srcDecimals: number;
|
|
41
|
+
/** Destination chain token decimals (EVM) */
|
|
42
|
+
|
|
43
|
+
dstDecimals: number;
|
|
35
44
|
}
|
|
36
45
|
/**
|
|
37
46
|
* EventWithdrawalRequested is emitted when a user requests a withdrawal.
|
|
@@ -48,6 +57,9 @@ export interface EventWithdrawalRequestedSDKType {
|
|
|
48
57
|
nonce: Long;
|
|
49
58
|
block_height: Long;
|
|
50
59
|
timeout_seconds: Long;
|
|
60
|
+
token_address: string;
|
|
61
|
+
src_decimals: number;
|
|
62
|
+
dst_decimals: number;
|
|
51
63
|
}
|
|
52
64
|
/**
|
|
53
65
|
* EventWithdrawalSignatureSubmitted is emitted when a validator submits a
|
|
@@ -74,7 +86,51 @@ export interface EventWithdrawalSignatureSubmittedSDKType {
|
|
|
74
86
|
validator: string;
|
|
75
87
|
block_height: Long;
|
|
76
88
|
}
|
|
77
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* EventWithdrawalSigned is emitted when a withdrawal has collected enough TSS signatures.
|
|
91
|
+
* Signer service should listen to this and submit to EVM.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
export interface EventWithdrawalSigned {
|
|
95
|
+
/** Withdrawal ID */
|
|
96
|
+
withdrawalId: string;
|
|
97
|
+
/** Aggregated TSS signature */
|
|
98
|
+
|
|
99
|
+
signature: Uint8Array;
|
|
100
|
+
/** Block height when signed */
|
|
101
|
+
|
|
102
|
+
blockHeight: Long;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* EventWithdrawalSigned is emitted when a withdrawal has collected enough TSS signatures.
|
|
106
|
+
* Signer service should listen to this and submit to EVM.
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
export interface EventWithdrawalSignedSDKType {
|
|
110
|
+
withdrawal_id: string;
|
|
111
|
+
signature: Uint8Array;
|
|
112
|
+
block_height: Long;
|
|
113
|
+
}
|
|
114
|
+
/** EventWithdrawalSubmitted is emitted when signer has submitted the withdrawal to EVM. */
|
|
115
|
+
|
|
116
|
+
export interface EventWithdrawalSubmitted {
|
|
117
|
+
/** Withdrawal ID */
|
|
118
|
+
withdrawalId: string;
|
|
119
|
+
/** EVM transaction hash */
|
|
120
|
+
|
|
121
|
+
txHash: string;
|
|
122
|
+
/** Block height when submitted */
|
|
123
|
+
|
|
124
|
+
blockHeight: Long;
|
|
125
|
+
}
|
|
126
|
+
/** EventWithdrawalSubmitted is emitted when signer has submitted the withdrawal to EVM. */
|
|
127
|
+
|
|
128
|
+
export interface EventWithdrawalSubmittedSDKType {
|
|
129
|
+
withdrawal_id: string;
|
|
130
|
+
tx_hash: string;
|
|
131
|
+
block_height: Long;
|
|
132
|
+
}
|
|
133
|
+
/** EventWithdrawalCompleted is emitted when a withdrawal is confirmed on EVM. */
|
|
78
134
|
|
|
79
135
|
export interface EventWithdrawalCompleted {
|
|
80
136
|
/** Withdrawal ID */
|
|
@@ -85,13 +141,17 @@ export interface EventWithdrawalCompleted {
|
|
|
85
141
|
/** Block height when completed */
|
|
86
142
|
|
|
87
143
|
blockHeight: Long;
|
|
144
|
+
/** EVM transaction hash confirming the withdrawal */
|
|
145
|
+
|
|
146
|
+
evmTxHash: string;
|
|
88
147
|
}
|
|
89
|
-
/** EventWithdrawalCompleted is emitted when a withdrawal is
|
|
148
|
+
/** EventWithdrawalCompleted is emitted when a withdrawal is confirmed on EVM. */
|
|
90
149
|
|
|
91
150
|
export interface EventWithdrawalCompletedSDKType {
|
|
92
151
|
withdrawal_id: string;
|
|
93
152
|
signature: Uint8Array;
|
|
94
153
|
block_height: Long;
|
|
154
|
+
evm_tx_hash: string;
|
|
95
155
|
}
|
|
96
156
|
/** EventWithdrawalCancelled is emitted when a withdrawal is cancelled. */
|
|
97
157
|
|
|
@@ -123,7 +183,10 @@ function createBaseEventWithdrawalRequested(): EventWithdrawalRequested {
|
|
|
123
183
|
denom: "",
|
|
124
184
|
nonce: Long.UZERO,
|
|
125
185
|
blockHeight: Long.UZERO,
|
|
126
|
-
timeoutSeconds: Long.UZERO
|
|
186
|
+
timeoutSeconds: Long.UZERO,
|
|
187
|
+
tokenAddress: "",
|
|
188
|
+
srcDecimals: 0,
|
|
189
|
+
dstDecimals: 0
|
|
127
190
|
};
|
|
128
191
|
}
|
|
129
192
|
|
|
@@ -165,6 +228,18 @@ export const EventWithdrawalRequested = {
|
|
|
165
228
|
writer.uint32(72).uint64(message.timeoutSeconds);
|
|
166
229
|
}
|
|
167
230
|
|
|
231
|
+
if (message.tokenAddress !== "") {
|
|
232
|
+
writer.uint32(82).string(message.tokenAddress);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (message.srcDecimals !== 0) {
|
|
236
|
+
writer.uint32(88).uint32(message.srcDecimals);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (message.dstDecimals !== 0) {
|
|
240
|
+
writer.uint32(96).uint32(message.dstDecimals);
|
|
241
|
+
}
|
|
242
|
+
|
|
168
243
|
return writer;
|
|
169
244
|
},
|
|
170
245
|
|
|
@@ -213,6 +288,18 @@ export const EventWithdrawalRequested = {
|
|
|
213
288
|
message.timeoutSeconds = (reader.uint64() as Long);
|
|
214
289
|
break;
|
|
215
290
|
|
|
291
|
+
case 10:
|
|
292
|
+
message.tokenAddress = reader.string();
|
|
293
|
+
break;
|
|
294
|
+
|
|
295
|
+
case 11:
|
|
296
|
+
message.srcDecimals = reader.uint32();
|
|
297
|
+
break;
|
|
298
|
+
|
|
299
|
+
case 12:
|
|
300
|
+
message.dstDecimals = reader.uint32();
|
|
301
|
+
break;
|
|
302
|
+
|
|
216
303
|
default:
|
|
217
304
|
reader.skipType(tag & 7);
|
|
218
305
|
break;
|
|
@@ -233,6 +320,9 @@ export const EventWithdrawalRequested = {
|
|
|
233
320
|
message.nonce = object.nonce !== undefined && object.nonce !== null ? Long.fromValue(object.nonce) : Long.UZERO;
|
|
234
321
|
message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? Long.fromValue(object.blockHeight) : Long.UZERO;
|
|
235
322
|
message.timeoutSeconds = object.timeoutSeconds !== undefined && object.timeoutSeconds !== null ? Long.fromValue(object.timeoutSeconds) : Long.UZERO;
|
|
323
|
+
message.tokenAddress = object.tokenAddress ?? "";
|
|
324
|
+
message.srcDecimals = object.srcDecimals ?? 0;
|
|
325
|
+
message.dstDecimals = object.dstDecimals ?? 0;
|
|
236
326
|
return message;
|
|
237
327
|
}
|
|
238
328
|
|
|
@@ -303,7 +393,7 @@ export const EventWithdrawalSignatureSubmitted = {
|
|
|
303
393
|
|
|
304
394
|
};
|
|
305
395
|
|
|
306
|
-
function
|
|
396
|
+
function createBaseEventWithdrawalSigned(): EventWithdrawalSigned {
|
|
307
397
|
return {
|
|
308
398
|
withdrawalId: "",
|
|
309
399
|
signature: new Uint8Array(),
|
|
@@ -311,6 +401,137 @@ function createBaseEventWithdrawalCompleted(): EventWithdrawalCompleted {
|
|
|
311
401
|
};
|
|
312
402
|
}
|
|
313
403
|
|
|
404
|
+
export const EventWithdrawalSigned = {
|
|
405
|
+
encode(message: EventWithdrawalSigned, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
406
|
+
if (message.withdrawalId !== "") {
|
|
407
|
+
writer.uint32(10).string(message.withdrawalId);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
if (message.signature.length !== 0) {
|
|
411
|
+
writer.uint32(18).bytes(message.signature);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
if (!message.blockHeight.isZero()) {
|
|
415
|
+
writer.uint32(24).uint64(message.blockHeight);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
return writer;
|
|
419
|
+
},
|
|
420
|
+
|
|
421
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): EventWithdrawalSigned {
|
|
422
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
423
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
424
|
+
const message = createBaseEventWithdrawalSigned();
|
|
425
|
+
|
|
426
|
+
while (reader.pos < end) {
|
|
427
|
+
const tag = reader.uint32();
|
|
428
|
+
|
|
429
|
+
switch (tag >>> 3) {
|
|
430
|
+
case 1:
|
|
431
|
+
message.withdrawalId = reader.string();
|
|
432
|
+
break;
|
|
433
|
+
|
|
434
|
+
case 2:
|
|
435
|
+
message.signature = reader.bytes();
|
|
436
|
+
break;
|
|
437
|
+
|
|
438
|
+
case 3:
|
|
439
|
+
message.blockHeight = (reader.uint64() as Long);
|
|
440
|
+
break;
|
|
441
|
+
|
|
442
|
+
default:
|
|
443
|
+
reader.skipType(tag & 7);
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
return message;
|
|
449
|
+
},
|
|
450
|
+
|
|
451
|
+
fromPartial(object: DeepPartial<EventWithdrawalSigned>): EventWithdrawalSigned {
|
|
452
|
+
const message = createBaseEventWithdrawalSigned();
|
|
453
|
+
message.withdrawalId = object.withdrawalId ?? "";
|
|
454
|
+
message.signature = object.signature ?? new Uint8Array();
|
|
455
|
+
message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? Long.fromValue(object.blockHeight) : Long.UZERO;
|
|
456
|
+
return message;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
function createBaseEventWithdrawalSubmitted(): EventWithdrawalSubmitted {
|
|
462
|
+
return {
|
|
463
|
+
withdrawalId: "",
|
|
464
|
+
txHash: "",
|
|
465
|
+
blockHeight: Long.UZERO
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export const EventWithdrawalSubmitted = {
|
|
470
|
+
encode(message: EventWithdrawalSubmitted, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
471
|
+
if (message.withdrawalId !== "") {
|
|
472
|
+
writer.uint32(10).string(message.withdrawalId);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if (message.txHash !== "") {
|
|
476
|
+
writer.uint32(18).string(message.txHash);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
if (!message.blockHeight.isZero()) {
|
|
480
|
+
writer.uint32(24).uint64(message.blockHeight);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
return writer;
|
|
484
|
+
},
|
|
485
|
+
|
|
486
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): EventWithdrawalSubmitted {
|
|
487
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
488
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
489
|
+
const message = createBaseEventWithdrawalSubmitted();
|
|
490
|
+
|
|
491
|
+
while (reader.pos < end) {
|
|
492
|
+
const tag = reader.uint32();
|
|
493
|
+
|
|
494
|
+
switch (tag >>> 3) {
|
|
495
|
+
case 1:
|
|
496
|
+
message.withdrawalId = reader.string();
|
|
497
|
+
break;
|
|
498
|
+
|
|
499
|
+
case 2:
|
|
500
|
+
message.txHash = reader.string();
|
|
501
|
+
break;
|
|
502
|
+
|
|
503
|
+
case 3:
|
|
504
|
+
message.blockHeight = (reader.uint64() as Long);
|
|
505
|
+
break;
|
|
506
|
+
|
|
507
|
+
default:
|
|
508
|
+
reader.skipType(tag & 7);
|
|
509
|
+
break;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
return message;
|
|
514
|
+
},
|
|
515
|
+
|
|
516
|
+
fromPartial(object: DeepPartial<EventWithdrawalSubmitted>): EventWithdrawalSubmitted {
|
|
517
|
+
const message = createBaseEventWithdrawalSubmitted();
|
|
518
|
+
message.withdrawalId = object.withdrawalId ?? "";
|
|
519
|
+
message.txHash = object.txHash ?? "";
|
|
520
|
+
message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? Long.fromValue(object.blockHeight) : Long.UZERO;
|
|
521
|
+
return message;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
function createBaseEventWithdrawalCompleted(): EventWithdrawalCompleted {
|
|
527
|
+
return {
|
|
528
|
+
withdrawalId: "",
|
|
529
|
+
signature: new Uint8Array(),
|
|
530
|
+
blockHeight: Long.UZERO,
|
|
531
|
+
evmTxHash: ""
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
|
|
314
535
|
export const EventWithdrawalCompleted = {
|
|
315
536
|
encode(message: EventWithdrawalCompleted, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
316
537
|
if (message.withdrawalId !== "") {
|
|
@@ -325,6 +546,10 @@ export const EventWithdrawalCompleted = {
|
|
|
325
546
|
writer.uint32(24).uint64(message.blockHeight);
|
|
326
547
|
}
|
|
327
548
|
|
|
549
|
+
if (message.evmTxHash !== "") {
|
|
550
|
+
writer.uint32(34).string(message.evmTxHash);
|
|
551
|
+
}
|
|
552
|
+
|
|
328
553
|
return writer;
|
|
329
554
|
},
|
|
330
555
|
|
|
@@ -349,6 +574,10 @@ export const EventWithdrawalCompleted = {
|
|
|
349
574
|
message.blockHeight = (reader.uint64() as Long);
|
|
350
575
|
break;
|
|
351
576
|
|
|
577
|
+
case 4:
|
|
578
|
+
message.evmTxHash = reader.string();
|
|
579
|
+
break;
|
|
580
|
+
|
|
352
581
|
default:
|
|
353
582
|
reader.skipType(tag & 7);
|
|
354
583
|
break;
|
|
@@ -363,6 +592,7 @@ export const EventWithdrawalCompleted = {
|
|
|
363
592
|
message.withdrawalId = object.withdrawalId ?? "";
|
|
364
593
|
message.signature = object.signature ?? new Uint8Array();
|
|
365
594
|
message.blockHeight = object.blockHeight !== undefined && object.blockHeight !== null ? Long.fromValue(object.blockHeight) : Long.UZERO;
|
|
595
|
+
message.evmTxHash = object.evmTxHash ?? "";
|
|
366
596
|
return message;
|
|
367
597
|
}
|
|
368
598
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventParams, EventParamsSDKType, ProposeParams, ProposeParamsSDKType, SafetyParams, SafetyParamsSDKType } from "./params";
|
|
1
|
+
import { EventParams, EventParamsSDKType, ProposeParams, ProposeParamsSDKType, SafetyParams, SafetyParamsSDKType, TSSParams, TSSParamsSDKType } from "./params";
|
|
2
2
|
import { BridgeEventInfo, BridgeEventInfoSDKType } from "./bridge_event_info";
|
|
3
3
|
import { TokenInfo, TokenInfoSDKType, TokenPair, TokenPairSDKType } from "./token";
|
|
4
4
|
import * as _m0 from "protobufjs/minimal";
|
|
@@ -23,6 +23,9 @@ export interface GenesisState {
|
|
|
23
23
|
/** Token pair mappings for cross-chain transfers. */
|
|
24
24
|
|
|
25
25
|
tokenPairs: TokenPair[];
|
|
26
|
+
/** TSS (Threshold Signature Scheme) parameters. */
|
|
27
|
+
|
|
28
|
+
tssParams?: TSSParams;
|
|
26
29
|
}
|
|
27
30
|
/** GenesisState defines the bridge module's genesis state. */
|
|
28
31
|
|
|
@@ -33,6 +36,7 @@ export interface GenesisStateSDKType {
|
|
|
33
36
|
acknowledged_event_info?: BridgeEventInfoSDKType;
|
|
34
37
|
token_infos: TokenInfoSDKType[];
|
|
35
38
|
token_pairs: TokenPairSDKType[];
|
|
39
|
+
tss_params?: TSSParamsSDKType;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
function createBaseGenesisState(): GenesisState {
|
|
@@ -42,7 +46,8 @@ function createBaseGenesisState(): GenesisState {
|
|
|
42
46
|
safetyParams: undefined,
|
|
43
47
|
acknowledgedEventInfo: undefined,
|
|
44
48
|
tokenInfos: [],
|
|
45
|
-
tokenPairs: []
|
|
49
|
+
tokenPairs: [],
|
|
50
|
+
tssParams: undefined
|
|
46
51
|
};
|
|
47
52
|
}
|
|
48
53
|
|
|
@@ -72,6 +77,10 @@ export const GenesisState = {
|
|
|
72
77
|
TokenPair.encode(v!, writer.uint32(50).fork()).ldelim();
|
|
73
78
|
}
|
|
74
79
|
|
|
80
|
+
if (message.tssParams !== undefined) {
|
|
81
|
+
TSSParams.encode(message.tssParams, writer.uint32(58).fork()).ldelim();
|
|
82
|
+
}
|
|
83
|
+
|
|
75
84
|
return writer;
|
|
76
85
|
},
|
|
77
86
|
|
|
@@ -108,6 +117,10 @@ export const GenesisState = {
|
|
|
108
117
|
message.tokenPairs.push(TokenPair.decode(reader, reader.uint32()));
|
|
109
118
|
break;
|
|
110
119
|
|
|
120
|
+
case 7:
|
|
121
|
+
message.tssParams = TSSParams.decode(reader, reader.uint32());
|
|
122
|
+
break;
|
|
123
|
+
|
|
111
124
|
default:
|
|
112
125
|
reader.skipType(tag & 7);
|
|
113
126
|
break;
|
|
@@ -125,6 +138,7 @@ export const GenesisState = {
|
|
|
125
138
|
message.acknowledgedEventInfo = object.acknowledgedEventInfo !== undefined && object.acknowledgedEventInfo !== null ? BridgeEventInfo.fromPartial(object.acknowledgedEventInfo) : undefined;
|
|
126
139
|
message.tokenInfos = object.tokenInfos?.map(e => TokenInfo.fromPartial(e)) || [];
|
|
127
140
|
message.tokenPairs = object.tokenPairs?.map(e => TokenPair.fromPartial(e)) || [];
|
|
141
|
+
message.tssParams = object.tssParams !== undefined && object.tssParams !== null ? TSSParams.fromPartial(object.tssParams) : undefined;
|
|
128
142
|
return message;
|
|
129
143
|
}
|
|
130
144
|
|
|
@@ -83,16 +83,13 @@ export interface SafetyParamsSDKType {
|
|
|
83
83
|
is_disabled: boolean;
|
|
84
84
|
delay_blocks: number;
|
|
85
85
|
}
|
|
86
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* TSSParams stores parameters for TSS (Threshold Signature Scheme).
|
|
88
|
+
* Note: TSS produces a single aggregated signature, no threshold counting needed.
|
|
89
|
+
*/
|
|
87
90
|
|
|
88
91
|
export interface TSSParams {
|
|
89
|
-
/** Threshold of signatures required (e.g., 2 for 2/3). */
|
|
90
|
-
threshold: number;
|
|
91
|
-
/** Total number of TSS parties/validators. */
|
|
92
|
-
|
|
93
|
-
totalParties: number;
|
|
94
92
|
/** Timeout for TSS signing operations in seconds. */
|
|
95
|
-
|
|
96
93
|
timeoutSeconds: Long;
|
|
97
94
|
/** Whitelist enabled (permissioned mode). */
|
|
98
95
|
|
|
@@ -100,15 +97,23 @@ export interface TSSParams {
|
|
|
100
97
|
/** Supported chain IDs (1=Ethereum, 42161=Arbitrum, etc.). */
|
|
101
98
|
|
|
102
99
|
supportedChainIds: Long[];
|
|
100
|
+
/**
|
|
101
|
+
* TSS group public key (hex-encoded, 66 chars for compressed or 130 for uncompressed).
|
|
102
|
+
* This is used to verify TSS signatures.
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
tssPubKey: string;
|
|
103
106
|
}
|
|
104
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* TSSParams stores parameters for TSS (Threshold Signature Scheme).
|
|
109
|
+
* Note: TSS produces a single aggregated signature, no threshold counting needed.
|
|
110
|
+
*/
|
|
105
111
|
|
|
106
112
|
export interface TSSParamsSDKType {
|
|
107
|
-
threshold: number;
|
|
108
|
-
total_parties: number;
|
|
109
113
|
timeout_seconds: Long;
|
|
110
114
|
whitelist_enabled: boolean;
|
|
111
115
|
supported_chain_ids: Long[];
|
|
116
|
+
tss_pub_key: string;
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
function createBaseEventParams(): EventParams {
|
|
@@ -308,24 +313,15 @@ export const SafetyParams = {
|
|
|
308
313
|
|
|
309
314
|
function createBaseTSSParams(): TSSParams {
|
|
310
315
|
return {
|
|
311
|
-
threshold: 0,
|
|
312
|
-
totalParties: 0,
|
|
313
316
|
timeoutSeconds: Long.UZERO,
|
|
314
317
|
whitelistEnabled: false,
|
|
315
|
-
supportedChainIds: []
|
|
318
|
+
supportedChainIds: [],
|
|
319
|
+
tssPubKey: ""
|
|
316
320
|
};
|
|
317
321
|
}
|
|
318
322
|
|
|
319
323
|
export const TSSParams = {
|
|
320
324
|
encode(message: TSSParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
321
|
-
if (message.threshold !== 0) {
|
|
322
|
-
writer.uint32(8).uint32(message.threshold);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
if (message.totalParties !== 0) {
|
|
326
|
-
writer.uint32(16).uint32(message.totalParties);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
325
|
if (!message.timeoutSeconds.isZero()) {
|
|
330
326
|
writer.uint32(24).uint64(message.timeoutSeconds);
|
|
331
327
|
}
|
|
@@ -341,6 +337,11 @@ export const TSSParams = {
|
|
|
341
337
|
}
|
|
342
338
|
|
|
343
339
|
writer.ldelim();
|
|
340
|
+
|
|
341
|
+
if (message.tssPubKey !== "") {
|
|
342
|
+
writer.uint32(50).string(message.tssPubKey);
|
|
343
|
+
}
|
|
344
|
+
|
|
344
345
|
return writer;
|
|
345
346
|
},
|
|
346
347
|
|
|
@@ -353,14 +354,6 @@ export const TSSParams = {
|
|
|
353
354
|
const tag = reader.uint32();
|
|
354
355
|
|
|
355
356
|
switch (tag >>> 3) {
|
|
356
|
-
case 1:
|
|
357
|
-
message.threshold = reader.uint32();
|
|
358
|
-
break;
|
|
359
|
-
|
|
360
|
-
case 2:
|
|
361
|
-
message.totalParties = reader.uint32();
|
|
362
|
-
break;
|
|
363
|
-
|
|
364
357
|
case 3:
|
|
365
358
|
message.timeoutSeconds = (reader.uint64() as Long);
|
|
366
359
|
break;
|
|
@@ -382,6 +375,10 @@ export const TSSParams = {
|
|
|
382
375
|
|
|
383
376
|
break;
|
|
384
377
|
|
|
378
|
+
case 6:
|
|
379
|
+
message.tssPubKey = reader.string();
|
|
380
|
+
break;
|
|
381
|
+
|
|
385
382
|
default:
|
|
386
383
|
reader.skipType(tag & 7);
|
|
387
384
|
break;
|
|
@@ -393,11 +390,10 @@ export const TSSParams = {
|
|
|
393
390
|
|
|
394
391
|
fromPartial(object: DeepPartial<TSSParams>): TSSParams {
|
|
395
392
|
const message = createBaseTSSParams();
|
|
396
|
-
message.threshold = object.threshold ?? 0;
|
|
397
|
-
message.totalParties = object.totalParties ?? 0;
|
|
398
393
|
message.timeoutSeconds = object.timeoutSeconds !== undefined && object.timeoutSeconds !== null ? Long.fromValue(object.timeoutSeconds) : Long.UZERO;
|
|
399
394
|
message.whitelistEnabled = object.whitelistEnabled ?? false;
|
|
400
395
|
message.supportedChainIds = object.supportedChainIds?.map(e => Long.fromValue(e)) || [];
|
|
396
|
+
message.tssPubKey = object.tssPubKey ?? "";
|
|
401
397
|
return message;
|
|
402
398
|
}
|
|
403
399
|
|