@kimafinance/kima-transaction-api 1.4.2 → 1.5.5

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.
@@ -0,0 +1,387 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "kimablockchain.swap";
3
+ export interface MsgRequestSwapTransaction {
4
+ creator: string;
5
+ /** the origin chain of the swap transaction */
6
+ originChain: string;
7
+ /** the origin address of the swap transaction */
8
+ originAddress: string;
9
+ /** the target chain of the swap transaction */
10
+ targetChain: string;
11
+ /** the target address of the swap transaction */
12
+ targetAddress: string;
13
+ /** the origin symbol of the swap transaction */
14
+ originSymbol: string;
15
+ /** the target symbol of the swap transaction */
16
+ targetSymbol: string;
17
+ /** the amount in of the swap transaction */
18
+ amountIn: string;
19
+ /** the amount out of the swap transaction */
20
+ amountOut: string;
21
+ /** the fee of the swap transaction */
22
+ fee: string;
23
+ /** the dex of the swap transaction */
24
+ dex: string;
25
+ /** the slippage of the swap transaction */
26
+ slippage: string;
27
+ /** the options of the swap transaction */
28
+ options: string;
29
+ }
30
+ export interface MsgRequestSwapTransactionResponse {
31
+ code: string;
32
+ msg: string;
33
+ txId: number;
34
+ }
35
+ export interface MsgSetTxToProcess {
36
+ creator: string;
37
+ txId: number;
38
+ timestamp: number;
39
+ msgId: string;
40
+ handleId: number;
41
+ /** swap transaction type */
42
+ txType: string;
43
+ /** the fee id for the transaction */
44
+ feeId: string;
45
+ /** the origin gas fee of the transaction */
46
+ originGasFee: string;
47
+ /** the target gas fee of the transaction */
48
+ targetGasFee: string;
49
+ /** the kima processing fee of the transaction */
50
+ kimaProcessingFee: string;
51
+ /** the total fee of the transaction */
52
+ totalFee: string;
53
+ /** the pegged to of the transaction */
54
+ peggedTo: string;
55
+ /** the expiration of the transaction */
56
+ expiration: number;
57
+ }
58
+ export interface MsgSetTxToProcessResponse {
59
+ code: string;
60
+ msg: string;
61
+ }
62
+ export interface MsgFinalizeSwapTransaction {
63
+ creator: string;
64
+ txId: number;
65
+ txHash: string;
66
+ success: boolean;
67
+ errReason: string;
68
+ tssMsgId: string;
69
+ /** request_swap, request_swap_refund */
70
+ txType: string;
71
+ /** pull, release, refund */
72
+ payType: string;
73
+ }
74
+ export interface MsgFinalizeSwapTransactionResponse {
75
+ code: string;
76
+ msg: string;
77
+ }
78
+ export interface MsgSwapObserveVote {
79
+ creator: string;
80
+ txHash: string;
81
+ chainId: string;
82
+ tokenSymbol: string;
83
+ from: string;
84
+ to: string;
85
+ amount: string;
86
+ payType: string;
87
+ kimaTxId: number;
88
+ tssMsgId: string;
89
+ txType: string;
90
+ succeed: boolean;
91
+ failReason: string;
92
+ reserved: string;
93
+ }
94
+ export interface MsgSwapObserveVoteResponse {
95
+ code: string;
96
+ msg: string;
97
+ }
98
+ export interface MsgCleanPendingSwapTransaction {
99
+ creator: string;
100
+ }
101
+ export interface MsgCleanPendingSwapTransactionResponse {
102
+ code: string;
103
+ msg: string;
104
+ }
105
+ export interface MsgUpdateSwapTransactionStatus {
106
+ creator: string;
107
+ txId: string;
108
+ status: string;
109
+ reason: string;
110
+ }
111
+ export interface MsgUpdateSwapTransactionStatusResponse {
112
+ code: string;
113
+ msg: string;
114
+ }
115
+ export declare const MsgRequestSwapTransaction: {
116
+ encode(message: MsgRequestSwapTransaction, writer?: _m0.Writer): _m0.Writer;
117
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgRequestSwapTransaction;
118
+ fromJSON(object: any): MsgRequestSwapTransaction;
119
+ toJSON(message: MsgRequestSwapTransaction): unknown;
120
+ fromPartial<I extends {
121
+ creator?: string | undefined;
122
+ originChain?: string | undefined;
123
+ originAddress?: string | undefined;
124
+ targetChain?: string | undefined;
125
+ targetAddress?: string | undefined;
126
+ originSymbol?: string | undefined;
127
+ targetSymbol?: string | undefined;
128
+ amountIn?: string | undefined;
129
+ amountOut?: string | undefined;
130
+ fee?: string | undefined;
131
+ dex?: string | undefined;
132
+ slippage?: string | undefined;
133
+ options?: string | undefined;
134
+ } & {
135
+ creator?: string | undefined;
136
+ originChain?: string | undefined;
137
+ originAddress?: string | undefined;
138
+ targetChain?: string | undefined;
139
+ targetAddress?: string | undefined;
140
+ originSymbol?: string | undefined;
141
+ targetSymbol?: string | undefined;
142
+ amountIn?: string | undefined;
143
+ amountOut?: string | undefined;
144
+ fee?: string | undefined;
145
+ dex?: string | undefined;
146
+ slippage?: string | undefined;
147
+ options?: string | undefined;
148
+ } & { [K in Exclude<keyof I, keyof MsgRequestSwapTransaction>]: never; }>(object: I): MsgRequestSwapTransaction;
149
+ };
150
+ export declare const MsgRequestSwapTransactionResponse: {
151
+ encode(message: MsgRequestSwapTransactionResponse, writer?: _m0.Writer): _m0.Writer;
152
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgRequestSwapTransactionResponse;
153
+ fromJSON(object: any): MsgRequestSwapTransactionResponse;
154
+ toJSON(message: MsgRequestSwapTransactionResponse): unknown;
155
+ fromPartial<I extends {
156
+ code?: string | undefined;
157
+ msg?: string | undefined;
158
+ txId?: number | undefined;
159
+ } & {
160
+ code?: string | undefined;
161
+ msg?: string | undefined;
162
+ txId?: number | undefined;
163
+ } & { [K in Exclude<keyof I, keyof MsgRequestSwapTransactionResponse>]: never; }>(object: I): MsgRequestSwapTransactionResponse;
164
+ };
165
+ export declare const MsgSetTxToProcess: {
166
+ encode(message: MsgSetTxToProcess, writer?: _m0.Writer): _m0.Writer;
167
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgSetTxToProcess;
168
+ fromJSON(object: any): MsgSetTxToProcess;
169
+ toJSON(message: MsgSetTxToProcess): unknown;
170
+ fromPartial<I extends {
171
+ creator?: string | undefined;
172
+ txId?: number | undefined;
173
+ timestamp?: number | undefined;
174
+ msgId?: string | undefined;
175
+ handleId?: number | undefined;
176
+ txType?: string | undefined;
177
+ feeId?: string | undefined;
178
+ originGasFee?: string | undefined;
179
+ targetGasFee?: string | undefined;
180
+ kimaProcessingFee?: string | undefined;
181
+ totalFee?: string | undefined;
182
+ peggedTo?: string | undefined;
183
+ expiration?: number | undefined;
184
+ } & {
185
+ creator?: string | undefined;
186
+ txId?: number | undefined;
187
+ timestamp?: number | undefined;
188
+ msgId?: string | undefined;
189
+ handleId?: number | undefined;
190
+ txType?: string | undefined;
191
+ feeId?: string | undefined;
192
+ originGasFee?: string | undefined;
193
+ targetGasFee?: string | undefined;
194
+ kimaProcessingFee?: string | undefined;
195
+ totalFee?: string | undefined;
196
+ peggedTo?: string | undefined;
197
+ expiration?: number | undefined;
198
+ } & { [K in Exclude<keyof I, keyof MsgSetTxToProcess>]: never; }>(object: I): MsgSetTxToProcess;
199
+ };
200
+ export declare const MsgSetTxToProcessResponse: {
201
+ encode(message: MsgSetTxToProcessResponse, writer?: _m0.Writer): _m0.Writer;
202
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgSetTxToProcessResponse;
203
+ fromJSON(object: any): MsgSetTxToProcessResponse;
204
+ toJSON(message: MsgSetTxToProcessResponse): unknown;
205
+ fromPartial<I extends {
206
+ code?: string | undefined;
207
+ msg?: string | undefined;
208
+ } & {
209
+ code?: string | undefined;
210
+ msg?: string | undefined;
211
+ } & { [K in Exclude<keyof I, keyof MsgSetTxToProcessResponse>]: never; }>(object: I): MsgSetTxToProcessResponse;
212
+ };
213
+ export declare const MsgFinalizeSwapTransaction: {
214
+ encode(message: MsgFinalizeSwapTransaction, writer?: _m0.Writer): _m0.Writer;
215
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgFinalizeSwapTransaction;
216
+ fromJSON(object: any): MsgFinalizeSwapTransaction;
217
+ toJSON(message: MsgFinalizeSwapTransaction): unknown;
218
+ fromPartial<I extends {
219
+ creator?: string | undefined;
220
+ txId?: number | undefined;
221
+ txHash?: string | undefined;
222
+ success?: boolean | undefined;
223
+ errReason?: string | undefined;
224
+ tssMsgId?: string | undefined;
225
+ txType?: string | undefined;
226
+ payType?: string | undefined;
227
+ } & {
228
+ creator?: string | undefined;
229
+ txId?: number | undefined;
230
+ txHash?: string | undefined;
231
+ success?: boolean | undefined;
232
+ errReason?: string | undefined;
233
+ tssMsgId?: string | undefined;
234
+ txType?: string | undefined;
235
+ payType?: string | undefined;
236
+ } & { [K in Exclude<keyof I, keyof MsgFinalizeSwapTransaction>]: never; }>(object: I): MsgFinalizeSwapTransaction;
237
+ };
238
+ export declare const MsgFinalizeSwapTransactionResponse: {
239
+ encode(message: MsgFinalizeSwapTransactionResponse, writer?: _m0.Writer): _m0.Writer;
240
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgFinalizeSwapTransactionResponse;
241
+ fromJSON(object: any): MsgFinalizeSwapTransactionResponse;
242
+ toJSON(message: MsgFinalizeSwapTransactionResponse): unknown;
243
+ fromPartial<I extends {
244
+ code?: string | undefined;
245
+ msg?: string | undefined;
246
+ } & {
247
+ code?: string | undefined;
248
+ msg?: string | undefined;
249
+ } & { [K in Exclude<keyof I, keyof MsgFinalizeSwapTransactionResponse>]: never; }>(object: I): MsgFinalizeSwapTransactionResponse;
250
+ };
251
+ export declare const MsgSwapObserveVote: {
252
+ encode(message: MsgSwapObserveVote, writer?: _m0.Writer): _m0.Writer;
253
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgSwapObserveVote;
254
+ fromJSON(object: any): MsgSwapObserveVote;
255
+ toJSON(message: MsgSwapObserveVote): unknown;
256
+ fromPartial<I extends {
257
+ creator?: string | undefined;
258
+ txHash?: string | undefined;
259
+ chainId?: string | undefined;
260
+ tokenSymbol?: string | undefined;
261
+ from?: string | undefined;
262
+ to?: string | undefined;
263
+ amount?: string | undefined;
264
+ payType?: string | undefined;
265
+ kimaTxId?: number | undefined;
266
+ tssMsgId?: string | undefined;
267
+ txType?: string | undefined;
268
+ succeed?: boolean | undefined;
269
+ failReason?: string | undefined;
270
+ reserved?: string | undefined;
271
+ } & {
272
+ creator?: string | undefined;
273
+ txHash?: string | undefined;
274
+ chainId?: string | undefined;
275
+ tokenSymbol?: string | undefined;
276
+ from?: string | undefined;
277
+ to?: string | undefined;
278
+ amount?: string | undefined;
279
+ payType?: string | undefined;
280
+ kimaTxId?: number | undefined;
281
+ tssMsgId?: string | undefined;
282
+ txType?: string | undefined;
283
+ succeed?: boolean | undefined;
284
+ failReason?: string | undefined;
285
+ reserved?: string | undefined;
286
+ } & { [K in Exclude<keyof I, keyof MsgSwapObserveVote>]: never; }>(object: I): MsgSwapObserveVote;
287
+ };
288
+ export declare const MsgSwapObserveVoteResponse: {
289
+ encode(message: MsgSwapObserveVoteResponse, writer?: _m0.Writer): _m0.Writer;
290
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgSwapObserveVoteResponse;
291
+ fromJSON(object: any): MsgSwapObserveVoteResponse;
292
+ toJSON(message: MsgSwapObserveVoteResponse): unknown;
293
+ fromPartial<I extends {
294
+ code?: string | undefined;
295
+ msg?: string | undefined;
296
+ } & {
297
+ code?: string | undefined;
298
+ msg?: string | undefined;
299
+ } & { [K in Exclude<keyof I, keyof MsgSwapObserveVoteResponse>]: never; }>(object: I): MsgSwapObserveVoteResponse;
300
+ };
301
+ export declare const MsgCleanPendingSwapTransaction: {
302
+ encode(message: MsgCleanPendingSwapTransaction, writer?: _m0.Writer): _m0.Writer;
303
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgCleanPendingSwapTransaction;
304
+ fromJSON(object: any): MsgCleanPendingSwapTransaction;
305
+ toJSON(message: MsgCleanPendingSwapTransaction): unknown;
306
+ fromPartial<I extends {
307
+ creator?: string | undefined;
308
+ } & {
309
+ creator?: string | undefined;
310
+ } & { [K in Exclude<keyof I, "creator">]: never; }>(object: I): MsgCleanPendingSwapTransaction;
311
+ };
312
+ export declare const MsgCleanPendingSwapTransactionResponse: {
313
+ encode(message: MsgCleanPendingSwapTransactionResponse, writer?: _m0.Writer): _m0.Writer;
314
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgCleanPendingSwapTransactionResponse;
315
+ fromJSON(object: any): MsgCleanPendingSwapTransactionResponse;
316
+ toJSON(message: MsgCleanPendingSwapTransactionResponse): unknown;
317
+ fromPartial<I extends {
318
+ code?: string | undefined;
319
+ msg?: string | undefined;
320
+ } & {
321
+ code?: string | undefined;
322
+ msg?: string | undefined;
323
+ } & { [K in Exclude<keyof I, keyof MsgCleanPendingSwapTransactionResponse>]: never; }>(object: I): MsgCleanPendingSwapTransactionResponse;
324
+ };
325
+ export declare const MsgUpdateSwapTransactionStatus: {
326
+ encode(message: MsgUpdateSwapTransactionStatus, writer?: _m0.Writer): _m0.Writer;
327
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateSwapTransactionStatus;
328
+ fromJSON(object: any): MsgUpdateSwapTransactionStatus;
329
+ toJSON(message: MsgUpdateSwapTransactionStatus): unknown;
330
+ fromPartial<I extends {
331
+ creator?: string | undefined;
332
+ txId?: string | undefined;
333
+ status?: string | undefined;
334
+ reason?: string | undefined;
335
+ } & {
336
+ creator?: string | undefined;
337
+ txId?: string | undefined;
338
+ status?: string | undefined;
339
+ reason?: string | undefined;
340
+ } & { [K in Exclude<keyof I, keyof MsgUpdateSwapTransactionStatus>]: never; }>(object: I): MsgUpdateSwapTransactionStatus;
341
+ };
342
+ export declare const MsgUpdateSwapTransactionStatusResponse: {
343
+ encode(message: MsgUpdateSwapTransactionStatusResponse, writer?: _m0.Writer): _m0.Writer;
344
+ decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateSwapTransactionStatusResponse;
345
+ fromJSON(object: any): MsgUpdateSwapTransactionStatusResponse;
346
+ toJSON(message: MsgUpdateSwapTransactionStatusResponse): unknown;
347
+ fromPartial<I extends {
348
+ code?: string | undefined;
349
+ msg?: string | undefined;
350
+ } & {
351
+ code?: string | undefined;
352
+ msg?: string | undefined;
353
+ } & { [K in Exclude<keyof I, keyof MsgUpdateSwapTransactionStatusResponse>]: never; }>(object: I): MsgUpdateSwapTransactionStatusResponse;
354
+ };
355
+ /** Msg defines the Msg service. */
356
+ export interface Msg {
357
+ RequestSwapTransaction(request: MsgRequestSwapTransaction): Promise<MsgRequestSwapTransactionResponse>;
358
+ SetTxToProcess(request: MsgSetTxToProcess): Promise<MsgSetTxToProcessResponse>;
359
+ FinalizeSwapTransaction(request: MsgFinalizeSwapTransaction): Promise<MsgFinalizeSwapTransactionResponse>;
360
+ SwapObserveVote(request: MsgSwapObserveVote): Promise<MsgSwapObserveVoteResponse>;
361
+ CleanPendingSwapTransaction(request: MsgCleanPendingSwapTransaction): Promise<MsgCleanPendingSwapTransactionResponse>;
362
+ UpdateSwapTransactionStatus(request: MsgUpdateSwapTransactionStatus): Promise<MsgUpdateSwapTransactionStatusResponse>;
363
+ }
364
+ export declare class MsgClientImpl implements Msg {
365
+ private readonly rpc;
366
+ constructor(rpc: Rpc);
367
+ RequestSwapTransaction(request: MsgRequestSwapTransaction): Promise<MsgRequestSwapTransactionResponse>;
368
+ SetTxToProcess(request: MsgSetTxToProcess): Promise<MsgSetTxToProcessResponse>;
369
+ FinalizeSwapTransaction(request: MsgFinalizeSwapTransaction): Promise<MsgFinalizeSwapTransactionResponse>;
370
+ SwapObserveVote(request: MsgSwapObserveVote): Promise<MsgSwapObserveVoteResponse>;
371
+ CleanPendingSwapTransaction(request: MsgCleanPendingSwapTransaction): Promise<MsgCleanPendingSwapTransactionResponse>;
372
+ UpdateSwapTransactionStatus(request: MsgUpdateSwapTransactionStatus): Promise<MsgUpdateSwapTransactionStatusResponse>;
373
+ }
374
+ interface Rpc {
375
+ request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
376
+ }
377
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
378
+ export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
379
+ [K in keyof T]?: DeepPartial<T[K]>;
380
+ } : Partial<T>;
381
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
382
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
383
+ [K in keyof P]: Exact<P[K], I[K]>;
384
+ } & {
385
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
386
+ };
387
+ export {};