@kimafinance/kima-transaction-api 1.0.0 → 1.0.2
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/README.md +13 -9
- package/build/index.d.ts +15 -3
- package/build/index.js +36 -4
- package/build/kima/common.d.ts +4 -5
- package/build/kima/common.js +10 -24
- package/build/kima/tx.d.ts +325 -20
- package/build/kima/tx.js +2457 -313
- package/package.json +1 -1
- package/src/index.ts +42 -4
- package/src/kima/common.ts +24 -44
- package/src/kima/tx.ts +3588 -1096
package/README.md
CHANGED
|
@@ -13,13 +13,14 @@ yarn add @kimafinance/kima-transaction-api
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
|
-
import { submitKimaTransaction } from '@kimafinance/kima-transaction-backend'
|
|
16
|
+
import { submitKimaTransaction, SupportNetworks, CurrencyOptions } from '@kimafinance/kima-transaction-backend'
|
|
17
17
|
|
|
18
18
|
const txResult = await submitKimaTransaction({
|
|
19
19
|
originAddress: "0x1234123412341234123412341234123412341234",
|
|
20
|
-
originChain:
|
|
20
|
+
originChain: SupportNetworks.Ethereum,
|
|
21
21
|
targetAddress: "0x1234123412341234123412341234123412341234",
|
|
22
|
-
targetChain:
|
|
22
|
+
targetChain: SupportNetworks.Polygon,
|
|
23
|
+
symbol: CurrencyOptions.USDT,
|
|
23
24
|
amount: 100,
|
|
24
25
|
fee: 0.3
|
|
25
26
|
})
|
|
@@ -31,13 +32,16 @@ const txResult = await submitKimaTransaction({
|
|
|
31
32
|
|
|
32
33
|
`submitKimaTransaction` : Submit a transaction to transfer liquidity from one change to another.
|
|
33
34
|
|
|
34
|
-
- `originAddress
|
|
35
|
-
- `originChain
|
|
36
|
-
- `targetAddress
|
|
37
|
-
- `targetChain
|
|
38
|
-
- `
|
|
39
|
-
- `
|
|
35
|
+
- `originAddress`: sending address
|
|
36
|
+
- `originChain`: sending chain
|
|
37
|
+
- `targetAddress`: receiving address
|
|
38
|
+
- `targetChain`: receiving chain
|
|
39
|
+
- `symbol`: token symbol
|
|
40
|
+
- `amount`: amount of token to transfer
|
|
41
|
+
- `fee`: amount of token that kima consumes to pay gas fee for pulling & releasing token transactions
|
|
40
42
|
|
|
41
43
|
## Environment Variables
|
|
42
44
|
|
|
43
45
|
`KIMA_BACKEND_MNEMONIC` : Seed phrase of developer wallet. This wallet must have KIMA token to submit a transaction to kima chain.
|
|
46
|
+
|
|
47
|
+
`KIMA_BACKEND_NODE_PROVIDER` : Node provider for kima chain
|
package/build/index.d.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
+
export declare enum SupportNetworks {
|
|
2
|
+
Ethereum = "ETH",
|
|
3
|
+
Polygon = "POL",
|
|
4
|
+
Avalanche = "AVX",
|
|
5
|
+
Solana = "SOL"
|
|
6
|
+
}
|
|
7
|
+
export declare enum CurrencyOptions {
|
|
8
|
+
USDK = "USDK",
|
|
9
|
+
USDT = "USDT",
|
|
10
|
+
USDC = "USDC"
|
|
11
|
+
}
|
|
1
12
|
interface Props {
|
|
2
|
-
originChain:
|
|
13
|
+
originChain: SupportNetworks;
|
|
3
14
|
originAddress: string;
|
|
4
|
-
targetChain:
|
|
15
|
+
targetChain: SupportNetworks;
|
|
5
16
|
targetAddress: string;
|
|
17
|
+
symbol: CurrencyOptions;
|
|
6
18
|
amount: number;
|
|
7
19
|
fee: number;
|
|
8
20
|
}
|
|
9
|
-
export declare function submitKimaTransaction({ originChain, originAddress, targetChain, targetAddress, amount, fee, }: Props): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
21
|
+
export declare function submitKimaTransaction({ originChain, originAddress, targetChain, targetAddress, symbol, amount, fee, }: Props): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
10
22
|
export {};
|
package/build/index.js
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.submitKimaTransaction = void 0;
|
|
3
|
+
exports.submitKimaTransaction = exports.CurrencyOptions = exports.SupportNetworks = void 0;
|
|
4
4
|
const proto_signing_1 = require("@cosmjs/proto-signing");
|
|
5
5
|
const common_1 = require("./kima/common");
|
|
6
|
-
|
|
6
|
+
var SupportNetworks;
|
|
7
|
+
(function (SupportNetworks) {
|
|
8
|
+
SupportNetworks["Ethereum"] = "ETH";
|
|
9
|
+
SupportNetworks["Polygon"] = "POL";
|
|
10
|
+
SupportNetworks["Avalanche"] = "AVX";
|
|
11
|
+
SupportNetworks["Solana"] = "SOL";
|
|
12
|
+
})(SupportNetworks = exports.SupportNetworks || (exports.SupportNetworks = {}));
|
|
13
|
+
var CurrencyOptions;
|
|
14
|
+
(function (CurrencyOptions) {
|
|
15
|
+
CurrencyOptions["USDK"] = "USDK";
|
|
16
|
+
CurrencyOptions["USDT"] = "USDT";
|
|
17
|
+
CurrencyOptions["USDC"] = "USDC";
|
|
18
|
+
})(CurrencyOptions = exports.CurrencyOptions || (exports.CurrencyOptions = {}));
|
|
19
|
+
async function submitKimaTransaction({ originChain, originAddress, targetChain, targetAddress, symbol, amount, fee, }) {
|
|
7
20
|
const wallet = await proto_signing_1.DirectSecp256k1HdWallet.fromMnemonic(process.env.KIMA_BACKEND_MNEMONIC, { prefix: "kima" });
|
|
8
21
|
const client = await (0, common_1.TxClient)(wallet);
|
|
9
22
|
const [firstAccount] = await wallet.getAccounts();
|
|
@@ -13,10 +26,29 @@ async function submitKimaTransaction({ originChain, originAddress, targetChain,
|
|
|
13
26
|
originAddress,
|
|
14
27
|
targetChain,
|
|
15
28
|
targetAddress,
|
|
29
|
+
symbol,
|
|
16
30
|
amount: amount.toString(),
|
|
17
31
|
fee: fee.toString(),
|
|
18
32
|
};
|
|
19
|
-
|
|
20
|
-
|
|
33
|
+
let msg = await client.msgRequestTransaction(params);
|
|
34
|
+
const result = await client.signAndBroadcast([msg]);
|
|
35
|
+
let txId = "1";
|
|
36
|
+
for (const event of result.events) {
|
|
37
|
+
if (event.type === "transaction_requested") {
|
|
38
|
+
for (const attr of event.attributes) {
|
|
39
|
+
if (attr.key === "txId") {
|
|
40
|
+
txId = attr.value;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
msg = await client.msgSetTxHash({
|
|
46
|
+
creator: firstAccount.address,
|
|
47
|
+
txId,
|
|
48
|
+
txHash: result.transactionHash,
|
|
49
|
+
});
|
|
50
|
+
const temp = await client.signAndBroadcast([msg]);
|
|
51
|
+
console.log(temp);
|
|
52
|
+
return result;
|
|
21
53
|
}
|
|
22
54
|
exports.submitKimaTransaction = submitKimaTransaction;
|
package/build/kima/common.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StdFee } from
|
|
2
|
-
import { Registry, OfflineSigner, EncodeObject } from
|
|
3
|
-
import { MsgRequestTransaction,
|
|
1
|
+
import { StdFee } from "@cosmjs/stargate";
|
|
2
|
+
import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing";
|
|
3
|
+
import { MsgRequestTransaction, MsgSetTxHash } from "./tx";
|
|
4
4
|
interface SignAndBroadcastOptions {
|
|
5
5
|
fee: StdFee;
|
|
6
6
|
memo?: string;
|
|
@@ -9,7 +9,6 @@ export declare const registry: Registry;
|
|
|
9
9
|
export declare const TxClient: (wallet: OfflineSigner) => Promise<{
|
|
10
10
|
signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
11
11
|
msgRequestTransaction: (data: MsgRequestTransaction) => EncodeObject;
|
|
12
|
-
|
|
13
|
-
msgFetchBalance: (data: MsgFetchBalance) => EncodeObject;
|
|
12
|
+
msgSetTxHash: (data: MsgSetTxHash) => EncodeObject;
|
|
14
13
|
}>;
|
|
15
14
|
export {};
|
package/build/kima/common.js
CHANGED
|
@@ -11,40 +11,26 @@ const tx_1 = require("./tx");
|
|
|
11
11
|
dotenv_1.default.config();
|
|
12
12
|
const defaultFee = {
|
|
13
13
|
amount: [],
|
|
14
|
-
gas:
|
|
14
|
+
gas: "200000",
|
|
15
15
|
};
|
|
16
16
|
const types = [
|
|
17
|
-
[
|
|
18
|
-
|
|
19
|
-
tx_1.MsgRequestTransaction
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
'/DiversifiTechnologies.diversifi.diversifi.MsgApproveTransaction',
|
|
23
|
-
tx_1.MsgApproveTransaction
|
|
24
|
-
],
|
|
25
|
-
[
|
|
26
|
-
'/DiversifiTechnologies.diversifi.diversifi.MsgFetchBalance',
|
|
27
|
-
tx_1.MsgFetchBalance
|
|
28
|
-
]
|
|
17
|
+
["/KimaFinance.kima.kima.MsgRequestTransaction", tx_1.MsgRequestTransaction],
|
|
18
|
+
["/KimaFinance.kima.kima.MsgSetTxHash", tx_1.MsgSetTxHash],
|
|
29
19
|
];
|
|
30
20
|
exports.registry = new proto_signing_1.Registry(types);
|
|
31
21
|
const TxClient = async (wallet) => {
|
|
32
|
-
const client = await stargate_1.SigningStargateClient.connectWithSigner(
|
|
22
|
+
const client = await stargate_1.SigningStargateClient.connectWithSigner(process.env.KIMA_BACKEND_NODE_PROVIDER, wallet, { registry: exports.registry });
|
|
33
23
|
const { address } = (await wallet.getAccounts())[0];
|
|
34
24
|
return {
|
|
35
|
-
signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo:
|
|
25
|
+
signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo),
|
|
36
26
|
msgRequestTransaction: (data) => ({
|
|
37
|
-
typeUrl:
|
|
38
|
-
value: tx_1.MsgRequestTransaction.fromPartial(data)
|
|
27
|
+
typeUrl: "/KimaFinance.kima.kima.MsgRequestTransaction",
|
|
28
|
+
value: tx_1.MsgRequestTransaction.fromPartial(data),
|
|
39
29
|
}),
|
|
40
|
-
|
|
41
|
-
typeUrl:
|
|
42
|
-
value: tx_1.
|
|
30
|
+
msgSetTxHash: (data) => ({
|
|
31
|
+
typeUrl: "/KimaFinance.kima.kima.MsgSetTxHash",
|
|
32
|
+
value: tx_1.MsgSetTxHash.fromPartial(data),
|
|
43
33
|
}),
|
|
44
|
-
msgFetchBalance: (data) => ({
|
|
45
|
-
typeUrl: '/DiversifiTechnologies.diversifi.diversifi.MsgFetchBalance',
|
|
46
|
-
value: tx_1.MsgFetchBalance.fromPartial(data)
|
|
47
|
-
})
|
|
48
34
|
};
|
|
49
35
|
};
|
|
50
36
|
exports.TxClient = TxClient;
|
package/build/kima/tx.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { Reader, Writer } from
|
|
2
|
-
export declare const protobufPackage = "
|
|
1
|
+
import { Reader, Writer } from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "KimaFinance.kima.kima";
|
|
3
3
|
export interface MsgRequestTransaction {
|
|
4
4
|
creator: string;
|
|
5
5
|
originChain: string;
|
|
6
6
|
originAddress: string;
|
|
7
7
|
targetChain: string;
|
|
8
8
|
targetAddress: string;
|
|
9
|
+
symbol: string;
|
|
9
10
|
amount: string;
|
|
10
11
|
fee: string;
|
|
11
12
|
}
|
|
12
13
|
export interface MsgRequestTransactionResponse {
|
|
13
14
|
code: string;
|
|
14
15
|
msg: string;
|
|
16
|
+
txId: string;
|
|
15
17
|
}
|
|
16
18
|
export interface MsgApproveTransaction {
|
|
17
19
|
creator: string;
|
|
18
|
-
|
|
20
|
+
txCHash: string;
|
|
21
|
+
txTHash: string;
|
|
19
22
|
success: string;
|
|
20
23
|
signedKey: string;
|
|
21
24
|
}
|
|
@@ -37,6 +40,7 @@ export interface MsgObservationVote {
|
|
|
37
40
|
from: string;
|
|
38
41
|
to: string;
|
|
39
42
|
amount: string;
|
|
43
|
+
payType: string;
|
|
40
44
|
}
|
|
41
45
|
export interface MsgObservationVoteResponse {
|
|
42
46
|
code: string;
|
|
@@ -67,6 +71,8 @@ export interface MsgUpdateGasFee {
|
|
|
67
71
|
fee: string;
|
|
68
72
|
}
|
|
69
73
|
export interface MsgUpdateGasFeeResponse {
|
|
74
|
+
code: string;
|
|
75
|
+
msg: string;
|
|
70
76
|
}
|
|
71
77
|
export interface MsgProvisionTransaction {
|
|
72
78
|
creator: string;
|
|
@@ -78,6 +84,8 @@ export interface MsgProvisionTransaction {
|
|
|
78
84
|
options: string;
|
|
79
85
|
}
|
|
80
86
|
export interface MsgProvisionTransactionResponse {
|
|
87
|
+
code: string;
|
|
88
|
+
msg: string;
|
|
81
89
|
}
|
|
82
90
|
export interface MsgDrainTransaction {
|
|
83
91
|
creator: string;
|
|
@@ -89,12 +97,117 @@ export interface MsgDrainTransaction {
|
|
|
89
97
|
options: string;
|
|
90
98
|
}
|
|
91
99
|
export interface MsgDrainTransactionResponse {
|
|
100
|
+
code: string;
|
|
101
|
+
msg: string;
|
|
92
102
|
}
|
|
93
103
|
export interface MsgCancelTransaction {
|
|
94
104
|
creator: string;
|
|
95
105
|
transactionId: string;
|
|
96
106
|
}
|
|
97
107
|
export interface MsgCancelTransactionResponse {
|
|
108
|
+
code: string;
|
|
109
|
+
msg: string;
|
|
110
|
+
}
|
|
111
|
+
export interface MsgAddWhitelisted {
|
|
112
|
+
creator: string;
|
|
113
|
+
address: string;
|
|
114
|
+
}
|
|
115
|
+
export interface MsgAddWhitelistedResponse {
|
|
116
|
+
code: string;
|
|
117
|
+
msg: string;
|
|
118
|
+
}
|
|
119
|
+
export interface MsgSetAdmin {
|
|
120
|
+
creator: string;
|
|
121
|
+
}
|
|
122
|
+
export interface MsgSetAdminResponse {
|
|
123
|
+
code: string;
|
|
124
|
+
msg: string;
|
|
125
|
+
}
|
|
126
|
+
export interface MsgAddPubkey {
|
|
127
|
+
creator: string;
|
|
128
|
+
pubkey: string;
|
|
129
|
+
}
|
|
130
|
+
export interface MsgAddPubkeyResponse {
|
|
131
|
+
code: string;
|
|
132
|
+
msg: string;
|
|
133
|
+
}
|
|
134
|
+
export interface MsgUpdateTssPubkey {
|
|
135
|
+
creator: string;
|
|
136
|
+
tssPubkey: string;
|
|
137
|
+
ecdsa: string;
|
|
138
|
+
ebdsa: string;
|
|
139
|
+
reserved: string;
|
|
140
|
+
}
|
|
141
|
+
export interface MsgUpdateTssPubkeyResponse {
|
|
142
|
+
code: string;
|
|
143
|
+
msg: string;
|
|
144
|
+
}
|
|
145
|
+
export interface MsgRemoveWhitelisted {
|
|
146
|
+
creator: string;
|
|
147
|
+
address: string;
|
|
148
|
+
}
|
|
149
|
+
export interface MsgRemoveWhitelistedResponse {
|
|
150
|
+
code: string;
|
|
151
|
+
msg: string;
|
|
152
|
+
}
|
|
153
|
+
export interface MsgClearTssInfo {
|
|
154
|
+
creator: string;
|
|
155
|
+
}
|
|
156
|
+
export interface MsgClearTssInfoResponse {
|
|
157
|
+
code: string;
|
|
158
|
+
msg: string;
|
|
159
|
+
}
|
|
160
|
+
export interface MsgAddChain {
|
|
161
|
+
creator: string;
|
|
162
|
+
name: string;
|
|
163
|
+
symbol: string;
|
|
164
|
+
tokens: string[];
|
|
165
|
+
}
|
|
166
|
+
export interface MsgAddChainResponse {
|
|
167
|
+
code: string;
|
|
168
|
+
msg: string;
|
|
169
|
+
}
|
|
170
|
+
export interface MsgUpdateTssHash {
|
|
171
|
+
creator: string;
|
|
172
|
+
txId: string;
|
|
173
|
+
tssPullHash: string;
|
|
174
|
+
}
|
|
175
|
+
export interface MsgUpdateTssHashResponse {
|
|
176
|
+
code: string;
|
|
177
|
+
msg: string;
|
|
178
|
+
}
|
|
179
|
+
export interface MsgUpdateChainStatus {
|
|
180
|
+
creator: string;
|
|
181
|
+
chainSymbol: string;
|
|
182
|
+
disabled: boolean;
|
|
183
|
+
}
|
|
184
|
+
export interface MsgUpdateChainStatusResponse {
|
|
185
|
+
code: string;
|
|
186
|
+
msg: string;
|
|
187
|
+
}
|
|
188
|
+
export interface MsgAddToken {
|
|
189
|
+
creator: string;
|
|
190
|
+
chainSymbol: string;
|
|
191
|
+
tokenSymbol: string;
|
|
192
|
+
}
|
|
193
|
+
export interface MsgAddTokenResponse {
|
|
194
|
+
code: string;
|
|
195
|
+
msg: string;
|
|
196
|
+
}
|
|
197
|
+
export interface MsgUpdateTssStatus {
|
|
198
|
+
creator: string;
|
|
199
|
+
status: string;
|
|
200
|
+
}
|
|
201
|
+
export interface MsgUpdateTssStatusResponse {
|
|
202
|
+
}
|
|
203
|
+
export interface MsgSetTxHash {
|
|
204
|
+
creator: string;
|
|
205
|
+
txId: string;
|
|
206
|
+
txHash: string;
|
|
207
|
+
}
|
|
208
|
+
export interface MsgSetTxHashResponse {
|
|
209
|
+
code: string;
|
|
210
|
+
msg: string;
|
|
98
211
|
}
|
|
99
212
|
export declare const MsgRequestTransaction: {
|
|
100
213
|
encode(message: MsgRequestTransaction, writer?: Writer): Writer;
|
|
@@ -188,11 +301,11 @@ export declare const MsgUpdateGasFee: {
|
|
|
188
301
|
fromPartial(object: DeepPartial<MsgUpdateGasFee>): MsgUpdateGasFee;
|
|
189
302
|
};
|
|
190
303
|
export declare const MsgUpdateGasFeeResponse: {
|
|
191
|
-
encode(
|
|
304
|
+
encode(message: MsgUpdateGasFeeResponse, writer?: Writer): Writer;
|
|
192
305
|
decode(input: Reader | Uint8Array, length?: number): MsgUpdateGasFeeResponse;
|
|
193
|
-
fromJSON(
|
|
194
|
-
toJSON(
|
|
195
|
-
fromPartial(
|
|
306
|
+
fromJSON(object: any): MsgUpdateGasFeeResponse;
|
|
307
|
+
toJSON(message: MsgUpdateGasFeeResponse): unknown;
|
|
308
|
+
fromPartial(object: DeepPartial<MsgUpdateGasFeeResponse>): MsgUpdateGasFeeResponse;
|
|
196
309
|
};
|
|
197
310
|
export declare const MsgProvisionTransaction: {
|
|
198
311
|
encode(message: MsgProvisionTransaction, writer?: Writer): Writer;
|
|
@@ -202,11 +315,11 @@ export declare const MsgProvisionTransaction: {
|
|
|
202
315
|
fromPartial(object: DeepPartial<MsgProvisionTransaction>): MsgProvisionTransaction;
|
|
203
316
|
};
|
|
204
317
|
export declare const MsgProvisionTransactionResponse: {
|
|
205
|
-
encode(
|
|
318
|
+
encode(message: MsgProvisionTransactionResponse, writer?: Writer): Writer;
|
|
206
319
|
decode(input: Reader | Uint8Array, length?: number): MsgProvisionTransactionResponse;
|
|
207
|
-
fromJSON(
|
|
208
|
-
toJSON(
|
|
209
|
-
fromPartial(
|
|
320
|
+
fromJSON(object: any): MsgProvisionTransactionResponse;
|
|
321
|
+
toJSON(message: MsgProvisionTransactionResponse): unknown;
|
|
322
|
+
fromPartial(object: DeepPartial<MsgProvisionTransactionResponse>): MsgProvisionTransactionResponse;
|
|
210
323
|
};
|
|
211
324
|
export declare const MsgDrainTransaction: {
|
|
212
325
|
encode(message: MsgDrainTransaction, writer?: Writer): Writer;
|
|
@@ -216,11 +329,11 @@ export declare const MsgDrainTransaction: {
|
|
|
216
329
|
fromPartial(object: DeepPartial<MsgDrainTransaction>): MsgDrainTransaction;
|
|
217
330
|
};
|
|
218
331
|
export declare const MsgDrainTransactionResponse: {
|
|
219
|
-
encode(
|
|
332
|
+
encode(message: MsgDrainTransactionResponse, writer?: Writer): Writer;
|
|
220
333
|
decode(input: Reader | Uint8Array, length?: number): MsgDrainTransactionResponse;
|
|
221
|
-
fromJSON(
|
|
222
|
-
toJSON(
|
|
223
|
-
fromPartial(
|
|
334
|
+
fromJSON(object: any): MsgDrainTransactionResponse;
|
|
335
|
+
toJSON(message: MsgDrainTransactionResponse): unknown;
|
|
336
|
+
fromPartial(object: DeepPartial<MsgDrainTransactionResponse>): MsgDrainTransactionResponse;
|
|
224
337
|
};
|
|
225
338
|
export declare const MsgCancelTransaction: {
|
|
226
339
|
encode(message: MsgCancelTransaction, writer?: Writer): Writer;
|
|
@@ -230,11 +343,179 @@ export declare const MsgCancelTransaction: {
|
|
|
230
343
|
fromPartial(object: DeepPartial<MsgCancelTransaction>): MsgCancelTransaction;
|
|
231
344
|
};
|
|
232
345
|
export declare const MsgCancelTransactionResponse: {
|
|
233
|
-
encode(
|
|
346
|
+
encode(message: MsgCancelTransactionResponse, writer?: Writer): Writer;
|
|
234
347
|
decode(input: Reader | Uint8Array, length?: number): MsgCancelTransactionResponse;
|
|
235
|
-
fromJSON(
|
|
236
|
-
toJSON(
|
|
237
|
-
fromPartial(
|
|
348
|
+
fromJSON(object: any): MsgCancelTransactionResponse;
|
|
349
|
+
toJSON(message: MsgCancelTransactionResponse): unknown;
|
|
350
|
+
fromPartial(object: DeepPartial<MsgCancelTransactionResponse>): MsgCancelTransactionResponse;
|
|
351
|
+
};
|
|
352
|
+
export declare const MsgAddWhitelisted: {
|
|
353
|
+
encode(message: MsgAddWhitelisted, writer?: Writer): Writer;
|
|
354
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddWhitelisted;
|
|
355
|
+
fromJSON(object: any): MsgAddWhitelisted;
|
|
356
|
+
toJSON(message: MsgAddWhitelisted): unknown;
|
|
357
|
+
fromPartial(object: DeepPartial<MsgAddWhitelisted>): MsgAddWhitelisted;
|
|
358
|
+
};
|
|
359
|
+
export declare const MsgAddWhitelistedResponse: {
|
|
360
|
+
encode(message: MsgAddWhitelistedResponse, writer?: Writer): Writer;
|
|
361
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddWhitelistedResponse;
|
|
362
|
+
fromJSON(object: any): MsgAddWhitelistedResponse;
|
|
363
|
+
toJSON(message: MsgAddWhitelistedResponse): unknown;
|
|
364
|
+
fromPartial(object: DeepPartial<MsgAddWhitelistedResponse>): MsgAddWhitelistedResponse;
|
|
365
|
+
};
|
|
366
|
+
export declare const MsgSetAdmin: {
|
|
367
|
+
encode(message: MsgSetAdmin, writer?: Writer): Writer;
|
|
368
|
+
decode(input: Reader | Uint8Array, length?: number): MsgSetAdmin;
|
|
369
|
+
fromJSON(object: any): MsgSetAdmin;
|
|
370
|
+
toJSON(message: MsgSetAdmin): unknown;
|
|
371
|
+
fromPartial(object: DeepPartial<MsgSetAdmin>): MsgSetAdmin;
|
|
372
|
+
};
|
|
373
|
+
export declare const MsgSetAdminResponse: {
|
|
374
|
+
encode(message: MsgSetAdminResponse, writer?: Writer): Writer;
|
|
375
|
+
decode(input: Reader | Uint8Array, length?: number): MsgSetAdminResponse;
|
|
376
|
+
fromJSON(object: any): MsgSetAdminResponse;
|
|
377
|
+
toJSON(message: MsgSetAdminResponse): unknown;
|
|
378
|
+
fromPartial(object: DeepPartial<MsgSetAdminResponse>): MsgSetAdminResponse;
|
|
379
|
+
};
|
|
380
|
+
export declare const MsgAddPubkey: {
|
|
381
|
+
encode(message: MsgAddPubkey, writer?: Writer): Writer;
|
|
382
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddPubkey;
|
|
383
|
+
fromJSON(object: any): MsgAddPubkey;
|
|
384
|
+
toJSON(message: MsgAddPubkey): unknown;
|
|
385
|
+
fromPartial(object: DeepPartial<MsgAddPubkey>): MsgAddPubkey;
|
|
386
|
+
};
|
|
387
|
+
export declare const MsgAddPubkeyResponse: {
|
|
388
|
+
encode(message: MsgAddPubkeyResponse, writer?: Writer): Writer;
|
|
389
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddPubkeyResponse;
|
|
390
|
+
fromJSON(object: any): MsgAddPubkeyResponse;
|
|
391
|
+
toJSON(message: MsgAddPubkeyResponse): unknown;
|
|
392
|
+
fromPartial(object: DeepPartial<MsgAddPubkeyResponse>): MsgAddPubkeyResponse;
|
|
393
|
+
};
|
|
394
|
+
export declare const MsgUpdateTssPubkey: {
|
|
395
|
+
encode(message: MsgUpdateTssPubkey, writer?: Writer): Writer;
|
|
396
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateTssPubkey;
|
|
397
|
+
fromJSON(object: any): MsgUpdateTssPubkey;
|
|
398
|
+
toJSON(message: MsgUpdateTssPubkey): unknown;
|
|
399
|
+
fromPartial(object: DeepPartial<MsgUpdateTssPubkey>): MsgUpdateTssPubkey;
|
|
400
|
+
};
|
|
401
|
+
export declare const MsgUpdateTssPubkeyResponse: {
|
|
402
|
+
encode(message: MsgUpdateTssPubkeyResponse, writer?: Writer): Writer;
|
|
403
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateTssPubkeyResponse;
|
|
404
|
+
fromJSON(object: any): MsgUpdateTssPubkeyResponse;
|
|
405
|
+
toJSON(message: MsgUpdateTssPubkeyResponse): unknown;
|
|
406
|
+
fromPartial(object: DeepPartial<MsgUpdateTssPubkeyResponse>): MsgUpdateTssPubkeyResponse;
|
|
407
|
+
};
|
|
408
|
+
export declare const MsgRemoveWhitelisted: {
|
|
409
|
+
encode(message: MsgRemoveWhitelisted, writer?: Writer): Writer;
|
|
410
|
+
decode(input: Reader | Uint8Array, length?: number): MsgRemoveWhitelisted;
|
|
411
|
+
fromJSON(object: any): MsgRemoveWhitelisted;
|
|
412
|
+
toJSON(message: MsgRemoveWhitelisted): unknown;
|
|
413
|
+
fromPartial(object: DeepPartial<MsgRemoveWhitelisted>): MsgRemoveWhitelisted;
|
|
414
|
+
};
|
|
415
|
+
export declare const MsgRemoveWhitelistedResponse: {
|
|
416
|
+
encode(message: MsgRemoveWhitelistedResponse, writer?: Writer): Writer;
|
|
417
|
+
decode(input: Reader | Uint8Array, length?: number): MsgRemoveWhitelistedResponse;
|
|
418
|
+
fromJSON(object: any): MsgRemoveWhitelistedResponse;
|
|
419
|
+
toJSON(message: MsgRemoveWhitelistedResponse): unknown;
|
|
420
|
+
fromPartial(object: DeepPartial<MsgRemoveWhitelistedResponse>): MsgRemoveWhitelistedResponse;
|
|
421
|
+
};
|
|
422
|
+
export declare const MsgClearTssInfo: {
|
|
423
|
+
encode(message: MsgClearTssInfo, writer?: Writer): Writer;
|
|
424
|
+
decode(input: Reader | Uint8Array, length?: number): MsgClearTssInfo;
|
|
425
|
+
fromJSON(object: any): MsgClearTssInfo;
|
|
426
|
+
toJSON(message: MsgClearTssInfo): unknown;
|
|
427
|
+
fromPartial(object: DeepPartial<MsgClearTssInfo>): MsgClearTssInfo;
|
|
428
|
+
};
|
|
429
|
+
export declare const MsgClearTssInfoResponse: {
|
|
430
|
+
encode(message: MsgClearTssInfoResponse, writer?: Writer): Writer;
|
|
431
|
+
decode(input: Reader | Uint8Array, length?: number): MsgClearTssInfoResponse;
|
|
432
|
+
fromJSON(object: any): MsgClearTssInfoResponse;
|
|
433
|
+
toJSON(message: MsgClearTssInfoResponse): unknown;
|
|
434
|
+
fromPartial(object: DeepPartial<MsgClearTssInfoResponse>): MsgClearTssInfoResponse;
|
|
435
|
+
};
|
|
436
|
+
export declare const MsgAddChain: {
|
|
437
|
+
encode(message: MsgAddChain, writer?: Writer): Writer;
|
|
438
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddChain;
|
|
439
|
+
fromJSON(object: any): MsgAddChain;
|
|
440
|
+
toJSON(message: MsgAddChain): unknown;
|
|
441
|
+
fromPartial(object: DeepPartial<MsgAddChain>): MsgAddChain;
|
|
442
|
+
};
|
|
443
|
+
export declare const MsgAddChainResponse: {
|
|
444
|
+
encode(message: MsgAddChainResponse, writer?: Writer): Writer;
|
|
445
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddChainResponse;
|
|
446
|
+
fromJSON(object: any): MsgAddChainResponse;
|
|
447
|
+
toJSON(message: MsgAddChainResponse): unknown;
|
|
448
|
+
fromPartial(object: DeepPartial<MsgAddChainResponse>): MsgAddChainResponse;
|
|
449
|
+
};
|
|
450
|
+
export declare const MsgUpdateTssHash: {
|
|
451
|
+
encode(message: MsgUpdateTssHash, writer?: Writer): Writer;
|
|
452
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateTssHash;
|
|
453
|
+
fromJSON(object: any): MsgUpdateTssHash;
|
|
454
|
+
toJSON(message: MsgUpdateTssHash): unknown;
|
|
455
|
+
fromPartial(object: DeepPartial<MsgUpdateTssHash>): MsgUpdateTssHash;
|
|
456
|
+
};
|
|
457
|
+
export declare const MsgUpdateTssHashResponse: {
|
|
458
|
+
encode(message: MsgUpdateTssHashResponse, writer?: Writer): Writer;
|
|
459
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateTssHashResponse;
|
|
460
|
+
fromJSON(object: any): MsgUpdateTssHashResponse;
|
|
461
|
+
toJSON(message: MsgUpdateTssHashResponse): unknown;
|
|
462
|
+
fromPartial(object: DeepPartial<MsgUpdateTssHashResponse>): MsgUpdateTssHashResponse;
|
|
463
|
+
};
|
|
464
|
+
export declare const MsgUpdateChainStatus: {
|
|
465
|
+
encode(message: MsgUpdateChainStatus, writer?: Writer): Writer;
|
|
466
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateChainStatus;
|
|
467
|
+
fromJSON(object: any): MsgUpdateChainStatus;
|
|
468
|
+
toJSON(message: MsgUpdateChainStatus): unknown;
|
|
469
|
+
fromPartial(object: DeepPartial<MsgUpdateChainStatus>): MsgUpdateChainStatus;
|
|
470
|
+
};
|
|
471
|
+
export declare const MsgUpdateChainStatusResponse: {
|
|
472
|
+
encode(message: MsgUpdateChainStatusResponse, writer?: Writer): Writer;
|
|
473
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateChainStatusResponse;
|
|
474
|
+
fromJSON(object: any): MsgUpdateChainStatusResponse;
|
|
475
|
+
toJSON(message: MsgUpdateChainStatusResponse): unknown;
|
|
476
|
+
fromPartial(object: DeepPartial<MsgUpdateChainStatusResponse>): MsgUpdateChainStatusResponse;
|
|
477
|
+
};
|
|
478
|
+
export declare const MsgAddToken: {
|
|
479
|
+
encode(message: MsgAddToken, writer?: Writer): Writer;
|
|
480
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddToken;
|
|
481
|
+
fromJSON(object: any): MsgAddToken;
|
|
482
|
+
toJSON(message: MsgAddToken): unknown;
|
|
483
|
+
fromPartial(object: DeepPartial<MsgAddToken>): MsgAddToken;
|
|
484
|
+
};
|
|
485
|
+
export declare const MsgAddTokenResponse: {
|
|
486
|
+
encode(message: MsgAddTokenResponse, writer?: Writer): Writer;
|
|
487
|
+
decode(input: Reader | Uint8Array, length?: number): MsgAddTokenResponse;
|
|
488
|
+
fromJSON(object: any): MsgAddTokenResponse;
|
|
489
|
+
toJSON(message: MsgAddTokenResponse): unknown;
|
|
490
|
+
fromPartial(object: DeepPartial<MsgAddTokenResponse>): MsgAddTokenResponse;
|
|
491
|
+
};
|
|
492
|
+
export declare const MsgUpdateTssStatus: {
|
|
493
|
+
encode(message: MsgUpdateTssStatus, writer?: Writer): Writer;
|
|
494
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateTssStatus;
|
|
495
|
+
fromJSON(object: any): MsgUpdateTssStatus;
|
|
496
|
+
toJSON(message: MsgUpdateTssStatus): unknown;
|
|
497
|
+
fromPartial(object: DeepPartial<MsgUpdateTssStatus>): MsgUpdateTssStatus;
|
|
498
|
+
};
|
|
499
|
+
export declare const MsgUpdateTssStatusResponse: {
|
|
500
|
+
encode(_: MsgUpdateTssStatusResponse, writer?: Writer): Writer;
|
|
501
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateTssStatusResponse;
|
|
502
|
+
fromJSON(_: any): MsgUpdateTssStatusResponse;
|
|
503
|
+
toJSON(_: MsgUpdateTssStatusResponse): unknown;
|
|
504
|
+
fromPartial(_: DeepPartial<MsgUpdateTssStatusResponse>): MsgUpdateTssStatusResponse;
|
|
505
|
+
};
|
|
506
|
+
export declare const MsgSetTxHash: {
|
|
507
|
+
encode(message: MsgSetTxHash, writer?: Writer): Writer;
|
|
508
|
+
decode(input: Reader | Uint8Array, length?: number): MsgSetTxHash;
|
|
509
|
+
fromJSON(object: any): MsgSetTxHash;
|
|
510
|
+
toJSON(message: MsgSetTxHash): unknown;
|
|
511
|
+
fromPartial(object: DeepPartial<MsgSetTxHash>): MsgSetTxHash;
|
|
512
|
+
};
|
|
513
|
+
export declare const MsgSetTxHashResponse: {
|
|
514
|
+
encode(message: MsgSetTxHashResponse, writer?: Writer): Writer;
|
|
515
|
+
decode(input: Reader | Uint8Array, length?: number): MsgSetTxHashResponse;
|
|
516
|
+
fromJSON(object: any): MsgSetTxHashResponse;
|
|
517
|
+
toJSON(message: MsgSetTxHashResponse): unknown;
|
|
518
|
+
fromPartial(object: DeepPartial<MsgSetTxHashResponse>): MsgSetTxHashResponse;
|
|
238
519
|
};
|
|
239
520
|
/** Msg defines the Msg service. */
|
|
240
521
|
export interface Msg {
|
|
@@ -247,8 +528,20 @@ export interface Msg {
|
|
|
247
528
|
UpdateGasFee(request: MsgUpdateGasFee): Promise<MsgUpdateGasFeeResponse>;
|
|
248
529
|
ProvisionTransaction(request: MsgProvisionTransaction): Promise<MsgProvisionTransactionResponse>;
|
|
249
530
|
DrainTransaction(request: MsgDrainTransaction): Promise<MsgDrainTransactionResponse>;
|
|
250
|
-
/** this line is used by starport scaffolding # proto/tx/rpc */
|
|
251
531
|
CancelTransaction(request: MsgCancelTransaction): Promise<MsgCancelTransactionResponse>;
|
|
532
|
+
AddWhitelisted(request: MsgAddWhitelisted): Promise<MsgAddWhitelistedResponse>;
|
|
533
|
+
SetAdmin(request: MsgSetAdmin): Promise<MsgSetAdminResponse>;
|
|
534
|
+
AddPubkey(request: MsgAddPubkey): Promise<MsgAddPubkeyResponse>;
|
|
535
|
+
UpdateTssPubkey(request: MsgUpdateTssPubkey): Promise<MsgUpdateTssPubkeyResponse>;
|
|
536
|
+
RemoveWhitelisted(request: MsgRemoveWhitelisted): Promise<MsgRemoveWhitelistedResponse>;
|
|
537
|
+
ClearTssInfo(request: MsgClearTssInfo): Promise<MsgClearTssInfoResponse>;
|
|
538
|
+
AddChain(request: MsgAddChain): Promise<MsgAddChainResponse>;
|
|
539
|
+
UpdateTssHash(request: MsgUpdateTssHash): Promise<MsgUpdateTssHashResponse>;
|
|
540
|
+
UpdateChainStatus(request: MsgUpdateChainStatus): Promise<MsgUpdateChainStatusResponse>;
|
|
541
|
+
AddToken(request: MsgAddToken): Promise<MsgAddTokenResponse>;
|
|
542
|
+
UpdateTssStatus(request: MsgUpdateTssStatus): Promise<MsgUpdateTssStatusResponse>;
|
|
543
|
+
/** this line is used by starport scaffolding # proto/tx/rpc */
|
|
544
|
+
SetTxHash(request: MsgSetTxHash): Promise<MsgSetTxHashResponse>;
|
|
252
545
|
}
|
|
253
546
|
export declare class MsgClientImpl implements Msg {
|
|
254
547
|
private readonly rpc;
|
|
@@ -263,6 +556,18 @@ export declare class MsgClientImpl implements Msg {
|
|
|
263
556
|
ProvisionTransaction(request: MsgProvisionTransaction): Promise<MsgProvisionTransactionResponse>;
|
|
264
557
|
DrainTransaction(request: MsgDrainTransaction): Promise<MsgDrainTransactionResponse>;
|
|
265
558
|
CancelTransaction(request: MsgCancelTransaction): Promise<MsgCancelTransactionResponse>;
|
|
559
|
+
AddWhitelisted(request: MsgAddWhitelisted): Promise<MsgAddWhitelistedResponse>;
|
|
560
|
+
SetAdmin(request: MsgSetAdmin): Promise<MsgSetAdminResponse>;
|
|
561
|
+
AddPubkey(request: MsgAddPubkey): Promise<MsgAddPubkeyResponse>;
|
|
562
|
+
UpdateTssPubkey(request: MsgUpdateTssPubkey): Promise<MsgUpdateTssPubkeyResponse>;
|
|
563
|
+
RemoveWhitelisted(request: MsgRemoveWhitelisted): Promise<MsgRemoveWhitelistedResponse>;
|
|
564
|
+
ClearTssInfo(request: MsgClearTssInfo): Promise<MsgClearTssInfoResponse>;
|
|
565
|
+
AddChain(request: MsgAddChain): Promise<MsgAddChainResponse>;
|
|
566
|
+
UpdateTssHash(request: MsgUpdateTssHash): Promise<MsgUpdateTssHashResponse>;
|
|
567
|
+
UpdateChainStatus(request: MsgUpdateChainStatus): Promise<MsgUpdateChainStatusResponse>;
|
|
568
|
+
AddToken(request: MsgAddToken): Promise<MsgAddTokenResponse>;
|
|
569
|
+
UpdateTssStatus(request: MsgUpdateTssStatus): Promise<MsgUpdateTssStatusResponse>;
|
|
570
|
+
SetTxHash(request: MsgSetTxHash): Promise<MsgSetTxHashResponse>;
|
|
266
571
|
}
|
|
267
572
|
interface Rpc {
|
|
268
573
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|