@kimafinance/kima-transaction-api 1.0.12-beta.1 → 1.0.13-beta.1
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/build/index.js +10 -3
- package/build/kima/common.js +2 -2
- package/build/kima/tx.d.ts +101 -8
- package/build/kima/tx.js +613 -50
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -22,6 +22,9 @@ var CurrencyOptions;
|
|
|
22
22
|
CurrencyOptions["USDC"] = "USDC";
|
|
23
23
|
CurrencyOptions["USDK"] = "USDK";
|
|
24
24
|
})(CurrencyOptions = exports.CurrencyOptions || (exports.CurrencyOptions = {}));
|
|
25
|
+
function sleep(ms) {
|
|
26
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
27
|
+
}
|
|
25
28
|
async function submitKimaTransaction({ originChain, originAddress, targetChain, targetAddress, symbol, amount, fee, }) {
|
|
26
29
|
const wallet = await proto_signing_1.DirectSecp256k1HdWallet.fromMnemonic(process.env.KIMA_BACKEND_MNEMONIC, { prefix: "kima" });
|
|
27
30
|
const client = await (0, common_1.TxClient)(wallet);
|
|
@@ -38,12 +41,12 @@ async function submitKimaTransaction({ originChain, originAddress, targetChain,
|
|
|
38
41
|
};
|
|
39
42
|
let msg = await client.msgRequestTransaction(params);
|
|
40
43
|
const result = await client.signAndBroadcast([msg]);
|
|
41
|
-
let txId =
|
|
44
|
+
let txId = 1;
|
|
42
45
|
for (const event of result.events) {
|
|
43
46
|
if (event.type === "transaction_requested") {
|
|
44
47
|
for (const attr of event.attributes) {
|
|
45
48
|
if (attr.key === "txId") {
|
|
46
|
-
txId = attr.value;
|
|
49
|
+
txId = +attr.value;
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
}
|
|
@@ -53,7 +56,11 @@ async function submitKimaTransaction({ originChain, originAddress, targetChain,
|
|
|
53
56
|
txId,
|
|
54
57
|
txHash: result.transactionHash,
|
|
55
58
|
});
|
|
56
|
-
|
|
59
|
+
let hashResult;
|
|
60
|
+
do {
|
|
61
|
+
hashResult = await client.signAndBroadcast([msg]);
|
|
62
|
+
await sleep(1000);
|
|
63
|
+
} while (hashResult.code !== 0);
|
|
57
64
|
return result;
|
|
58
65
|
}
|
|
59
66
|
exports.submitKimaTransaction = submitKimaTransaction;
|
package/build/kima/common.js
CHANGED
|
@@ -14,8 +14,8 @@ const defaultFee = {
|
|
|
14
14
|
gas: "200000",
|
|
15
15
|
};
|
|
16
16
|
const types = [
|
|
17
|
-
["/KimaFinance.kima.MsgRequestTransaction", tx_1.MsgRequestTransaction],
|
|
18
|
-
["/KimaFinance.kima.MsgSetTxHash", tx_1.MsgSetTxHash],
|
|
17
|
+
["/KimaFinance.kima.kima.MsgRequestTransaction", tx_1.MsgRequestTransaction],
|
|
18
|
+
["/KimaFinance.kima.kima.MsgSetTxHash", tx_1.MsgSetTxHash],
|
|
19
19
|
];
|
|
20
20
|
exports.registry = new proto_signing_1.Registry(types);
|
|
21
21
|
const TxClient = async (wallet) => {
|
package/build/kima/tx.d.ts
CHANGED
|
@@ -13,11 +13,11 @@ export interface MsgRequestTransaction {
|
|
|
13
13
|
export interface MsgRequestTransactionResponse {
|
|
14
14
|
code: string;
|
|
15
15
|
msg: string;
|
|
16
|
-
txId:
|
|
16
|
+
txId: number;
|
|
17
17
|
}
|
|
18
18
|
export interface MsgApproveTransaction {
|
|
19
19
|
creator: string;
|
|
20
|
-
txId:
|
|
20
|
+
txId: number;
|
|
21
21
|
txTHash: string;
|
|
22
22
|
success: string;
|
|
23
23
|
signedKey: string;
|
|
@@ -34,7 +34,7 @@ export interface MsgObservationVote {
|
|
|
34
34
|
to: string;
|
|
35
35
|
amount: string;
|
|
36
36
|
payType: string;
|
|
37
|
-
kimaTxID:
|
|
37
|
+
kimaTxID: number;
|
|
38
38
|
succeed: string;
|
|
39
39
|
}
|
|
40
40
|
export interface MsgObservationVoteResponse {
|
|
@@ -164,7 +164,7 @@ export interface MsgAddChainResponse {
|
|
|
164
164
|
}
|
|
165
165
|
export interface MsgUpdateTssHash {
|
|
166
166
|
creator: string;
|
|
167
|
-
txId:
|
|
167
|
+
txId: number;
|
|
168
168
|
tssPullHash: string;
|
|
169
169
|
}
|
|
170
170
|
export interface MsgUpdateTssHashResponse {
|
|
@@ -197,7 +197,7 @@ export interface MsgUpdateTssStatusResponse {
|
|
|
197
197
|
}
|
|
198
198
|
export interface MsgSetTxHash {
|
|
199
199
|
creator: string;
|
|
200
|
-
txId:
|
|
200
|
+
txId: number;
|
|
201
201
|
txHash: string;
|
|
202
202
|
}
|
|
203
203
|
export interface MsgSetTxHashResponse {
|
|
@@ -206,7 +206,7 @@ export interface MsgSetTxHashResponse {
|
|
|
206
206
|
}
|
|
207
207
|
export interface MsgSetTxProcess {
|
|
208
208
|
creator: string;
|
|
209
|
-
txId:
|
|
209
|
+
txId: number;
|
|
210
210
|
timestamp: string;
|
|
211
211
|
msgId: string;
|
|
212
212
|
}
|
|
@@ -214,7 +214,7 @@ export interface MsgSetTxProcessResponse {
|
|
|
214
214
|
}
|
|
215
215
|
export interface MsgFinalizeTransaction {
|
|
216
216
|
creator: string;
|
|
217
|
-
txId:
|
|
217
|
+
txId: number;
|
|
218
218
|
txHash: string;
|
|
219
219
|
success: string;
|
|
220
220
|
signedKey: string;
|
|
@@ -223,6 +223,35 @@ export interface MsgFinalizeTransactionResponse {
|
|
|
223
223
|
code: string;
|
|
224
224
|
msg: string;
|
|
225
225
|
}
|
|
226
|
+
export interface MsgWithdrawPool {
|
|
227
|
+
creator: string;
|
|
228
|
+
chain: string;
|
|
229
|
+
targetAddress: string;
|
|
230
|
+
amount: string;
|
|
231
|
+
}
|
|
232
|
+
export interface MsgWithdrawPoolResponse {
|
|
233
|
+
}
|
|
234
|
+
export interface MsgUpdateToken {
|
|
235
|
+
creator: string;
|
|
236
|
+
chain: string;
|
|
237
|
+
address: string;
|
|
238
|
+
}
|
|
239
|
+
export interface MsgUpdateTokenResponse {
|
|
240
|
+
}
|
|
241
|
+
export interface MsgUpdatePoolRequest {
|
|
242
|
+
creator: string;
|
|
243
|
+
reqId: string;
|
|
244
|
+
processed: string;
|
|
245
|
+
}
|
|
246
|
+
export interface MsgUpdatePoolRequestResponse {
|
|
247
|
+
}
|
|
248
|
+
export interface MsgLeaderReady {
|
|
249
|
+
creator: string;
|
|
250
|
+
msgId: string;
|
|
251
|
+
peerId: string;
|
|
252
|
+
}
|
|
253
|
+
export interface MsgLeaderReadyResponse {
|
|
254
|
+
}
|
|
226
255
|
export declare const MsgRequestTransaction: {
|
|
227
256
|
encode(message: MsgRequestTransaction, writer?: Writer): Writer;
|
|
228
257
|
decode(input: Reader | Uint8Array, length?: number): MsgRequestTransaction;
|
|
@@ -545,6 +574,62 @@ export declare const MsgFinalizeTransactionResponse: {
|
|
|
545
574
|
toJSON(message: MsgFinalizeTransactionResponse): unknown;
|
|
546
575
|
fromPartial(object: DeepPartial<MsgFinalizeTransactionResponse>): MsgFinalizeTransactionResponse;
|
|
547
576
|
};
|
|
577
|
+
export declare const MsgWithdrawPool: {
|
|
578
|
+
encode(message: MsgWithdrawPool, writer?: Writer): Writer;
|
|
579
|
+
decode(input: Reader | Uint8Array, length?: number): MsgWithdrawPool;
|
|
580
|
+
fromJSON(object: any): MsgWithdrawPool;
|
|
581
|
+
toJSON(message: MsgWithdrawPool): unknown;
|
|
582
|
+
fromPartial(object: DeepPartial<MsgWithdrawPool>): MsgWithdrawPool;
|
|
583
|
+
};
|
|
584
|
+
export declare const MsgWithdrawPoolResponse: {
|
|
585
|
+
encode(_: MsgWithdrawPoolResponse, writer?: Writer): Writer;
|
|
586
|
+
decode(input: Reader | Uint8Array, length?: number): MsgWithdrawPoolResponse;
|
|
587
|
+
fromJSON(_: any): MsgWithdrawPoolResponse;
|
|
588
|
+
toJSON(_: MsgWithdrawPoolResponse): unknown;
|
|
589
|
+
fromPartial(_: DeepPartial<MsgWithdrawPoolResponse>): MsgWithdrawPoolResponse;
|
|
590
|
+
};
|
|
591
|
+
export declare const MsgUpdateToken: {
|
|
592
|
+
encode(message: MsgUpdateToken, writer?: Writer): Writer;
|
|
593
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateToken;
|
|
594
|
+
fromJSON(object: any): MsgUpdateToken;
|
|
595
|
+
toJSON(message: MsgUpdateToken): unknown;
|
|
596
|
+
fromPartial(object: DeepPartial<MsgUpdateToken>): MsgUpdateToken;
|
|
597
|
+
};
|
|
598
|
+
export declare const MsgUpdateTokenResponse: {
|
|
599
|
+
encode(_: MsgUpdateTokenResponse, writer?: Writer): Writer;
|
|
600
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateTokenResponse;
|
|
601
|
+
fromJSON(_: any): MsgUpdateTokenResponse;
|
|
602
|
+
toJSON(_: MsgUpdateTokenResponse): unknown;
|
|
603
|
+
fromPartial(_: DeepPartial<MsgUpdateTokenResponse>): MsgUpdateTokenResponse;
|
|
604
|
+
};
|
|
605
|
+
export declare const MsgUpdatePoolRequest: {
|
|
606
|
+
encode(message: MsgUpdatePoolRequest, writer?: Writer): Writer;
|
|
607
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdatePoolRequest;
|
|
608
|
+
fromJSON(object: any): MsgUpdatePoolRequest;
|
|
609
|
+
toJSON(message: MsgUpdatePoolRequest): unknown;
|
|
610
|
+
fromPartial(object: DeepPartial<MsgUpdatePoolRequest>): MsgUpdatePoolRequest;
|
|
611
|
+
};
|
|
612
|
+
export declare const MsgUpdatePoolRequestResponse: {
|
|
613
|
+
encode(_: MsgUpdatePoolRequestResponse, writer?: Writer): Writer;
|
|
614
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdatePoolRequestResponse;
|
|
615
|
+
fromJSON(_: any): MsgUpdatePoolRequestResponse;
|
|
616
|
+
toJSON(_: MsgUpdatePoolRequestResponse): unknown;
|
|
617
|
+
fromPartial(_: DeepPartial<MsgUpdatePoolRequestResponse>): MsgUpdatePoolRequestResponse;
|
|
618
|
+
};
|
|
619
|
+
export declare const MsgLeaderReady: {
|
|
620
|
+
encode(message: MsgLeaderReady, writer?: Writer): Writer;
|
|
621
|
+
decode(input: Reader | Uint8Array, length?: number): MsgLeaderReady;
|
|
622
|
+
fromJSON(object: any): MsgLeaderReady;
|
|
623
|
+
toJSON(message: MsgLeaderReady): unknown;
|
|
624
|
+
fromPartial(object: DeepPartial<MsgLeaderReady>): MsgLeaderReady;
|
|
625
|
+
};
|
|
626
|
+
export declare const MsgLeaderReadyResponse: {
|
|
627
|
+
encode(_: MsgLeaderReadyResponse, writer?: Writer): Writer;
|
|
628
|
+
decode(input: Reader | Uint8Array, length?: number): MsgLeaderReadyResponse;
|
|
629
|
+
fromJSON(_: any): MsgLeaderReadyResponse;
|
|
630
|
+
toJSON(_: MsgLeaderReadyResponse): unknown;
|
|
631
|
+
fromPartial(_: DeepPartial<MsgLeaderReadyResponse>): MsgLeaderReadyResponse;
|
|
632
|
+
};
|
|
548
633
|
/** Msg defines the Msg service. */
|
|
549
634
|
export interface Msg {
|
|
550
635
|
RequestTransaction(request: MsgRequestTransaction): Promise<MsgRequestTransactionResponse>;
|
|
@@ -569,8 +654,12 @@ export interface Msg {
|
|
|
569
654
|
UpdateTssStatus(request: MsgUpdateTssStatus): Promise<MsgUpdateTssStatusResponse>;
|
|
570
655
|
SetTxHash(request: MsgSetTxHash): Promise<MsgSetTxHashResponse>;
|
|
571
656
|
SetTxProcess(request: MsgSetTxProcess): Promise<MsgSetTxProcessResponse>;
|
|
572
|
-
/** this line is used by starport scaffolding # proto/tx/rpc */
|
|
573
657
|
FinalizeTransaction(request: MsgFinalizeTransaction): Promise<MsgFinalizeTransactionResponse>;
|
|
658
|
+
WithdrawPool(request: MsgWithdrawPool): Promise<MsgWithdrawPoolResponse>;
|
|
659
|
+
UpdateToken(request: MsgUpdateToken): Promise<MsgUpdateTokenResponse>;
|
|
660
|
+
UpdatePoolRequest(request: MsgUpdatePoolRequest): Promise<MsgUpdatePoolRequestResponse>;
|
|
661
|
+
/** this line is used by starport scaffolding # proto/tx/rpc */
|
|
662
|
+
LeaderReady(request: MsgLeaderReady): Promise<MsgLeaderReadyResponse>;
|
|
574
663
|
}
|
|
575
664
|
export declare class MsgClientImpl implements Msg {
|
|
576
665
|
private readonly rpc;
|
|
@@ -598,6 +687,10 @@ export declare class MsgClientImpl implements Msg {
|
|
|
598
687
|
SetTxHash(request: MsgSetTxHash): Promise<MsgSetTxHashResponse>;
|
|
599
688
|
SetTxProcess(request: MsgSetTxProcess): Promise<MsgSetTxProcessResponse>;
|
|
600
689
|
FinalizeTransaction(request: MsgFinalizeTransaction): Promise<MsgFinalizeTransactionResponse>;
|
|
690
|
+
WithdrawPool(request: MsgWithdrawPool): Promise<MsgWithdrawPoolResponse>;
|
|
691
|
+
UpdateToken(request: MsgUpdateToken): Promise<MsgUpdateTokenResponse>;
|
|
692
|
+
UpdatePoolRequest(request: MsgUpdatePoolRequest): Promise<MsgUpdatePoolRequestResponse>;
|
|
693
|
+
LeaderReady(request: MsgLeaderReady): Promise<MsgLeaderReadyResponse>;
|
|
601
694
|
}
|
|
602
695
|
interface Rpc {
|
|
603
696
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
package/build/kima/tx.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MsgUpdateToken = exports.MsgWithdrawPoolResponse = exports.MsgWithdrawPool = exports.MsgFinalizeTransactionResponse = exports.MsgFinalizeTransaction = exports.MsgSetTxProcessResponse = exports.MsgSetTxProcess = exports.MsgSetTxHashResponse = exports.MsgSetTxHash = exports.MsgUpdateTssStatusResponse = exports.MsgUpdateTssStatus = exports.MsgAddTokenResponse = exports.MsgAddToken = exports.MsgUpdateChainStatusResponse = exports.MsgUpdateChainStatus = exports.MsgUpdateTssHashResponse = exports.MsgUpdateTssHash = exports.MsgAddChainResponse = exports.MsgAddChain = exports.MsgClearTssInfoResponse = exports.MsgClearTssInfo = exports.MsgRemoveWhitelistedResponse = exports.MsgRemoveWhitelisted = exports.MsgUpdateTssPubkeyResponse = exports.MsgUpdateTssPubkey = exports.MsgAddPubkeyResponse = exports.MsgAddPubkey = exports.MsgSetAdminResponse = exports.MsgSetAdmin = exports.MsgAddWhitelistedResponse = exports.MsgAddWhitelisted = exports.MsgCancelTransactionResponse = exports.MsgCancelTransaction = exports.MsgDrainTransactionResponse = exports.MsgDrainTransaction = exports.MsgProvisionTransactionResponse = exports.MsgProvisionTransaction = exports.MsgUpdateGasFeeResponse = exports.MsgUpdateGasFee = exports.MsgKeysignVoteResponse = exports.MsgKeysignVote = exports.MsgUpdateBalanceResponse = exports.MsgUpdateBalance = exports.MsgObservationVoteResponse = exports.MsgObservationVote = exports.MsgApproveTransactionResponse = exports.MsgApproveTransaction = exports.MsgRequestTransactionResponse = exports.MsgRequestTransaction = exports.protobufPackage = void 0;
|
|
4
|
+
exports.MsgClientImpl = exports.MsgLeaderReadyResponse = exports.MsgLeaderReady = exports.MsgUpdatePoolRequestResponse = exports.MsgUpdatePoolRequest = exports.MsgUpdateTokenResponse = void 0;
|
|
4
5
|
/* eslint-disable */
|
|
5
6
|
const minimal_1 = require("protobufjs/minimal");
|
|
6
7
|
exports.protobufPackage = "KimaFinance.kima.kima";
|
|
@@ -204,7 +205,7 @@ exports.MsgRequestTransaction = {
|
|
|
204
205
|
const baseMsgRequestTransactionResponse = {
|
|
205
206
|
code: "",
|
|
206
207
|
msg: "",
|
|
207
|
-
txId:
|
|
208
|
+
txId: 0,
|
|
208
209
|
};
|
|
209
210
|
exports.MsgRequestTransactionResponse = {
|
|
210
211
|
encode(message, writer = minimal_1.Writer.create()) {
|
|
@@ -214,8 +215,8 @@ exports.MsgRequestTransactionResponse = {
|
|
|
214
215
|
if (message.msg !== "") {
|
|
215
216
|
writer.uint32(18).string(message.msg);
|
|
216
217
|
}
|
|
217
|
-
if (message.txId !==
|
|
218
|
-
writer.uint32(
|
|
218
|
+
if (message.txId !== 0) {
|
|
219
|
+
writer.uint32(24).uint64(message.txId);
|
|
219
220
|
}
|
|
220
221
|
return writer;
|
|
221
222
|
},
|
|
@@ -235,7 +236,7 @@ exports.MsgRequestTransactionResponse = {
|
|
|
235
236
|
message.msg = reader.string();
|
|
236
237
|
break;
|
|
237
238
|
case 3:
|
|
238
|
-
message.txId = reader.
|
|
239
|
+
message.txId = longToNumber(reader.uint64());
|
|
239
240
|
break;
|
|
240
241
|
default:
|
|
241
242
|
reader.skipType(tag & 7);
|
|
@@ -261,10 +262,10 @@ exports.MsgRequestTransactionResponse = {
|
|
|
261
262
|
message.msg = "";
|
|
262
263
|
}
|
|
263
264
|
if (object.txId !== undefined && object.txId !== null) {
|
|
264
|
-
message.txId =
|
|
265
|
+
message.txId = Number(object.txId);
|
|
265
266
|
}
|
|
266
267
|
else {
|
|
267
|
-
message.txId =
|
|
268
|
+
message.txId = 0;
|
|
268
269
|
}
|
|
269
270
|
return message;
|
|
270
271
|
},
|
|
@@ -295,14 +296,14 @@ exports.MsgRequestTransactionResponse = {
|
|
|
295
296
|
message.txId = object.txId;
|
|
296
297
|
}
|
|
297
298
|
else {
|
|
298
|
-
message.txId =
|
|
299
|
+
message.txId = 0;
|
|
299
300
|
}
|
|
300
301
|
return message;
|
|
301
302
|
},
|
|
302
303
|
};
|
|
303
304
|
const baseMsgApproveTransaction = {
|
|
304
305
|
creator: "",
|
|
305
|
-
txId:
|
|
306
|
+
txId: 0,
|
|
306
307
|
txTHash: "",
|
|
307
308
|
success: "",
|
|
308
309
|
signedKey: "",
|
|
@@ -312,8 +313,8 @@ exports.MsgApproveTransaction = {
|
|
|
312
313
|
if (message.creator !== "") {
|
|
313
314
|
writer.uint32(10).string(message.creator);
|
|
314
315
|
}
|
|
315
|
-
if (message.txId !==
|
|
316
|
-
writer.uint32(
|
|
316
|
+
if (message.txId !== 0) {
|
|
317
|
+
writer.uint32(16).uint64(message.txId);
|
|
317
318
|
}
|
|
318
319
|
if (message.txTHash !== "") {
|
|
319
320
|
writer.uint32(26).string(message.txTHash);
|
|
@@ -337,7 +338,7 @@ exports.MsgApproveTransaction = {
|
|
|
337
338
|
message.creator = reader.string();
|
|
338
339
|
break;
|
|
339
340
|
case 2:
|
|
340
|
-
message.txId = reader.
|
|
341
|
+
message.txId = longToNumber(reader.uint64());
|
|
341
342
|
break;
|
|
342
343
|
case 3:
|
|
343
344
|
message.txTHash = reader.string();
|
|
@@ -364,10 +365,10 @@ exports.MsgApproveTransaction = {
|
|
|
364
365
|
message.creator = "";
|
|
365
366
|
}
|
|
366
367
|
if (object.txId !== undefined && object.txId !== null) {
|
|
367
|
-
message.txId =
|
|
368
|
+
message.txId = Number(object.txId);
|
|
368
369
|
}
|
|
369
370
|
else {
|
|
370
|
-
message.txId =
|
|
371
|
+
message.txId = 0;
|
|
371
372
|
}
|
|
372
373
|
if (object.txTHash !== undefined && object.txTHash !== null) {
|
|
373
374
|
message.txTHash = String(object.txTHash);
|
|
@@ -410,7 +411,7 @@ exports.MsgApproveTransaction = {
|
|
|
410
411
|
message.txId = object.txId;
|
|
411
412
|
}
|
|
412
413
|
else {
|
|
413
|
-
message.txId =
|
|
414
|
+
message.txId = 0;
|
|
414
415
|
}
|
|
415
416
|
if (object.txTHash !== undefined && object.txTHash !== null) {
|
|
416
417
|
message.txTHash = object.txTHash;
|
|
@@ -517,7 +518,7 @@ const baseMsgObservationVote = {
|
|
|
517
518
|
to: "",
|
|
518
519
|
amount: "",
|
|
519
520
|
payType: "",
|
|
520
|
-
kimaTxID:
|
|
521
|
+
kimaTxID: 0,
|
|
521
522
|
succeed: "",
|
|
522
523
|
};
|
|
523
524
|
exports.MsgObservationVote = {
|
|
@@ -543,8 +544,8 @@ exports.MsgObservationVote = {
|
|
|
543
544
|
if (message.payType !== "") {
|
|
544
545
|
writer.uint32(58).string(message.payType);
|
|
545
546
|
}
|
|
546
|
-
if (message.kimaTxID !==
|
|
547
|
-
writer.uint32(
|
|
547
|
+
if (message.kimaTxID !== 0) {
|
|
548
|
+
writer.uint32(64).uint64(message.kimaTxID);
|
|
548
549
|
}
|
|
549
550
|
if (message.succeed !== "") {
|
|
550
551
|
writer.uint32(74).string(message.succeed);
|
|
@@ -580,7 +581,7 @@ exports.MsgObservationVote = {
|
|
|
580
581
|
message.payType = reader.string();
|
|
581
582
|
break;
|
|
582
583
|
case 8:
|
|
583
|
-
message.kimaTxID = reader.
|
|
584
|
+
message.kimaTxID = longToNumber(reader.uint64());
|
|
584
585
|
break;
|
|
585
586
|
case 9:
|
|
586
587
|
message.succeed = reader.string();
|
|
@@ -637,10 +638,10 @@ exports.MsgObservationVote = {
|
|
|
637
638
|
message.payType = "";
|
|
638
639
|
}
|
|
639
640
|
if (object.kimaTxID !== undefined && object.kimaTxID !== null) {
|
|
640
|
-
message.kimaTxID =
|
|
641
|
+
message.kimaTxID = Number(object.kimaTxID);
|
|
641
642
|
}
|
|
642
643
|
else {
|
|
643
|
-
message.kimaTxID =
|
|
644
|
+
message.kimaTxID = 0;
|
|
644
645
|
}
|
|
645
646
|
if (object.succeed !== undefined && object.succeed !== null) {
|
|
646
647
|
message.succeed = String(object.succeed);
|
|
@@ -711,7 +712,7 @@ exports.MsgObservationVote = {
|
|
|
711
712
|
message.kimaTxID = object.kimaTxID;
|
|
712
713
|
}
|
|
713
714
|
else {
|
|
714
|
-
message.kimaTxID =
|
|
715
|
+
message.kimaTxID = 0;
|
|
715
716
|
}
|
|
716
717
|
if (object.succeed !== undefined && object.succeed !== null) {
|
|
717
718
|
message.succeed = object.succeed;
|
|
@@ -3041,14 +3042,14 @@ exports.MsgAddChainResponse = {
|
|
|
3041
3042
|
return message;
|
|
3042
3043
|
},
|
|
3043
3044
|
};
|
|
3044
|
-
const baseMsgUpdateTssHash = { creator: "", txId:
|
|
3045
|
+
const baseMsgUpdateTssHash = { creator: "", txId: 0, tssPullHash: "" };
|
|
3045
3046
|
exports.MsgUpdateTssHash = {
|
|
3046
3047
|
encode(message, writer = minimal_1.Writer.create()) {
|
|
3047
3048
|
if (message.creator !== "") {
|
|
3048
3049
|
writer.uint32(10).string(message.creator);
|
|
3049
3050
|
}
|
|
3050
|
-
if (message.txId !==
|
|
3051
|
-
writer.uint32(
|
|
3051
|
+
if (message.txId !== 0) {
|
|
3052
|
+
writer.uint32(16).uint64(message.txId);
|
|
3052
3053
|
}
|
|
3053
3054
|
if (message.tssPullHash !== "") {
|
|
3054
3055
|
writer.uint32(26).string(message.tssPullHash);
|
|
@@ -3066,7 +3067,7 @@ exports.MsgUpdateTssHash = {
|
|
|
3066
3067
|
message.creator = reader.string();
|
|
3067
3068
|
break;
|
|
3068
3069
|
case 2:
|
|
3069
|
-
message.txId = reader.
|
|
3070
|
+
message.txId = longToNumber(reader.uint64());
|
|
3070
3071
|
break;
|
|
3071
3072
|
case 3:
|
|
3072
3073
|
message.tssPullHash = reader.string();
|
|
@@ -3087,10 +3088,10 @@ exports.MsgUpdateTssHash = {
|
|
|
3087
3088
|
message.creator = "";
|
|
3088
3089
|
}
|
|
3089
3090
|
if (object.txId !== undefined && object.txId !== null) {
|
|
3090
|
-
message.txId =
|
|
3091
|
+
message.txId = Number(object.txId);
|
|
3091
3092
|
}
|
|
3092
3093
|
else {
|
|
3093
|
-
message.txId =
|
|
3094
|
+
message.txId = 0;
|
|
3094
3095
|
}
|
|
3095
3096
|
if (object.tssPullHash !== undefined && object.tssPullHash !== null) {
|
|
3096
3097
|
message.tssPullHash = String(object.tssPullHash);
|
|
@@ -3120,7 +3121,7 @@ exports.MsgUpdateTssHash = {
|
|
|
3120
3121
|
message.txId = object.txId;
|
|
3121
3122
|
}
|
|
3122
3123
|
else {
|
|
3123
|
-
message.txId =
|
|
3124
|
+
message.txId = 0;
|
|
3124
3125
|
}
|
|
3125
3126
|
if (object.tssPullHash !== undefined && object.tssPullHash !== null) {
|
|
3126
3127
|
message.tssPullHash = object.tssPullHash;
|
|
@@ -3650,14 +3651,14 @@ exports.MsgUpdateTssStatusResponse = {
|
|
|
3650
3651
|
return message;
|
|
3651
3652
|
},
|
|
3652
3653
|
};
|
|
3653
|
-
const baseMsgSetTxHash = { creator: "", txId:
|
|
3654
|
+
const baseMsgSetTxHash = { creator: "", txId: 0, txHash: "" };
|
|
3654
3655
|
exports.MsgSetTxHash = {
|
|
3655
3656
|
encode(message, writer = minimal_1.Writer.create()) {
|
|
3656
3657
|
if (message.creator !== "") {
|
|
3657
3658
|
writer.uint32(10).string(message.creator);
|
|
3658
3659
|
}
|
|
3659
|
-
if (message.txId !==
|
|
3660
|
-
writer.uint32(
|
|
3660
|
+
if (message.txId !== 0) {
|
|
3661
|
+
writer.uint32(16).uint64(message.txId);
|
|
3661
3662
|
}
|
|
3662
3663
|
if (message.txHash !== "") {
|
|
3663
3664
|
writer.uint32(26).string(message.txHash);
|
|
@@ -3675,7 +3676,7 @@ exports.MsgSetTxHash = {
|
|
|
3675
3676
|
message.creator = reader.string();
|
|
3676
3677
|
break;
|
|
3677
3678
|
case 2:
|
|
3678
|
-
message.txId = reader.
|
|
3679
|
+
message.txId = longToNumber(reader.uint64());
|
|
3679
3680
|
break;
|
|
3680
3681
|
case 3:
|
|
3681
3682
|
message.txHash = reader.string();
|
|
@@ -3696,10 +3697,10 @@ exports.MsgSetTxHash = {
|
|
|
3696
3697
|
message.creator = "";
|
|
3697
3698
|
}
|
|
3698
3699
|
if (object.txId !== undefined && object.txId !== null) {
|
|
3699
|
-
message.txId =
|
|
3700
|
+
message.txId = Number(object.txId);
|
|
3700
3701
|
}
|
|
3701
3702
|
else {
|
|
3702
|
-
message.txId =
|
|
3703
|
+
message.txId = 0;
|
|
3703
3704
|
}
|
|
3704
3705
|
if (object.txHash !== undefined && object.txHash !== null) {
|
|
3705
3706
|
message.txHash = String(object.txHash);
|
|
@@ -3728,7 +3729,7 @@ exports.MsgSetTxHash = {
|
|
|
3728
3729
|
message.txId = object.txId;
|
|
3729
3730
|
}
|
|
3730
3731
|
else {
|
|
3731
|
-
message.txId =
|
|
3732
|
+
message.txId = 0;
|
|
3732
3733
|
}
|
|
3733
3734
|
if (object.txHash !== undefined && object.txHash !== null) {
|
|
3734
3735
|
message.txHash = object.txHash;
|
|
@@ -3811,7 +3812,7 @@ exports.MsgSetTxHashResponse = {
|
|
|
3811
3812
|
};
|
|
3812
3813
|
const baseMsgSetTxProcess = {
|
|
3813
3814
|
creator: "",
|
|
3814
|
-
txId:
|
|
3815
|
+
txId: 0,
|
|
3815
3816
|
timestamp: "",
|
|
3816
3817
|
msgId: "",
|
|
3817
3818
|
};
|
|
@@ -3820,8 +3821,8 @@ exports.MsgSetTxProcess = {
|
|
|
3820
3821
|
if (message.creator !== "") {
|
|
3821
3822
|
writer.uint32(10).string(message.creator);
|
|
3822
3823
|
}
|
|
3823
|
-
if (message.txId !==
|
|
3824
|
-
writer.uint32(
|
|
3824
|
+
if (message.txId !== 0) {
|
|
3825
|
+
writer.uint32(16).uint64(message.txId);
|
|
3825
3826
|
}
|
|
3826
3827
|
if (message.timestamp !== "") {
|
|
3827
3828
|
writer.uint32(26).string(message.timestamp);
|
|
@@ -3842,7 +3843,7 @@ exports.MsgSetTxProcess = {
|
|
|
3842
3843
|
message.creator = reader.string();
|
|
3843
3844
|
break;
|
|
3844
3845
|
case 2:
|
|
3845
|
-
message.txId = reader.
|
|
3846
|
+
message.txId = longToNumber(reader.uint64());
|
|
3846
3847
|
break;
|
|
3847
3848
|
case 3:
|
|
3848
3849
|
message.timestamp = reader.string();
|
|
@@ -3866,10 +3867,10 @@ exports.MsgSetTxProcess = {
|
|
|
3866
3867
|
message.creator = "";
|
|
3867
3868
|
}
|
|
3868
3869
|
if (object.txId !== undefined && object.txId !== null) {
|
|
3869
|
-
message.txId =
|
|
3870
|
+
message.txId = Number(object.txId);
|
|
3870
3871
|
}
|
|
3871
3872
|
else {
|
|
3872
|
-
message.txId =
|
|
3873
|
+
message.txId = 0;
|
|
3873
3874
|
}
|
|
3874
3875
|
if (object.timestamp !== undefined && object.timestamp !== null) {
|
|
3875
3876
|
message.timestamp = String(object.timestamp);
|
|
@@ -3905,7 +3906,7 @@ exports.MsgSetTxProcess = {
|
|
|
3905
3906
|
message.txId = object.txId;
|
|
3906
3907
|
}
|
|
3907
3908
|
else {
|
|
3908
|
-
message.txId =
|
|
3909
|
+
message.txId = 0;
|
|
3909
3910
|
}
|
|
3910
3911
|
if (object.timestamp !== undefined && object.timestamp !== null) {
|
|
3911
3912
|
message.timestamp = object.timestamp;
|
|
@@ -3962,7 +3963,7 @@ exports.MsgSetTxProcessResponse = {
|
|
|
3962
3963
|
};
|
|
3963
3964
|
const baseMsgFinalizeTransaction = {
|
|
3964
3965
|
creator: "",
|
|
3965
|
-
txId:
|
|
3966
|
+
txId: 0,
|
|
3966
3967
|
txHash: "",
|
|
3967
3968
|
success: "",
|
|
3968
3969
|
signedKey: "",
|
|
@@ -3972,8 +3973,8 @@ exports.MsgFinalizeTransaction = {
|
|
|
3972
3973
|
if (message.creator !== "") {
|
|
3973
3974
|
writer.uint32(10).string(message.creator);
|
|
3974
3975
|
}
|
|
3975
|
-
if (message.txId !==
|
|
3976
|
-
writer.uint32(
|
|
3976
|
+
if (message.txId !== 0) {
|
|
3977
|
+
writer.uint32(16).uint64(message.txId);
|
|
3977
3978
|
}
|
|
3978
3979
|
if (message.txHash !== "") {
|
|
3979
3980
|
writer.uint32(26).string(message.txHash);
|
|
@@ -3997,7 +3998,7 @@ exports.MsgFinalizeTransaction = {
|
|
|
3997
3998
|
message.creator = reader.string();
|
|
3998
3999
|
break;
|
|
3999
4000
|
case 2:
|
|
4000
|
-
message.txId = reader.
|
|
4001
|
+
message.txId = longToNumber(reader.uint64());
|
|
4001
4002
|
break;
|
|
4002
4003
|
case 3:
|
|
4003
4004
|
message.txHash = reader.string();
|
|
@@ -4024,10 +4025,10 @@ exports.MsgFinalizeTransaction = {
|
|
|
4024
4025
|
message.creator = "";
|
|
4025
4026
|
}
|
|
4026
4027
|
if (object.txId !== undefined && object.txId !== null) {
|
|
4027
|
-
message.txId =
|
|
4028
|
+
message.txId = Number(object.txId);
|
|
4028
4029
|
}
|
|
4029
4030
|
else {
|
|
4030
|
-
message.txId =
|
|
4031
|
+
message.txId = 0;
|
|
4031
4032
|
}
|
|
4032
4033
|
if (object.txHash !== undefined && object.txHash !== null) {
|
|
4033
4034
|
message.txHash = String(object.txHash);
|
|
@@ -4070,7 +4071,7 @@ exports.MsgFinalizeTransaction = {
|
|
|
4070
4071
|
message.txId = object.txId;
|
|
4071
4072
|
}
|
|
4072
4073
|
else {
|
|
4073
|
-
message.txId =
|
|
4074
|
+
message.txId = 0;
|
|
4074
4075
|
}
|
|
4075
4076
|
if (object.txHash !== undefined && object.txHash !== null) {
|
|
4076
4077
|
message.txHash = object.txHash;
|
|
@@ -4169,6 +4170,531 @@ exports.MsgFinalizeTransactionResponse = {
|
|
|
4169
4170
|
return message;
|
|
4170
4171
|
},
|
|
4171
4172
|
};
|
|
4173
|
+
const baseMsgWithdrawPool = {
|
|
4174
|
+
creator: "",
|
|
4175
|
+
chain: "",
|
|
4176
|
+
targetAddress: "",
|
|
4177
|
+
amount: "",
|
|
4178
|
+
};
|
|
4179
|
+
exports.MsgWithdrawPool = {
|
|
4180
|
+
encode(message, writer = minimal_1.Writer.create()) {
|
|
4181
|
+
if (message.creator !== "") {
|
|
4182
|
+
writer.uint32(10).string(message.creator);
|
|
4183
|
+
}
|
|
4184
|
+
if (message.chain !== "") {
|
|
4185
|
+
writer.uint32(18).string(message.chain);
|
|
4186
|
+
}
|
|
4187
|
+
if (message.targetAddress !== "") {
|
|
4188
|
+
writer.uint32(26).string(message.targetAddress);
|
|
4189
|
+
}
|
|
4190
|
+
if (message.amount !== "") {
|
|
4191
|
+
writer.uint32(34).string(message.amount);
|
|
4192
|
+
}
|
|
4193
|
+
return writer;
|
|
4194
|
+
},
|
|
4195
|
+
decode(input, length) {
|
|
4196
|
+
const reader = input instanceof Uint8Array ? new minimal_1.Reader(input) : input;
|
|
4197
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4198
|
+
const message = { ...baseMsgWithdrawPool };
|
|
4199
|
+
while (reader.pos < end) {
|
|
4200
|
+
const tag = reader.uint32();
|
|
4201
|
+
switch (tag >>> 3) {
|
|
4202
|
+
case 1:
|
|
4203
|
+
message.creator = reader.string();
|
|
4204
|
+
break;
|
|
4205
|
+
case 2:
|
|
4206
|
+
message.chain = reader.string();
|
|
4207
|
+
break;
|
|
4208
|
+
case 3:
|
|
4209
|
+
message.targetAddress = reader.string();
|
|
4210
|
+
break;
|
|
4211
|
+
case 4:
|
|
4212
|
+
message.amount = reader.string();
|
|
4213
|
+
break;
|
|
4214
|
+
default:
|
|
4215
|
+
reader.skipType(tag & 7);
|
|
4216
|
+
break;
|
|
4217
|
+
}
|
|
4218
|
+
}
|
|
4219
|
+
return message;
|
|
4220
|
+
},
|
|
4221
|
+
fromJSON(object) {
|
|
4222
|
+
const message = { ...baseMsgWithdrawPool };
|
|
4223
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
4224
|
+
message.creator = String(object.creator);
|
|
4225
|
+
}
|
|
4226
|
+
else {
|
|
4227
|
+
message.creator = "";
|
|
4228
|
+
}
|
|
4229
|
+
if (object.chain !== undefined && object.chain !== null) {
|
|
4230
|
+
message.chain = String(object.chain);
|
|
4231
|
+
}
|
|
4232
|
+
else {
|
|
4233
|
+
message.chain = "";
|
|
4234
|
+
}
|
|
4235
|
+
if (object.targetAddress !== undefined && object.targetAddress !== null) {
|
|
4236
|
+
message.targetAddress = String(object.targetAddress);
|
|
4237
|
+
}
|
|
4238
|
+
else {
|
|
4239
|
+
message.targetAddress = "";
|
|
4240
|
+
}
|
|
4241
|
+
if (object.amount !== undefined && object.amount !== null) {
|
|
4242
|
+
message.amount = String(object.amount);
|
|
4243
|
+
}
|
|
4244
|
+
else {
|
|
4245
|
+
message.amount = "";
|
|
4246
|
+
}
|
|
4247
|
+
return message;
|
|
4248
|
+
},
|
|
4249
|
+
toJSON(message) {
|
|
4250
|
+
const obj = {};
|
|
4251
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
4252
|
+
message.chain !== undefined && (obj.chain = message.chain);
|
|
4253
|
+
message.targetAddress !== undefined &&
|
|
4254
|
+
(obj.targetAddress = message.targetAddress);
|
|
4255
|
+
message.amount !== undefined && (obj.amount = message.amount);
|
|
4256
|
+
return obj;
|
|
4257
|
+
},
|
|
4258
|
+
fromPartial(object) {
|
|
4259
|
+
const message = { ...baseMsgWithdrawPool };
|
|
4260
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
4261
|
+
message.creator = object.creator;
|
|
4262
|
+
}
|
|
4263
|
+
else {
|
|
4264
|
+
message.creator = "";
|
|
4265
|
+
}
|
|
4266
|
+
if (object.chain !== undefined && object.chain !== null) {
|
|
4267
|
+
message.chain = object.chain;
|
|
4268
|
+
}
|
|
4269
|
+
else {
|
|
4270
|
+
message.chain = "";
|
|
4271
|
+
}
|
|
4272
|
+
if (object.targetAddress !== undefined && object.targetAddress !== null) {
|
|
4273
|
+
message.targetAddress = object.targetAddress;
|
|
4274
|
+
}
|
|
4275
|
+
else {
|
|
4276
|
+
message.targetAddress = "";
|
|
4277
|
+
}
|
|
4278
|
+
if (object.amount !== undefined && object.amount !== null) {
|
|
4279
|
+
message.amount = object.amount;
|
|
4280
|
+
}
|
|
4281
|
+
else {
|
|
4282
|
+
message.amount = "";
|
|
4283
|
+
}
|
|
4284
|
+
return message;
|
|
4285
|
+
},
|
|
4286
|
+
};
|
|
4287
|
+
const baseMsgWithdrawPoolResponse = {};
|
|
4288
|
+
exports.MsgWithdrawPoolResponse = {
|
|
4289
|
+
encode(_, writer = minimal_1.Writer.create()) {
|
|
4290
|
+
return writer;
|
|
4291
|
+
},
|
|
4292
|
+
decode(input, length) {
|
|
4293
|
+
const reader = input instanceof Uint8Array ? new minimal_1.Reader(input) : input;
|
|
4294
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4295
|
+
const message = {
|
|
4296
|
+
...baseMsgWithdrawPoolResponse,
|
|
4297
|
+
};
|
|
4298
|
+
while (reader.pos < end) {
|
|
4299
|
+
const tag = reader.uint32();
|
|
4300
|
+
switch (tag >>> 3) {
|
|
4301
|
+
default:
|
|
4302
|
+
reader.skipType(tag & 7);
|
|
4303
|
+
break;
|
|
4304
|
+
}
|
|
4305
|
+
}
|
|
4306
|
+
return message;
|
|
4307
|
+
},
|
|
4308
|
+
fromJSON(_) {
|
|
4309
|
+
const message = {
|
|
4310
|
+
...baseMsgWithdrawPoolResponse,
|
|
4311
|
+
};
|
|
4312
|
+
return message;
|
|
4313
|
+
},
|
|
4314
|
+
toJSON(_) {
|
|
4315
|
+
const obj = {};
|
|
4316
|
+
return obj;
|
|
4317
|
+
},
|
|
4318
|
+
fromPartial(_) {
|
|
4319
|
+
const message = {
|
|
4320
|
+
...baseMsgWithdrawPoolResponse,
|
|
4321
|
+
};
|
|
4322
|
+
return message;
|
|
4323
|
+
},
|
|
4324
|
+
};
|
|
4325
|
+
const baseMsgUpdateToken = { creator: "", chain: "", address: "" };
|
|
4326
|
+
exports.MsgUpdateToken = {
|
|
4327
|
+
encode(message, writer = minimal_1.Writer.create()) {
|
|
4328
|
+
if (message.creator !== "") {
|
|
4329
|
+
writer.uint32(10).string(message.creator);
|
|
4330
|
+
}
|
|
4331
|
+
if (message.chain !== "") {
|
|
4332
|
+
writer.uint32(18).string(message.chain);
|
|
4333
|
+
}
|
|
4334
|
+
if (message.address !== "") {
|
|
4335
|
+
writer.uint32(26).string(message.address);
|
|
4336
|
+
}
|
|
4337
|
+
return writer;
|
|
4338
|
+
},
|
|
4339
|
+
decode(input, length) {
|
|
4340
|
+
const reader = input instanceof Uint8Array ? new minimal_1.Reader(input) : input;
|
|
4341
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4342
|
+
const message = { ...baseMsgUpdateToken };
|
|
4343
|
+
while (reader.pos < end) {
|
|
4344
|
+
const tag = reader.uint32();
|
|
4345
|
+
switch (tag >>> 3) {
|
|
4346
|
+
case 1:
|
|
4347
|
+
message.creator = reader.string();
|
|
4348
|
+
break;
|
|
4349
|
+
case 2:
|
|
4350
|
+
message.chain = reader.string();
|
|
4351
|
+
break;
|
|
4352
|
+
case 3:
|
|
4353
|
+
message.address = reader.string();
|
|
4354
|
+
break;
|
|
4355
|
+
default:
|
|
4356
|
+
reader.skipType(tag & 7);
|
|
4357
|
+
break;
|
|
4358
|
+
}
|
|
4359
|
+
}
|
|
4360
|
+
return message;
|
|
4361
|
+
},
|
|
4362
|
+
fromJSON(object) {
|
|
4363
|
+
const message = { ...baseMsgUpdateToken };
|
|
4364
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
4365
|
+
message.creator = String(object.creator);
|
|
4366
|
+
}
|
|
4367
|
+
else {
|
|
4368
|
+
message.creator = "";
|
|
4369
|
+
}
|
|
4370
|
+
if (object.chain !== undefined && object.chain !== null) {
|
|
4371
|
+
message.chain = String(object.chain);
|
|
4372
|
+
}
|
|
4373
|
+
else {
|
|
4374
|
+
message.chain = "";
|
|
4375
|
+
}
|
|
4376
|
+
if (object.address !== undefined && object.address !== null) {
|
|
4377
|
+
message.address = String(object.address);
|
|
4378
|
+
}
|
|
4379
|
+
else {
|
|
4380
|
+
message.address = "";
|
|
4381
|
+
}
|
|
4382
|
+
return message;
|
|
4383
|
+
},
|
|
4384
|
+
toJSON(message) {
|
|
4385
|
+
const obj = {};
|
|
4386
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
4387
|
+
message.chain !== undefined && (obj.chain = message.chain);
|
|
4388
|
+
message.address !== undefined && (obj.address = message.address);
|
|
4389
|
+
return obj;
|
|
4390
|
+
},
|
|
4391
|
+
fromPartial(object) {
|
|
4392
|
+
const message = { ...baseMsgUpdateToken };
|
|
4393
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
4394
|
+
message.creator = object.creator;
|
|
4395
|
+
}
|
|
4396
|
+
else {
|
|
4397
|
+
message.creator = "";
|
|
4398
|
+
}
|
|
4399
|
+
if (object.chain !== undefined && object.chain !== null) {
|
|
4400
|
+
message.chain = object.chain;
|
|
4401
|
+
}
|
|
4402
|
+
else {
|
|
4403
|
+
message.chain = "";
|
|
4404
|
+
}
|
|
4405
|
+
if (object.address !== undefined && object.address !== null) {
|
|
4406
|
+
message.address = object.address;
|
|
4407
|
+
}
|
|
4408
|
+
else {
|
|
4409
|
+
message.address = "";
|
|
4410
|
+
}
|
|
4411
|
+
return message;
|
|
4412
|
+
},
|
|
4413
|
+
};
|
|
4414
|
+
const baseMsgUpdateTokenResponse = {};
|
|
4415
|
+
exports.MsgUpdateTokenResponse = {
|
|
4416
|
+
encode(_, writer = minimal_1.Writer.create()) {
|
|
4417
|
+
return writer;
|
|
4418
|
+
},
|
|
4419
|
+
decode(input, length) {
|
|
4420
|
+
const reader = input instanceof Uint8Array ? new minimal_1.Reader(input) : input;
|
|
4421
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4422
|
+
const message = { ...baseMsgUpdateTokenResponse };
|
|
4423
|
+
while (reader.pos < end) {
|
|
4424
|
+
const tag = reader.uint32();
|
|
4425
|
+
switch (tag >>> 3) {
|
|
4426
|
+
default:
|
|
4427
|
+
reader.skipType(tag & 7);
|
|
4428
|
+
break;
|
|
4429
|
+
}
|
|
4430
|
+
}
|
|
4431
|
+
return message;
|
|
4432
|
+
},
|
|
4433
|
+
fromJSON(_) {
|
|
4434
|
+
const message = { ...baseMsgUpdateTokenResponse };
|
|
4435
|
+
return message;
|
|
4436
|
+
},
|
|
4437
|
+
toJSON(_) {
|
|
4438
|
+
const obj = {};
|
|
4439
|
+
return obj;
|
|
4440
|
+
},
|
|
4441
|
+
fromPartial(_) {
|
|
4442
|
+
const message = { ...baseMsgUpdateTokenResponse };
|
|
4443
|
+
return message;
|
|
4444
|
+
},
|
|
4445
|
+
};
|
|
4446
|
+
const baseMsgUpdatePoolRequest = {
|
|
4447
|
+
creator: "",
|
|
4448
|
+
reqId: "",
|
|
4449
|
+
processed: "",
|
|
4450
|
+
};
|
|
4451
|
+
exports.MsgUpdatePoolRequest = {
|
|
4452
|
+
encode(message, writer = minimal_1.Writer.create()) {
|
|
4453
|
+
if (message.creator !== "") {
|
|
4454
|
+
writer.uint32(10).string(message.creator);
|
|
4455
|
+
}
|
|
4456
|
+
if (message.reqId !== "") {
|
|
4457
|
+
writer.uint32(18).string(message.reqId);
|
|
4458
|
+
}
|
|
4459
|
+
if (message.processed !== "") {
|
|
4460
|
+
writer.uint32(26).string(message.processed);
|
|
4461
|
+
}
|
|
4462
|
+
return writer;
|
|
4463
|
+
},
|
|
4464
|
+
decode(input, length) {
|
|
4465
|
+
const reader = input instanceof Uint8Array ? new minimal_1.Reader(input) : input;
|
|
4466
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4467
|
+
const message = { ...baseMsgUpdatePoolRequest };
|
|
4468
|
+
while (reader.pos < end) {
|
|
4469
|
+
const tag = reader.uint32();
|
|
4470
|
+
switch (tag >>> 3) {
|
|
4471
|
+
case 1:
|
|
4472
|
+
message.creator = reader.string();
|
|
4473
|
+
break;
|
|
4474
|
+
case 2:
|
|
4475
|
+
message.reqId = reader.string();
|
|
4476
|
+
break;
|
|
4477
|
+
case 3:
|
|
4478
|
+
message.processed = reader.string();
|
|
4479
|
+
break;
|
|
4480
|
+
default:
|
|
4481
|
+
reader.skipType(tag & 7);
|
|
4482
|
+
break;
|
|
4483
|
+
}
|
|
4484
|
+
}
|
|
4485
|
+
return message;
|
|
4486
|
+
},
|
|
4487
|
+
fromJSON(object) {
|
|
4488
|
+
const message = { ...baseMsgUpdatePoolRequest };
|
|
4489
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
4490
|
+
message.creator = String(object.creator);
|
|
4491
|
+
}
|
|
4492
|
+
else {
|
|
4493
|
+
message.creator = "";
|
|
4494
|
+
}
|
|
4495
|
+
if (object.reqId !== undefined && object.reqId !== null) {
|
|
4496
|
+
message.reqId = String(object.reqId);
|
|
4497
|
+
}
|
|
4498
|
+
else {
|
|
4499
|
+
message.reqId = "";
|
|
4500
|
+
}
|
|
4501
|
+
if (object.processed !== undefined && object.processed !== null) {
|
|
4502
|
+
message.processed = String(object.processed);
|
|
4503
|
+
}
|
|
4504
|
+
else {
|
|
4505
|
+
message.processed = "";
|
|
4506
|
+
}
|
|
4507
|
+
return message;
|
|
4508
|
+
},
|
|
4509
|
+
toJSON(message) {
|
|
4510
|
+
const obj = {};
|
|
4511
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
4512
|
+
message.reqId !== undefined && (obj.reqId = message.reqId);
|
|
4513
|
+
message.processed !== undefined && (obj.processed = message.processed);
|
|
4514
|
+
return obj;
|
|
4515
|
+
},
|
|
4516
|
+
fromPartial(object) {
|
|
4517
|
+
const message = { ...baseMsgUpdatePoolRequest };
|
|
4518
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
4519
|
+
message.creator = object.creator;
|
|
4520
|
+
}
|
|
4521
|
+
else {
|
|
4522
|
+
message.creator = "";
|
|
4523
|
+
}
|
|
4524
|
+
if (object.reqId !== undefined && object.reqId !== null) {
|
|
4525
|
+
message.reqId = object.reqId;
|
|
4526
|
+
}
|
|
4527
|
+
else {
|
|
4528
|
+
message.reqId = "";
|
|
4529
|
+
}
|
|
4530
|
+
if (object.processed !== undefined && object.processed !== null) {
|
|
4531
|
+
message.processed = object.processed;
|
|
4532
|
+
}
|
|
4533
|
+
else {
|
|
4534
|
+
message.processed = "";
|
|
4535
|
+
}
|
|
4536
|
+
return message;
|
|
4537
|
+
},
|
|
4538
|
+
};
|
|
4539
|
+
const baseMsgUpdatePoolRequestResponse = {};
|
|
4540
|
+
exports.MsgUpdatePoolRequestResponse = {
|
|
4541
|
+
encode(_, writer = minimal_1.Writer.create()) {
|
|
4542
|
+
return writer;
|
|
4543
|
+
},
|
|
4544
|
+
decode(input, length) {
|
|
4545
|
+
const reader = input instanceof Uint8Array ? new minimal_1.Reader(input) : input;
|
|
4546
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4547
|
+
const message = {
|
|
4548
|
+
...baseMsgUpdatePoolRequestResponse,
|
|
4549
|
+
};
|
|
4550
|
+
while (reader.pos < end) {
|
|
4551
|
+
const tag = reader.uint32();
|
|
4552
|
+
switch (tag >>> 3) {
|
|
4553
|
+
default:
|
|
4554
|
+
reader.skipType(tag & 7);
|
|
4555
|
+
break;
|
|
4556
|
+
}
|
|
4557
|
+
}
|
|
4558
|
+
return message;
|
|
4559
|
+
},
|
|
4560
|
+
fromJSON(_) {
|
|
4561
|
+
const message = {
|
|
4562
|
+
...baseMsgUpdatePoolRequestResponse,
|
|
4563
|
+
};
|
|
4564
|
+
return message;
|
|
4565
|
+
},
|
|
4566
|
+
toJSON(_) {
|
|
4567
|
+
const obj = {};
|
|
4568
|
+
return obj;
|
|
4569
|
+
},
|
|
4570
|
+
fromPartial(_) {
|
|
4571
|
+
const message = {
|
|
4572
|
+
...baseMsgUpdatePoolRequestResponse,
|
|
4573
|
+
};
|
|
4574
|
+
return message;
|
|
4575
|
+
},
|
|
4576
|
+
};
|
|
4577
|
+
const baseMsgLeaderReady = { creator: "", msgId: "", peerId: "" };
|
|
4578
|
+
exports.MsgLeaderReady = {
|
|
4579
|
+
encode(message, writer = minimal_1.Writer.create()) {
|
|
4580
|
+
if (message.creator !== "") {
|
|
4581
|
+
writer.uint32(10).string(message.creator);
|
|
4582
|
+
}
|
|
4583
|
+
if (message.msgId !== "") {
|
|
4584
|
+
writer.uint32(18).string(message.msgId);
|
|
4585
|
+
}
|
|
4586
|
+
if (message.peerId !== "") {
|
|
4587
|
+
writer.uint32(26).string(message.peerId);
|
|
4588
|
+
}
|
|
4589
|
+
return writer;
|
|
4590
|
+
},
|
|
4591
|
+
decode(input, length) {
|
|
4592
|
+
const reader = input instanceof Uint8Array ? new minimal_1.Reader(input) : input;
|
|
4593
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4594
|
+
const message = { ...baseMsgLeaderReady };
|
|
4595
|
+
while (reader.pos < end) {
|
|
4596
|
+
const tag = reader.uint32();
|
|
4597
|
+
switch (tag >>> 3) {
|
|
4598
|
+
case 1:
|
|
4599
|
+
message.creator = reader.string();
|
|
4600
|
+
break;
|
|
4601
|
+
case 2:
|
|
4602
|
+
message.msgId = reader.string();
|
|
4603
|
+
break;
|
|
4604
|
+
case 3:
|
|
4605
|
+
message.peerId = reader.string();
|
|
4606
|
+
break;
|
|
4607
|
+
default:
|
|
4608
|
+
reader.skipType(tag & 7);
|
|
4609
|
+
break;
|
|
4610
|
+
}
|
|
4611
|
+
}
|
|
4612
|
+
return message;
|
|
4613
|
+
},
|
|
4614
|
+
fromJSON(object) {
|
|
4615
|
+
const message = { ...baseMsgLeaderReady };
|
|
4616
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
4617
|
+
message.creator = String(object.creator);
|
|
4618
|
+
}
|
|
4619
|
+
else {
|
|
4620
|
+
message.creator = "";
|
|
4621
|
+
}
|
|
4622
|
+
if (object.msgId !== undefined && object.msgId !== null) {
|
|
4623
|
+
message.msgId = String(object.msgId);
|
|
4624
|
+
}
|
|
4625
|
+
else {
|
|
4626
|
+
message.msgId = "";
|
|
4627
|
+
}
|
|
4628
|
+
if (object.peerId !== undefined && object.peerId !== null) {
|
|
4629
|
+
message.peerId = String(object.peerId);
|
|
4630
|
+
}
|
|
4631
|
+
else {
|
|
4632
|
+
message.peerId = "";
|
|
4633
|
+
}
|
|
4634
|
+
return message;
|
|
4635
|
+
},
|
|
4636
|
+
toJSON(message) {
|
|
4637
|
+
const obj = {};
|
|
4638
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
4639
|
+
message.msgId !== undefined && (obj.msgId = message.msgId);
|
|
4640
|
+
message.peerId !== undefined && (obj.peerId = message.peerId);
|
|
4641
|
+
return obj;
|
|
4642
|
+
},
|
|
4643
|
+
fromPartial(object) {
|
|
4644
|
+
const message = { ...baseMsgLeaderReady };
|
|
4645
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
4646
|
+
message.creator = object.creator;
|
|
4647
|
+
}
|
|
4648
|
+
else {
|
|
4649
|
+
message.creator = "";
|
|
4650
|
+
}
|
|
4651
|
+
if (object.msgId !== undefined && object.msgId !== null) {
|
|
4652
|
+
message.msgId = object.msgId;
|
|
4653
|
+
}
|
|
4654
|
+
else {
|
|
4655
|
+
message.msgId = "";
|
|
4656
|
+
}
|
|
4657
|
+
if (object.peerId !== undefined && object.peerId !== null) {
|
|
4658
|
+
message.peerId = object.peerId;
|
|
4659
|
+
}
|
|
4660
|
+
else {
|
|
4661
|
+
message.peerId = "";
|
|
4662
|
+
}
|
|
4663
|
+
return message;
|
|
4664
|
+
},
|
|
4665
|
+
};
|
|
4666
|
+
const baseMsgLeaderReadyResponse = {};
|
|
4667
|
+
exports.MsgLeaderReadyResponse = {
|
|
4668
|
+
encode(_, writer = minimal_1.Writer.create()) {
|
|
4669
|
+
return writer;
|
|
4670
|
+
},
|
|
4671
|
+
decode(input, length) {
|
|
4672
|
+
const reader = input instanceof Uint8Array ? new minimal_1.Reader(input) : input;
|
|
4673
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4674
|
+
const message = { ...baseMsgLeaderReadyResponse };
|
|
4675
|
+
while (reader.pos < end) {
|
|
4676
|
+
const tag = reader.uint32();
|
|
4677
|
+
switch (tag >>> 3) {
|
|
4678
|
+
default:
|
|
4679
|
+
reader.skipType(tag & 7);
|
|
4680
|
+
break;
|
|
4681
|
+
}
|
|
4682
|
+
}
|
|
4683
|
+
return message;
|
|
4684
|
+
},
|
|
4685
|
+
fromJSON(_) {
|
|
4686
|
+
const message = { ...baseMsgLeaderReadyResponse };
|
|
4687
|
+
return message;
|
|
4688
|
+
},
|
|
4689
|
+
toJSON(_) {
|
|
4690
|
+
const obj = {};
|
|
4691
|
+
return obj;
|
|
4692
|
+
},
|
|
4693
|
+
fromPartial(_) {
|
|
4694
|
+
const message = { ...baseMsgLeaderReadyResponse };
|
|
4695
|
+
return message;
|
|
4696
|
+
},
|
|
4697
|
+
};
|
|
4172
4698
|
class MsgClientImpl {
|
|
4173
4699
|
rpc;
|
|
4174
4700
|
constructor(rpc) {
|
|
@@ -4289,5 +4815,42 @@ class MsgClientImpl {
|
|
|
4289
4815
|
const promise = this.rpc.request("KimaFinance.kima.kima.Msg", "FinalizeTransaction", data);
|
|
4290
4816
|
return promise.then((data) => exports.MsgFinalizeTransactionResponse.decode(new minimal_1.Reader(data)));
|
|
4291
4817
|
}
|
|
4818
|
+
WithdrawPool(request) {
|
|
4819
|
+
const data = exports.MsgWithdrawPool.encode(request).finish();
|
|
4820
|
+
const promise = this.rpc.request("KimaFinance.kima.kima.Msg", "WithdrawPool", data);
|
|
4821
|
+
return promise.then((data) => exports.MsgWithdrawPoolResponse.decode(new minimal_1.Reader(data)));
|
|
4822
|
+
}
|
|
4823
|
+
UpdateToken(request) {
|
|
4824
|
+
const data = exports.MsgUpdateToken.encode(request).finish();
|
|
4825
|
+
const promise = this.rpc.request("KimaFinance.kima.kima.Msg", "UpdateToken", data);
|
|
4826
|
+
return promise.then((data) => exports.MsgUpdateTokenResponse.decode(new minimal_1.Reader(data)));
|
|
4827
|
+
}
|
|
4828
|
+
UpdatePoolRequest(request) {
|
|
4829
|
+
const data = exports.MsgUpdatePoolRequest.encode(request).finish();
|
|
4830
|
+
const promise = this.rpc.request("KimaFinance.kima.kima.Msg", "UpdatePoolRequest", data);
|
|
4831
|
+
return promise.then((data) => exports.MsgUpdatePoolRequestResponse.decode(new minimal_1.Reader(data)));
|
|
4832
|
+
}
|
|
4833
|
+
LeaderReady(request) {
|
|
4834
|
+
const data = exports.MsgLeaderReady.encode(request).finish();
|
|
4835
|
+
const promise = this.rpc.request("KimaFinance.kima.kima.Msg", "LeaderReady", data);
|
|
4836
|
+
return promise.then((data) => exports.MsgLeaderReadyResponse.decode(new minimal_1.Reader(data)));
|
|
4837
|
+
}
|
|
4292
4838
|
}
|
|
4293
4839
|
exports.MsgClientImpl = MsgClientImpl;
|
|
4840
|
+
var globalThis = (() => {
|
|
4841
|
+
if (typeof globalThis !== "undefined")
|
|
4842
|
+
return globalThis;
|
|
4843
|
+
if (typeof self !== "undefined")
|
|
4844
|
+
return self;
|
|
4845
|
+
if (typeof window !== "undefined")
|
|
4846
|
+
return window;
|
|
4847
|
+
if (typeof global !== "undefined")
|
|
4848
|
+
return global;
|
|
4849
|
+
throw "Unable to locate global object";
|
|
4850
|
+
})();
|
|
4851
|
+
function longToNumber(long) {
|
|
4852
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
4853
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
4854
|
+
}
|
|
4855
|
+
return long.toNumber();
|
|
4856
|
+
}
|
package/package.json
CHANGED