@kimafinance/kima-transaction-api 1.0.0
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 +43 -0
- package/build/index.d.ts +10 -0
- package/build/index.js +22 -0
- package/build/kima/common.d.ts +15 -0
- package/build/kima/common.js +50 -0
- package/build/kima/tx.d.ts +274 -0
- package/build/kima/tx.js +1871 -0
- package/nodemon.json +6 -0
- package/package.json +32 -0
- package/src/index.ts +40 -0
- package/src/kima/common.ts +67 -0
- package/src/kima/tx.ts +2208 -0
- package/tsconfig.json +17 -0
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Kima Transaction API
|
|
2
|
+
|
|
3
|
+
A wrapper around Kima's API, enabling sending and monitoring transactions
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install --save @kimafinance/kima-transaction-api
|
|
9
|
+
yarn add @kimafinance/kima-transaction-api
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { submitKimaTransaction } from '@kimafinance/kima-transaction-backend'
|
|
17
|
+
|
|
18
|
+
const txResult = await submitKimaTransaction({
|
|
19
|
+
originAddress: "0x1234123412341234123412341234123412341234",
|
|
20
|
+
originChain: "Ethereum",
|
|
21
|
+
targetAddress: "0x1234123412341234123412341234123412341234",
|
|
22
|
+
targetChain: "Polygon",
|
|
23
|
+
amount: 100,
|
|
24
|
+
fee: 0.3
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Available Functions
|
|
31
|
+
|
|
32
|
+
`submitKimaTransaction` : Submit a transaction to transfer liquidity from one change to another.
|
|
33
|
+
|
|
34
|
+
- `originAddress (string)`: sending address
|
|
35
|
+
- `originChain (string)`: sending chain
|
|
36
|
+
- `targetAddress (string)`: receiving address
|
|
37
|
+
- `targetChain (string)`: receiving chain
|
|
38
|
+
- `amount (number)`: amount of token to transfer
|
|
39
|
+
- `fee (number)`: amount of token that kima consumes to pay gas fee for pulling & releasing token transactions
|
|
40
|
+
|
|
41
|
+
## Environment Variables
|
|
42
|
+
|
|
43
|
+
`KIMA_BACKEND_MNEMONIC` : Seed phrase of developer wallet. This wallet must have KIMA token to submit a transaction to kima chain.
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
originChain: string;
|
|
3
|
+
originAddress: string;
|
|
4
|
+
targetChain: string;
|
|
5
|
+
targetAddress: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
fee: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function submitKimaTransaction({ originChain, originAddress, targetChain, targetAddress, amount, fee, }: Props): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
10
|
+
export {};
|
package/build/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.submitKimaTransaction = void 0;
|
|
4
|
+
const proto_signing_1 = require("@cosmjs/proto-signing");
|
|
5
|
+
const common_1 = require("./kima/common");
|
|
6
|
+
async function submitKimaTransaction({ originChain, originAddress, targetChain, targetAddress, amount, fee, }) {
|
|
7
|
+
const wallet = await proto_signing_1.DirectSecp256k1HdWallet.fromMnemonic(process.env.KIMA_BACKEND_MNEMONIC, { prefix: "kima" });
|
|
8
|
+
const client = await (0, common_1.TxClient)(wallet);
|
|
9
|
+
const [firstAccount] = await wallet.getAccounts();
|
|
10
|
+
const params = {
|
|
11
|
+
creator: firstAccount.address,
|
|
12
|
+
originChain,
|
|
13
|
+
originAddress,
|
|
14
|
+
targetChain,
|
|
15
|
+
targetAddress,
|
|
16
|
+
amount: amount.toString(),
|
|
17
|
+
fee: fee.toString(),
|
|
18
|
+
};
|
|
19
|
+
const msg = await client.msgRequestTransaction(params);
|
|
20
|
+
return await client.signAndBroadcast([msg]);
|
|
21
|
+
}
|
|
22
|
+
exports.submitKimaTransaction = submitKimaTransaction;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StdFee } from '@cosmjs/stargate';
|
|
2
|
+
import { Registry, OfflineSigner, EncodeObject } from '@cosmjs/proto-signing';
|
|
3
|
+
import { MsgRequestTransaction, MsgApproveTransaction, MsgFetchBalance } from './tx';
|
|
4
|
+
interface SignAndBroadcastOptions {
|
|
5
|
+
fee: StdFee;
|
|
6
|
+
memo?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const registry: Registry;
|
|
9
|
+
export declare const TxClient: (wallet: OfflineSigner) => Promise<{
|
|
10
|
+
signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
11
|
+
msgRequestTransaction: (data: MsgRequestTransaction) => EncodeObject;
|
|
12
|
+
msgApproveTransaction: (data: MsgApproveTransaction) => EncodeObject;
|
|
13
|
+
msgFetchBalance: (data: MsgFetchBalance) => EncodeObject;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TxClient = exports.registry = void 0;
|
|
7
|
+
const stargate_1 = require("@cosmjs/stargate");
|
|
8
|
+
const dotenv_1 = __importDefault(require("dotenv"));
|
|
9
|
+
const proto_signing_1 = require("@cosmjs/proto-signing");
|
|
10
|
+
const tx_1 = require("./tx");
|
|
11
|
+
dotenv_1.default.config();
|
|
12
|
+
const defaultFee = {
|
|
13
|
+
amount: [],
|
|
14
|
+
gas: '200000'
|
|
15
|
+
};
|
|
16
|
+
const types = [
|
|
17
|
+
[
|
|
18
|
+
'/DiversifiTechnologies.diversifi.diversifi.MsgRequestTransaction',
|
|
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
|
+
]
|
|
29
|
+
];
|
|
30
|
+
exports.registry = new proto_signing_1.Registry(types);
|
|
31
|
+
const TxClient = async (wallet) => {
|
|
32
|
+
const client = await stargate_1.SigningStargateClient.connectWithSigner('https://' + process.env.KIMA_BACKEND_DIVERSIFI_NODE_PROVIDER1, wallet, { registry: exports.registry });
|
|
33
|
+
const { address } = (await wallet.getAccounts())[0];
|
|
34
|
+
return {
|
|
35
|
+
signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: '' }) => client.signAndBroadcast(address, msgs, fee, memo),
|
|
36
|
+
msgRequestTransaction: (data) => ({
|
|
37
|
+
typeUrl: '/DiversifiTechnologies.diversifi.diversifi.MsgRequestTransaction',
|
|
38
|
+
value: tx_1.MsgRequestTransaction.fromPartial(data)
|
|
39
|
+
}),
|
|
40
|
+
msgApproveTransaction: (data) => ({
|
|
41
|
+
typeUrl: '/DiversifiTechnologies.diversifi.diversifi.MsgApproveTransaction',
|
|
42
|
+
value: tx_1.MsgApproveTransaction.fromPartial(data)
|
|
43
|
+
}),
|
|
44
|
+
msgFetchBalance: (data) => ({
|
|
45
|
+
typeUrl: '/DiversifiTechnologies.diversifi.diversifi.MsgFetchBalance',
|
|
46
|
+
value: tx_1.MsgFetchBalance.fromPartial(data)
|
|
47
|
+
})
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
exports.TxClient = TxClient;
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { Reader, Writer } from 'protobufjs/minimal';
|
|
2
|
+
export declare const protobufPackage = "DiversifiTechnologies.diversifi.diversifi";
|
|
3
|
+
export interface MsgRequestTransaction {
|
|
4
|
+
creator: string;
|
|
5
|
+
originChain: string;
|
|
6
|
+
originAddress: string;
|
|
7
|
+
targetChain: string;
|
|
8
|
+
targetAddress: string;
|
|
9
|
+
amount: string;
|
|
10
|
+
fee: string;
|
|
11
|
+
}
|
|
12
|
+
export interface MsgRequestTransactionResponse {
|
|
13
|
+
code: string;
|
|
14
|
+
msg: string;
|
|
15
|
+
}
|
|
16
|
+
export interface MsgApproveTransaction {
|
|
17
|
+
creator: string;
|
|
18
|
+
txHash: string;
|
|
19
|
+
success: string;
|
|
20
|
+
signedKey: string;
|
|
21
|
+
}
|
|
22
|
+
export interface MsgApproveTransactionResponse {
|
|
23
|
+
code: string;
|
|
24
|
+
msg: string;
|
|
25
|
+
}
|
|
26
|
+
export interface MsgFetchBalance {
|
|
27
|
+
creator: string;
|
|
28
|
+
}
|
|
29
|
+
export interface MsgFetchBalanceResponse {
|
|
30
|
+
code: string;
|
|
31
|
+
result: string;
|
|
32
|
+
}
|
|
33
|
+
export interface MsgObservationVote {
|
|
34
|
+
creator: string;
|
|
35
|
+
txHash: string;
|
|
36
|
+
chainId: string;
|
|
37
|
+
from: string;
|
|
38
|
+
to: string;
|
|
39
|
+
amount: string;
|
|
40
|
+
}
|
|
41
|
+
export interface MsgObservationVoteResponse {
|
|
42
|
+
code: string;
|
|
43
|
+
msg: string;
|
|
44
|
+
}
|
|
45
|
+
export interface MsgUpdateBalance {
|
|
46
|
+
creator: string;
|
|
47
|
+
chainId: string;
|
|
48
|
+
balance: string;
|
|
49
|
+
decimal: string;
|
|
50
|
+
}
|
|
51
|
+
export interface MsgUpdateBalanceResponse {
|
|
52
|
+
code: string;
|
|
53
|
+
msg: string;
|
|
54
|
+
}
|
|
55
|
+
export interface MsgKeysignVote {
|
|
56
|
+
creator: string;
|
|
57
|
+
txHash: string;
|
|
58
|
+
pubKey: string;
|
|
59
|
+
}
|
|
60
|
+
export interface MsgKeysignVoteResponse {
|
|
61
|
+
code: string;
|
|
62
|
+
msg: string;
|
|
63
|
+
}
|
|
64
|
+
export interface MsgUpdateGasFee {
|
|
65
|
+
creator: string;
|
|
66
|
+
chainId: string;
|
|
67
|
+
fee: string;
|
|
68
|
+
}
|
|
69
|
+
export interface MsgUpdateGasFeeResponse {
|
|
70
|
+
}
|
|
71
|
+
export interface MsgProvisionTransaction {
|
|
72
|
+
creator: string;
|
|
73
|
+
fromChain: string;
|
|
74
|
+
fromAddress: string;
|
|
75
|
+
symbol: string;
|
|
76
|
+
tokenAddr: string;
|
|
77
|
+
amount: string;
|
|
78
|
+
options: string;
|
|
79
|
+
}
|
|
80
|
+
export interface MsgProvisionTransactionResponse {
|
|
81
|
+
}
|
|
82
|
+
export interface MsgDrainTransaction {
|
|
83
|
+
creator: string;
|
|
84
|
+
fromChain: string;
|
|
85
|
+
toChain: string;
|
|
86
|
+
toAddress: string;
|
|
87
|
+
nftAddr: string;
|
|
88
|
+
amount: string;
|
|
89
|
+
options: string;
|
|
90
|
+
}
|
|
91
|
+
export interface MsgDrainTransactionResponse {
|
|
92
|
+
}
|
|
93
|
+
export interface MsgCancelTransaction {
|
|
94
|
+
creator: string;
|
|
95
|
+
transactionId: string;
|
|
96
|
+
}
|
|
97
|
+
export interface MsgCancelTransactionResponse {
|
|
98
|
+
}
|
|
99
|
+
export declare const MsgRequestTransaction: {
|
|
100
|
+
encode(message: MsgRequestTransaction, writer?: Writer): Writer;
|
|
101
|
+
decode(input: Reader | Uint8Array, length?: number): MsgRequestTransaction;
|
|
102
|
+
fromJSON(object: any): MsgRequestTransaction;
|
|
103
|
+
toJSON(message: MsgRequestTransaction): unknown;
|
|
104
|
+
fromPartial(object: DeepPartial<MsgRequestTransaction>): MsgRequestTransaction;
|
|
105
|
+
};
|
|
106
|
+
export declare const MsgRequestTransactionResponse: {
|
|
107
|
+
encode(message: MsgRequestTransactionResponse, writer?: Writer): Writer;
|
|
108
|
+
decode(input: Reader | Uint8Array, length?: number): MsgRequestTransactionResponse;
|
|
109
|
+
fromJSON(object: any): MsgRequestTransactionResponse;
|
|
110
|
+
toJSON(message: MsgRequestTransactionResponse): unknown;
|
|
111
|
+
fromPartial(object: DeepPartial<MsgRequestTransactionResponse>): MsgRequestTransactionResponse;
|
|
112
|
+
};
|
|
113
|
+
export declare const MsgApproveTransaction: {
|
|
114
|
+
encode(message: MsgApproveTransaction, writer?: Writer): Writer;
|
|
115
|
+
decode(input: Reader | Uint8Array, length?: number): MsgApproveTransaction;
|
|
116
|
+
fromJSON(object: any): MsgApproveTransaction;
|
|
117
|
+
toJSON(message: MsgApproveTransaction): unknown;
|
|
118
|
+
fromPartial(object: DeepPartial<MsgApproveTransaction>): MsgApproveTransaction;
|
|
119
|
+
};
|
|
120
|
+
export declare const MsgApproveTransactionResponse: {
|
|
121
|
+
encode(message: MsgApproveTransactionResponse, writer?: Writer): Writer;
|
|
122
|
+
decode(input: Reader | Uint8Array, length?: number): MsgApproveTransactionResponse;
|
|
123
|
+
fromJSON(object: any): MsgApproveTransactionResponse;
|
|
124
|
+
toJSON(message: MsgApproveTransactionResponse): unknown;
|
|
125
|
+
fromPartial(object: DeepPartial<MsgApproveTransactionResponse>): MsgApproveTransactionResponse;
|
|
126
|
+
};
|
|
127
|
+
export declare const MsgFetchBalance: {
|
|
128
|
+
encode(message: MsgFetchBalance, writer?: Writer): Writer;
|
|
129
|
+
decode(input: Reader | Uint8Array, length?: number): MsgFetchBalance;
|
|
130
|
+
fromJSON(object: any): MsgFetchBalance;
|
|
131
|
+
toJSON(message: MsgFetchBalance): unknown;
|
|
132
|
+
fromPartial(object: DeepPartial<MsgFetchBalance>): MsgFetchBalance;
|
|
133
|
+
};
|
|
134
|
+
export declare const MsgFetchBalanceResponse: {
|
|
135
|
+
encode(message: MsgFetchBalanceResponse, writer?: Writer): Writer;
|
|
136
|
+
decode(input: Reader | Uint8Array, length?: number): MsgFetchBalanceResponse;
|
|
137
|
+
fromJSON(object: any): MsgFetchBalanceResponse;
|
|
138
|
+
toJSON(message: MsgFetchBalanceResponse): unknown;
|
|
139
|
+
fromPartial(object: DeepPartial<MsgFetchBalanceResponse>): MsgFetchBalanceResponse;
|
|
140
|
+
};
|
|
141
|
+
export declare const MsgObservationVote: {
|
|
142
|
+
encode(message: MsgObservationVote, writer?: Writer): Writer;
|
|
143
|
+
decode(input: Reader | Uint8Array, length?: number): MsgObservationVote;
|
|
144
|
+
fromJSON(object: any): MsgObservationVote;
|
|
145
|
+
toJSON(message: MsgObservationVote): unknown;
|
|
146
|
+
fromPartial(object: DeepPartial<MsgObservationVote>): MsgObservationVote;
|
|
147
|
+
};
|
|
148
|
+
export declare const MsgObservationVoteResponse: {
|
|
149
|
+
encode(message: MsgObservationVoteResponse, writer?: Writer): Writer;
|
|
150
|
+
decode(input: Reader | Uint8Array, length?: number): MsgObservationVoteResponse;
|
|
151
|
+
fromJSON(object: any): MsgObservationVoteResponse;
|
|
152
|
+
toJSON(message: MsgObservationVoteResponse): unknown;
|
|
153
|
+
fromPartial(object: DeepPartial<MsgObservationVoteResponse>): MsgObservationVoteResponse;
|
|
154
|
+
};
|
|
155
|
+
export declare const MsgUpdateBalance: {
|
|
156
|
+
encode(message: MsgUpdateBalance, writer?: Writer): Writer;
|
|
157
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateBalance;
|
|
158
|
+
fromJSON(object: any): MsgUpdateBalance;
|
|
159
|
+
toJSON(message: MsgUpdateBalance): unknown;
|
|
160
|
+
fromPartial(object: DeepPartial<MsgUpdateBalance>): MsgUpdateBalance;
|
|
161
|
+
};
|
|
162
|
+
export declare const MsgUpdateBalanceResponse: {
|
|
163
|
+
encode(message: MsgUpdateBalanceResponse, writer?: Writer): Writer;
|
|
164
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateBalanceResponse;
|
|
165
|
+
fromJSON(object: any): MsgUpdateBalanceResponse;
|
|
166
|
+
toJSON(message: MsgUpdateBalanceResponse): unknown;
|
|
167
|
+
fromPartial(object: DeepPartial<MsgUpdateBalanceResponse>): MsgUpdateBalanceResponse;
|
|
168
|
+
};
|
|
169
|
+
export declare const MsgKeysignVote: {
|
|
170
|
+
encode(message: MsgKeysignVote, writer?: Writer): Writer;
|
|
171
|
+
decode(input: Reader | Uint8Array, length?: number): MsgKeysignVote;
|
|
172
|
+
fromJSON(object: any): MsgKeysignVote;
|
|
173
|
+
toJSON(message: MsgKeysignVote): unknown;
|
|
174
|
+
fromPartial(object: DeepPartial<MsgKeysignVote>): MsgKeysignVote;
|
|
175
|
+
};
|
|
176
|
+
export declare const MsgKeysignVoteResponse: {
|
|
177
|
+
encode(message: MsgKeysignVoteResponse, writer?: Writer): Writer;
|
|
178
|
+
decode(input: Reader | Uint8Array, length?: number): MsgKeysignVoteResponse;
|
|
179
|
+
fromJSON(object: any): MsgKeysignVoteResponse;
|
|
180
|
+
toJSON(message: MsgKeysignVoteResponse): unknown;
|
|
181
|
+
fromPartial(object: DeepPartial<MsgKeysignVoteResponse>): MsgKeysignVoteResponse;
|
|
182
|
+
};
|
|
183
|
+
export declare const MsgUpdateGasFee: {
|
|
184
|
+
encode(message: MsgUpdateGasFee, writer?: Writer): Writer;
|
|
185
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateGasFee;
|
|
186
|
+
fromJSON(object: any): MsgUpdateGasFee;
|
|
187
|
+
toJSON(message: MsgUpdateGasFee): unknown;
|
|
188
|
+
fromPartial(object: DeepPartial<MsgUpdateGasFee>): MsgUpdateGasFee;
|
|
189
|
+
};
|
|
190
|
+
export declare const MsgUpdateGasFeeResponse: {
|
|
191
|
+
encode(_: MsgUpdateGasFeeResponse, writer?: Writer): Writer;
|
|
192
|
+
decode(input: Reader | Uint8Array, length?: number): MsgUpdateGasFeeResponse;
|
|
193
|
+
fromJSON(_: any): MsgUpdateGasFeeResponse;
|
|
194
|
+
toJSON(_: MsgUpdateGasFeeResponse): unknown;
|
|
195
|
+
fromPartial(_: DeepPartial<MsgUpdateGasFeeResponse>): MsgUpdateGasFeeResponse;
|
|
196
|
+
};
|
|
197
|
+
export declare const MsgProvisionTransaction: {
|
|
198
|
+
encode(message: MsgProvisionTransaction, writer?: Writer): Writer;
|
|
199
|
+
decode(input: Reader | Uint8Array, length?: number): MsgProvisionTransaction;
|
|
200
|
+
fromJSON(object: any): MsgProvisionTransaction;
|
|
201
|
+
toJSON(message: MsgProvisionTransaction): unknown;
|
|
202
|
+
fromPartial(object: DeepPartial<MsgProvisionTransaction>): MsgProvisionTransaction;
|
|
203
|
+
};
|
|
204
|
+
export declare const MsgProvisionTransactionResponse: {
|
|
205
|
+
encode(_: MsgProvisionTransactionResponse, writer?: Writer): Writer;
|
|
206
|
+
decode(input: Reader | Uint8Array, length?: number): MsgProvisionTransactionResponse;
|
|
207
|
+
fromJSON(_: any): MsgProvisionTransactionResponse;
|
|
208
|
+
toJSON(_: MsgProvisionTransactionResponse): unknown;
|
|
209
|
+
fromPartial(_: DeepPartial<MsgProvisionTransactionResponse>): MsgProvisionTransactionResponse;
|
|
210
|
+
};
|
|
211
|
+
export declare const MsgDrainTransaction: {
|
|
212
|
+
encode(message: MsgDrainTransaction, writer?: Writer): Writer;
|
|
213
|
+
decode(input: Reader | Uint8Array, length?: number): MsgDrainTransaction;
|
|
214
|
+
fromJSON(object: any): MsgDrainTransaction;
|
|
215
|
+
toJSON(message: MsgDrainTransaction): unknown;
|
|
216
|
+
fromPartial(object: DeepPartial<MsgDrainTransaction>): MsgDrainTransaction;
|
|
217
|
+
};
|
|
218
|
+
export declare const MsgDrainTransactionResponse: {
|
|
219
|
+
encode(_: MsgDrainTransactionResponse, writer?: Writer): Writer;
|
|
220
|
+
decode(input: Reader | Uint8Array, length?: number): MsgDrainTransactionResponse;
|
|
221
|
+
fromJSON(_: any): MsgDrainTransactionResponse;
|
|
222
|
+
toJSON(_: MsgDrainTransactionResponse): unknown;
|
|
223
|
+
fromPartial(_: DeepPartial<MsgDrainTransactionResponse>): MsgDrainTransactionResponse;
|
|
224
|
+
};
|
|
225
|
+
export declare const MsgCancelTransaction: {
|
|
226
|
+
encode(message: MsgCancelTransaction, writer?: Writer): Writer;
|
|
227
|
+
decode(input: Reader | Uint8Array, length?: number): MsgCancelTransaction;
|
|
228
|
+
fromJSON(object: any): MsgCancelTransaction;
|
|
229
|
+
toJSON(message: MsgCancelTransaction): unknown;
|
|
230
|
+
fromPartial(object: DeepPartial<MsgCancelTransaction>): MsgCancelTransaction;
|
|
231
|
+
};
|
|
232
|
+
export declare const MsgCancelTransactionResponse: {
|
|
233
|
+
encode(_: MsgCancelTransactionResponse, writer?: Writer): Writer;
|
|
234
|
+
decode(input: Reader | Uint8Array, length?: number): MsgCancelTransactionResponse;
|
|
235
|
+
fromJSON(_: any): MsgCancelTransactionResponse;
|
|
236
|
+
toJSON(_: MsgCancelTransactionResponse): unknown;
|
|
237
|
+
fromPartial(_: DeepPartial<MsgCancelTransactionResponse>): MsgCancelTransactionResponse;
|
|
238
|
+
};
|
|
239
|
+
/** Msg defines the Msg service. */
|
|
240
|
+
export interface Msg {
|
|
241
|
+
RequestTransaction(request: MsgRequestTransaction): Promise<MsgRequestTransactionResponse>;
|
|
242
|
+
ApproveTransaction(request: MsgApproveTransaction): Promise<MsgApproveTransactionResponse>;
|
|
243
|
+
FetchBalance(request: MsgFetchBalance): Promise<MsgFetchBalanceResponse>;
|
|
244
|
+
ObservationVote(request: MsgObservationVote): Promise<MsgObservationVoteResponse>;
|
|
245
|
+
UpdateBalance(request: MsgUpdateBalance): Promise<MsgUpdateBalanceResponse>;
|
|
246
|
+
KeysignVote(request: MsgKeysignVote): Promise<MsgKeysignVoteResponse>;
|
|
247
|
+
UpdateGasFee(request: MsgUpdateGasFee): Promise<MsgUpdateGasFeeResponse>;
|
|
248
|
+
ProvisionTransaction(request: MsgProvisionTransaction): Promise<MsgProvisionTransactionResponse>;
|
|
249
|
+
DrainTransaction(request: MsgDrainTransaction): Promise<MsgDrainTransactionResponse>;
|
|
250
|
+
/** this line is used by starport scaffolding # proto/tx/rpc */
|
|
251
|
+
CancelTransaction(request: MsgCancelTransaction): Promise<MsgCancelTransactionResponse>;
|
|
252
|
+
}
|
|
253
|
+
export declare class MsgClientImpl implements Msg {
|
|
254
|
+
private readonly rpc;
|
|
255
|
+
constructor(rpc: Rpc);
|
|
256
|
+
RequestTransaction(request: MsgRequestTransaction): Promise<MsgRequestTransactionResponse>;
|
|
257
|
+
ApproveTransaction(request: MsgApproveTransaction): Promise<MsgApproveTransactionResponse>;
|
|
258
|
+
FetchBalance(request: MsgFetchBalance): Promise<MsgFetchBalanceResponse>;
|
|
259
|
+
ObservationVote(request: MsgObservationVote): Promise<MsgObservationVoteResponse>;
|
|
260
|
+
UpdateBalance(request: MsgUpdateBalance): Promise<MsgUpdateBalanceResponse>;
|
|
261
|
+
KeysignVote(request: MsgKeysignVote): Promise<MsgKeysignVoteResponse>;
|
|
262
|
+
UpdateGasFee(request: MsgUpdateGasFee): Promise<MsgUpdateGasFeeResponse>;
|
|
263
|
+
ProvisionTransaction(request: MsgProvisionTransaction): Promise<MsgProvisionTransactionResponse>;
|
|
264
|
+
DrainTransaction(request: MsgDrainTransaction): Promise<MsgDrainTransactionResponse>;
|
|
265
|
+
CancelTransaction(request: MsgCancelTransaction): Promise<MsgCancelTransactionResponse>;
|
|
266
|
+
}
|
|
267
|
+
interface Rpc {
|
|
268
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
269
|
+
}
|
|
270
|
+
type Builtin = Date | Function | Uint8Array | string | number | undefined;
|
|
271
|
+
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 {} ? {
|
|
272
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
273
|
+
} : Partial<T>;
|
|
274
|
+
export {};
|