@kimafinance/kima-transaction-api 1.4.1 → 1.4.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/build/index.d.ts +50 -3
- package/build/index.js +121 -17
- package/build/kima/common.d.ts +1 -4
- package/build/kima/common.js +9 -12
- package/build/kima/tx.d.ts +674 -0
- package/build/kima/tx.js +2170 -0
- package/package.json +10 -10
- package/src/index.ts +206 -3
- package/src/kima/common.ts +12 -5
- package/src/kima/tx.ts +2945 -0
- package/build/api/htlc-lock.d.ts +0 -23
- package/build/api/htlc-lock.js +0 -37
- package/build/api/htlc-reclaim.d.ts +0 -14
- package/build/api/htlc-reclaim.js +0 -28
- package/build/api/submit.d.ts +0 -54
- package/build/api/submit.js +0 -94
- package/build/config/global-this.config.d.ts +0 -2
- package/build/config/global-this.config.js +0 -18
- package/build/config/probuff.config.d.ts +0 -2
- package/build/config/probuff.config.js +0 -12
- package/build/kima/tx/cancel.d.ts +0 -35
- package/build/kima/tx/cancel.js +0 -115
- package/build/kima/tx/drain-finalize.d.ts +0 -47
- package/build/kima/tx/drain-finalize.js +0 -155
- package/build/kima/tx/drain.d.ts +0 -50
- package/build/kima/tx/drain.js +0 -164
- package/build/kima/tx/finalize.d.ts +0 -47
- package/build/kima/tx/finalize.js +0 -155
- package/build/kima/tx/htlc-lock.d.ts +0 -42
- package/build/kima/tx/htlc-lock.js +0 -152
- package/build/kima/tx/htlc-reclaim.d.ts +0 -30
- package/build/kima/tx/htlc-reclaim.js +0 -105
- package/build/kima/tx/index.d.ts +0 -1
- package/build/kima/tx/index.js +0 -4
- package/build/kima/tx/liquidity-provision.d.ts +0 -30
- package/build/kima/tx/liquidity-provision.js +0 -102
- package/build/kima/tx/message-service.d.ts +0 -54
- package/build/kima/tx/message-service.js +0 -117
- package/build/kima/tx/provision-finalize.d.ts +0 -47
- package/build/kima/tx/provision-finalize.js +0 -155
- package/build/kima/tx/provision.d.ts +0 -70
- package/build/kima/tx/provision.js +0 -230
- package/build/kima/tx/request.d.ts +0 -63
- package/build/kima/tx/request.js +0 -222
- package/build/kima/tx/response.d.ts +0 -21
- package/build/kima/tx/response.js +0 -69
- package/build/kima/tx/rpc.d.ts +0 -0
- package/build/kima/tx/rpc.js +0 -1
- package/build/kima/tx/set-hash.d.ts +0 -42
- package/build/kima/tx/set-hash.js +0 -130
- package/build/kima/tx/set-process.d.ts +0 -37
- package/build/kima/tx/set-process.js +0 -121
- package/build/kima/tx/transfer-limit.d.ts +0 -30
- package/build/kima/tx/transfer-limit.js +0 -102
- package/build/kima/tx/withdraw.d.ts +0 -47
- package/build/kima/tx/withdraw.js +0 -155
- package/build/utils.d.ts +0 -17
- package/build/utils.js +0 -49
- package/src/api/htlc-lock.ts +0 -57
- package/src/api/htlc-reclaim.ts +0 -39
- package/src/api/submit.ts +0 -132
- package/src/config/global-this.config.ts +0 -20
- package/src/config/probuff.config.ts +0 -9
- package/src/kima/tx/cancel.ts +0 -147
- package/src/kima/tx/drain-finalize.ts +0 -191
- package/src/kima/tx/drain.ts +0 -201
- package/src/kima/tx/finalize.ts +0 -191
- package/src/kima/tx/htlc-lock.ts +0 -183
- package/src/kima/tx/htlc-reclaim.ts +0 -132
- package/src/kima/tx/index.ts +0 -1
- package/src/kima/tx/liquidity-provision.ts +0 -132
- package/src/kima/tx/message-service.ts +0 -278
- package/src/kima/tx/provision-finalize.ts +0 -191
- package/src/kima/tx/provision.ts +0 -279
- package/src/kima/tx/request.ts +0 -256
- package/src/kima/tx/response.ts +0 -83
- package/src/kima/tx/rpc.ts +0 -0
- package/src/kima/tx/set-hash.ts +0 -162
- package/src/kima/tx/set-process.ts +0 -151
- package/src/kima/tx/transfer-limit.ts +0 -132
- package/src/kima/tx/withdraw.ts +0 -191
- package/src/utils.ts +0 -67
|
@@ -1,105 +0,0 @@
|
|
|
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.MsgHtlcReclaimResponse = exports.MsgHtlcReclaim = void 0;
|
|
7
|
-
const probuff_config_1 = __importDefault(require("../../config/probuff.config"));
|
|
8
|
-
const utils_1 = require("../../utils");
|
|
9
|
-
function createBaseMsgHtlcReclaim() {
|
|
10
|
-
return { creator: "", txHash: "", senderAddress: "" };
|
|
11
|
-
}
|
|
12
|
-
exports.MsgHtlcReclaim = {
|
|
13
|
-
encode(message, writer = probuff_config_1.default.Writer.create()) {
|
|
14
|
-
if (message.creator !== "") {
|
|
15
|
-
writer.uint32(10).string(message.creator);
|
|
16
|
-
}
|
|
17
|
-
if (message.txHash !== "") {
|
|
18
|
-
writer.uint32(18).string(message.txHash);
|
|
19
|
-
}
|
|
20
|
-
if (message.senderAddress !== "") {
|
|
21
|
-
writer.uint32(26).string(message.senderAddress);
|
|
22
|
-
}
|
|
23
|
-
return writer;
|
|
24
|
-
},
|
|
25
|
-
decode(input, length) {
|
|
26
|
-
const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
|
|
27
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
28
|
-
const message = createBaseMsgHtlcReclaim();
|
|
29
|
-
while (reader.pos < end) {
|
|
30
|
-
const tag = reader.uint32();
|
|
31
|
-
switch (tag >>> 3) {
|
|
32
|
-
case 1:
|
|
33
|
-
message.creator = reader.string();
|
|
34
|
-
break;
|
|
35
|
-
case 2:
|
|
36
|
-
message.txHash = reader.string();
|
|
37
|
-
break;
|
|
38
|
-
case 3:
|
|
39
|
-
message.senderAddress = reader.string();
|
|
40
|
-
break;
|
|
41
|
-
default:
|
|
42
|
-
reader.skipType(tag & 7);
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return message;
|
|
47
|
-
},
|
|
48
|
-
fromJSON(object) {
|
|
49
|
-
return {
|
|
50
|
-
creator: (0, utils_1.isSet)(object.creator) ? String(object.creator) : "",
|
|
51
|
-
txHash: (0, utils_1.isSet)(object.txHash) ? String(object.txHash) : "",
|
|
52
|
-
senderAddress: (0, utils_1.isSet)(object.senderAddress)
|
|
53
|
-
? String(object.senderAddress)
|
|
54
|
-
: "",
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
toJSON(message) {
|
|
58
|
-
const obj = {};
|
|
59
|
-
message.creator !== undefined && (obj.creator = message.creator);
|
|
60
|
-
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
61
|
-
message.senderAddress !== undefined &&
|
|
62
|
-
(obj.senderAddress = message.senderAddress);
|
|
63
|
-
return obj;
|
|
64
|
-
},
|
|
65
|
-
fromPartial(object) {
|
|
66
|
-
const message = createBaseMsgHtlcReclaim();
|
|
67
|
-
message.creator = object.creator ?? "";
|
|
68
|
-
message.txHash = object.txHash ?? "";
|
|
69
|
-
message.senderAddress = object.senderAddress ?? "";
|
|
70
|
-
return message;
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
function createBaseMsgHtlcReclaimResponse() {
|
|
74
|
-
return {};
|
|
75
|
-
}
|
|
76
|
-
exports.MsgHtlcReclaimResponse = {
|
|
77
|
-
encode(_, writer = probuff_config_1.default.Writer.create()) {
|
|
78
|
-
return writer;
|
|
79
|
-
},
|
|
80
|
-
decode(input, length) {
|
|
81
|
-
const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
|
|
82
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
83
|
-
const message = createBaseMsgHtlcReclaimResponse();
|
|
84
|
-
while (reader.pos < end) {
|
|
85
|
-
const tag = reader.uint32();
|
|
86
|
-
switch (tag >>> 3) {
|
|
87
|
-
default:
|
|
88
|
-
reader.skipType(tag & 7);
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return message;
|
|
93
|
-
},
|
|
94
|
-
fromJSON(_) {
|
|
95
|
-
return {};
|
|
96
|
-
},
|
|
97
|
-
toJSON(_) {
|
|
98
|
-
const obj = {};
|
|
99
|
-
return obj;
|
|
100
|
-
},
|
|
101
|
-
fromPartial(_) {
|
|
102
|
-
const message = createBaseMsgHtlcReclaimResponse();
|
|
103
|
-
return message;
|
|
104
|
-
},
|
|
105
|
-
};
|
package/build/kima/tx/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const protobufPackage = "kimablockchain.transaction";
|
package/build/kima/tx/index.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import _m0 from "../../config/probuff.config";
|
|
2
|
-
export interface MsgUpdateLiquidityProvisionParams {
|
|
3
|
-
authority: string;
|
|
4
|
-
maxBTC: string;
|
|
5
|
-
maxUSDT: string;
|
|
6
|
-
}
|
|
7
|
-
export interface MsgUpdateLiquidityProvisionParamsResponse {
|
|
8
|
-
}
|
|
9
|
-
export declare const MsgUpdateLiquidityProvisionParams: {
|
|
10
|
-
encode(message: MsgUpdateLiquidityProvisionParams, writer?: _m0.Writer): _m0.Writer;
|
|
11
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateLiquidityProvisionParams;
|
|
12
|
-
fromJSON(object: any): MsgUpdateLiquidityProvisionParams;
|
|
13
|
-
toJSON(message: MsgUpdateLiquidityProvisionParams): unknown;
|
|
14
|
-
fromPartial<I extends {
|
|
15
|
-
authority?: string | undefined;
|
|
16
|
-
maxBTC?: string | undefined;
|
|
17
|
-
maxUSDT?: string | undefined;
|
|
18
|
-
} & {
|
|
19
|
-
authority?: string | undefined;
|
|
20
|
-
maxBTC?: string | undefined;
|
|
21
|
-
maxUSDT?: string | undefined;
|
|
22
|
-
} & { [K in Exclude<keyof I, keyof MsgUpdateLiquidityProvisionParams>]: never; }>(object: I): MsgUpdateLiquidityProvisionParams;
|
|
23
|
-
};
|
|
24
|
-
export declare const MsgUpdateLiquidityProvisionParamsResponse: {
|
|
25
|
-
encode(_: MsgUpdateLiquidityProvisionParamsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
26
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateLiquidityProvisionParamsResponse;
|
|
27
|
-
fromJSON(_: any): MsgUpdateLiquidityProvisionParamsResponse;
|
|
28
|
-
toJSON(_: MsgUpdateLiquidityProvisionParamsResponse): unknown;
|
|
29
|
-
fromPartial<I extends {} & {} & { [K in Exclude<keyof I, never>]: never; }>(_: I): MsgUpdateLiquidityProvisionParamsResponse;
|
|
30
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
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.MsgUpdateLiquidityProvisionParamsResponse = exports.MsgUpdateLiquidityProvisionParams = void 0;
|
|
7
|
-
const probuff_config_1 = __importDefault(require("../../config/probuff.config"));
|
|
8
|
-
const utils_1 = require("../../utils");
|
|
9
|
-
function createBaseMsgUpdateLiquidityProvisionParams() {
|
|
10
|
-
return { authority: "", maxBTC: "", maxUSDT: "" };
|
|
11
|
-
}
|
|
12
|
-
exports.MsgUpdateLiquidityProvisionParams = {
|
|
13
|
-
encode(message, writer = probuff_config_1.default.Writer.create()) {
|
|
14
|
-
if (message.authority !== "") {
|
|
15
|
-
writer.uint32(10).string(message.authority);
|
|
16
|
-
}
|
|
17
|
-
if (message.maxBTC !== "") {
|
|
18
|
-
writer.uint32(18).string(message.maxBTC);
|
|
19
|
-
}
|
|
20
|
-
if (message.maxUSDT !== "") {
|
|
21
|
-
writer.uint32(26).string(message.maxUSDT);
|
|
22
|
-
}
|
|
23
|
-
return writer;
|
|
24
|
-
},
|
|
25
|
-
decode(input, length) {
|
|
26
|
-
const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
|
|
27
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
28
|
-
const message = createBaseMsgUpdateLiquidityProvisionParams();
|
|
29
|
-
while (reader.pos < end) {
|
|
30
|
-
const tag = reader.uint32();
|
|
31
|
-
switch (tag >>> 3) {
|
|
32
|
-
case 1:
|
|
33
|
-
message.authority = reader.string();
|
|
34
|
-
break;
|
|
35
|
-
case 2:
|
|
36
|
-
message.maxBTC = reader.string();
|
|
37
|
-
break;
|
|
38
|
-
case 3:
|
|
39
|
-
message.maxUSDT = reader.string();
|
|
40
|
-
break;
|
|
41
|
-
default:
|
|
42
|
-
reader.skipType(tag & 7);
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return message;
|
|
47
|
-
},
|
|
48
|
-
fromJSON(object) {
|
|
49
|
-
return {
|
|
50
|
-
authority: (0, utils_1.isSet)(object.authority) ? String(object.authority) : "",
|
|
51
|
-
maxBTC: (0, utils_1.isSet)(object.maxBTC) ? String(object.maxBTC) : "",
|
|
52
|
-
maxUSDT: (0, utils_1.isSet)(object.maxUSDT) ? String(object.maxUSDT) : "",
|
|
53
|
-
};
|
|
54
|
-
},
|
|
55
|
-
toJSON(message) {
|
|
56
|
-
const obj = {};
|
|
57
|
-
message.authority !== undefined && (obj.authority = message.authority);
|
|
58
|
-
message.maxBTC !== undefined && (obj.maxBTC = message.maxBTC);
|
|
59
|
-
message.maxUSDT !== undefined && (obj.maxUSDT = message.maxUSDT);
|
|
60
|
-
return obj;
|
|
61
|
-
},
|
|
62
|
-
fromPartial(object) {
|
|
63
|
-
const message = createBaseMsgUpdateLiquidityProvisionParams();
|
|
64
|
-
message.authority = object.authority ?? "";
|
|
65
|
-
message.maxBTC = object.maxBTC ?? "";
|
|
66
|
-
message.maxUSDT = object.maxUSDT ?? "";
|
|
67
|
-
return message;
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
function createBaseMsgUpdateLiquidityProvisionParamsResponse() {
|
|
71
|
-
return {};
|
|
72
|
-
}
|
|
73
|
-
exports.MsgUpdateLiquidityProvisionParamsResponse = {
|
|
74
|
-
encode(_, writer = probuff_config_1.default.Writer.create()) {
|
|
75
|
-
return writer;
|
|
76
|
-
},
|
|
77
|
-
decode(input, length) {
|
|
78
|
-
const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
|
|
79
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
80
|
-
const message = createBaseMsgUpdateLiquidityProvisionParamsResponse();
|
|
81
|
-
while (reader.pos < end) {
|
|
82
|
-
const tag = reader.uint32();
|
|
83
|
-
switch (tag >>> 3) {
|
|
84
|
-
default:
|
|
85
|
-
reader.skipType(tag & 7);
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return message;
|
|
90
|
-
},
|
|
91
|
-
fromJSON(_) {
|
|
92
|
-
return {};
|
|
93
|
-
},
|
|
94
|
-
toJSON(_) {
|
|
95
|
-
const obj = {};
|
|
96
|
-
return obj;
|
|
97
|
-
},
|
|
98
|
-
fromPartial(_) {
|
|
99
|
-
const message = createBaseMsgUpdateLiquidityProvisionParamsResponse();
|
|
100
|
-
return message;
|
|
101
|
-
},
|
|
102
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { MsgCancelTransaction, MsgCancelTransactionResponse } from "./cancel";
|
|
2
|
-
import { MsgRequestDrainTransaction, MsgRequestDrainTransactionResponse } from "./drain";
|
|
3
|
-
import { MsgFinalizeDrainTransaction, MsgFinalizeDrainTransactionResponse } from "./drain-finalize";
|
|
4
|
-
import { MsgFinalizeTransaction, MsgFinalizeTransactionResponse } from "./finalize";
|
|
5
|
-
import { MsgRequestHtlcLock, MsgRequestHtlcLockResponse } from "./htlc-lock";
|
|
6
|
-
import { MsgHtlcReclaim, MsgHtlcReclaimResponse } from "./htlc-reclaim";
|
|
7
|
-
import { MsgUpdateLiquidityProvisionParams, MsgUpdateLiquidityProvisionParamsResponse } from "./liquidity-provision";
|
|
8
|
-
import { MsgRequestProvisionTransaction, MsgRequestProvisionTransactionResponse } from "./provision";
|
|
9
|
-
import { MsgFinalizeProvisionTransaction, MsgFinalizeProvisionTransactionResponse } from "./provision-finalize";
|
|
10
|
-
import { MsgRequestTransaction } from "./request";
|
|
11
|
-
import { MsgRequestTransactionResponse } from "./response";
|
|
12
|
-
import { MsgSetTxHash, MsgSetTxHashResponse } from "./set-hash";
|
|
13
|
-
import { MsgSetTxProcess, MsgSetTxProcessResponse } from "./set-process";
|
|
14
|
-
import { MsgUpdateTransferLimitParams, MsgUpdateTransferLimitParamsResponse } from "./transfer-limit";
|
|
15
|
-
import { MsgFinalizeWithdrawTransaction, MsgFinalizeWithdrawTransactionResponse } from "./withdraw";
|
|
16
|
-
/** Msg defines the Msg service. */
|
|
17
|
-
export interface Msg {
|
|
18
|
-
RequestTransaction(request: MsgRequestTransaction): Promise<MsgRequestTransactionResponse>;
|
|
19
|
-
FinalizeTransaction(request: MsgFinalizeTransaction): Promise<MsgFinalizeTransactionResponse>;
|
|
20
|
-
RequestProvisionTransaction(request: MsgRequestProvisionTransaction): Promise<MsgRequestProvisionTransactionResponse>;
|
|
21
|
-
CancelTransaction(request: MsgCancelTransaction): Promise<MsgCancelTransactionResponse>;
|
|
22
|
-
SetTxHash(request: MsgSetTxHash): Promise<MsgSetTxHashResponse>;
|
|
23
|
-
SetTxProcess(request: MsgSetTxProcess): Promise<MsgSetTxProcessResponse>;
|
|
24
|
-
FinalizeProvisionTransaction(request: MsgFinalizeProvisionTransaction): Promise<MsgFinalizeProvisionTransactionResponse>;
|
|
25
|
-
RequestDrainTransaction(request: MsgRequestDrainTransaction): Promise<MsgRequestDrainTransactionResponse>;
|
|
26
|
-
FinalizeDrainTransaction(request: MsgFinalizeDrainTransaction): Promise<MsgFinalizeDrainTransactionResponse>;
|
|
27
|
-
RequestHtlcLock(request: MsgRequestHtlcLock): Promise<MsgRequestHtlcLockResponse>;
|
|
28
|
-
HtlcReclaim(request: MsgHtlcReclaim): Promise<MsgHtlcReclaimResponse>;
|
|
29
|
-
UpdateLiquidityProvisionParams(request: MsgUpdateLiquidityProvisionParams): Promise<MsgUpdateLiquidityProvisionParamsResponse>;
|
|
30
|
-
UpdateTransferLimitParams(request: MsgUpdateTransferLimitParams): Promise<MsgUpdateTransferLimitParamsResponse>;
|
|
31
|
-
FinalizeWithdrawTransaction(request: MsgFinalizeWithdrawTransaction): Promise<MsgFinalizeWithdrawTransactionResponse>;
|
|
32
|
-
}
|
|
33
|
-
interface Rpc {
|
|
34
|
-
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
35
|
-
}
|
|
36
|
-
export declare class MsgClientImpl implements Msg {
|
|
37
|
-
private readonly rpc;
|
|
38
|
-
constructor(rpc: Rpc);
|
|
39
|
-
RequestTransaction(request: MsgRequestTransaction): Promise<MsgRequestTransactionResponse>;
|
|
40
|
-
FinalizeTransaction(request: MsgFinalizeTransaction): Promise<MsgFinalizeTransactionResponse>;
|
|
41
|
-
RequestProvisionTransaction(request: MsgRequestProvisionTransaction): Promise<MsgRequestProvisionTransactionResponse>;
|
|
42
|
-
CancelTransaction(request: MsgCancelTransaction): Promise<MsgCancelTransactionResponse>;
|
|
43
|
-
SetTxHash(request: MsgSetTxHash): Promise<MsgSetTxHashResponse>;
|
|
44
|
-
SetTxProcess(request: MsgSetTxProcess): Promise<MsgSetTxProcessResponse>;
|
|
45
|
-
FinalizeProvisionTransaction(request: MsgFinalizeProvisionTransaction): Promise<MsgFinalizeProvisionTransactionResponse>;
|
|
46
|
-
RequestDrainTransaction(request: MsgRequestDrainTransaction): Promise<MsgRequestDrainTransactionResponse>;
|
|
47
|
-
FinalizeDrainTransaction(request: MsgFinalizeDrainTransaction): Promise<MsgFinalizeDrainTransactionResponse>;
|
|
48
|
-
RequestHtlcLock(request: MsgRequestHtlcLock): Promise<MsgRequestHtlcLockResponse>;
|
|
49
|
-
HtlcReclaim(request: MsgHtlcReclaim): Promise<MsgHtlcReclaimResponse>;
|
|
50
|
-
UpdateLiquidityProvisionParams(request: MsgUpdateLiquidityProvisionParams): Promise<MsgUpdateLiquidityProvisionParamsResponse>;
|
|
51
|
-
UpdateTransferLimitParams(request: MsgUpdateTransferLimitParams): Promise<MsgUpdateTransferLimitParamsResponse>;
|
|
52
|
-
FinalizeWithdrawTransaction(request: MsgFinalizeWithdrawTransaction): Promise<MsgFinalizeWithdrawTransactionResponse>;
|
|
53
|
-
}
|
|
54
|
-
export {};
|
|
@@ -1,117 +0,0 @@
|
|
|
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.MsgClientImpl = void 0;
|
|
7
|
-
const probuff_config_1 = __importDefault(require("../../config/probuff.config"));
|
|
8
|
-
const cancel_1 = require("./cancel");
|
|
9
|
-
const drain_1 = require("./drain");
|
|
10
|
-
const drain_finalize_1 = require("./drain-finalize");
|
|
11
|
-
const finalize_1 = require("./finalize");
|
|
12
|
-
const htlc_lock_1 = require("./htlc-lock");
|
|
13
|
-
const htlc_reclaim_1 = require("./htlc-reclaim");
|
|
14
|
-
const liquidity_provision_1 = require("./liquidity-provision");
|
|
15
|
-
const provision_1 = require("./provision");
|
|
16
|
-
const provision_finalize_1 = require("./provision-finalize");
|
|
17
|
-
const request_1 = require("./request");
|
|
18
|
-
const response_1 = require("./response");
|
|
19
|
-
const set_hash_1 = require("./set-hash");
|
|
20
|
-
const set_process_1 = require("./set-process");
|
|
21
|
-
const transfer_limit_1 = require("./transfer-limit");
|
|
22
|
-
const withdraw_1 = require("./withdraw");
|
|
23
|
-
class MsgClientImpl {
|
|
24
|
-
rpc;
|
|
25
|
-
constructor(rpc) {
|
|
26
|
-
this.rpc = rpc;
|
|
27
|
-
this.RequestTransaction = this.RequestTransaction.bind(this);
|
|
28
|
-
this.FinalizeTransaction = this.FinalizeTransaction.bind(this);
|
|
29
|
-
this.RequestProvisionTransaction =
|
|
30
|
-
this.RequestProvisionTransaction.bind(this);
|
|
31
|
-
this.CancelTransaction = this.CancelTransaction.bind(this);
|
|
32
|
-
this.SetTxHash = this.SetTxHash.bind(this);
|
|
33
|
-
this.SetTxProcess = this.SetTxProcess.bind(this);
|
|
34
|
-
this.FinalizeProvisionTransaction =
|
|
35
|
-
this.FinalizeProvisionTransaction.bind(this);
|
|
36
|
-
this.RequestDrainTransaction = this.RequestDrainTransaction.bind(this);
|
|
37
|
-
this.FinalizeDrainTransaction = this.FinalizeDrainTransaction.bind(this);
|
|
38
|
-
this.RequestHtlcLock = this.RequestHtlcLock.bind(this);
|
|
39
|
-
this.HtlcReclaim = this.HtlcReclaim.bind(this);
|
|
40
|
-
this.UpdateLiquidityProvisionParams =
|
|
41
|
-
this.UpdateLiquidityProvisionParams.bind(this);
|
|
42
|
-
this.UpdateTransferLimitParams = this.UpdateTransferLimitParams.bind(this);
|
|
43
|
-
this.FinalizeWithdrawTransaction =
|
|
44
|
-
this.FinalizeWithdrawTransaction.bind(this);
|
|
45
|
-
}
|
|
46
|
-
RequestTransaction(request) {
|
|
47
|
-
const data = request_1.MsgRequestTransaction.encode(request).finish();
|
|
48
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "RequestTransaction", data);
|
|
49
|
-
return promise.then((data) => response_1.MsgRequestTransactionResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
50
|
-
}
|
|
51
|
-
FinalizeTransaction(request) {
|
|
52
|
-
const data = finalize_1.MsgFinalizeTransaction.encode(request).finish();
|
|
53
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "FinalizeTransaction", data);
|
|
54
|
-
return promise.then((data) => finalize_1.MsgFinalizeTransactionResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
55
|
-
}
|
|
56
|
-
RequestProvisionTransaction(request) {
|
|
57
|
-
const data = provision_1.MsgRequestProvisionTransaction.encode(request).finish();
|
|
58
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "RequestProvisionTransaction", data);
|
|
59
|
-
return promise.then((data) => provision_1.MsgRequestProvisionTransactionResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
60
|
-
}
|
|
61
|
-
CancelTransaction(request) {
|
|
62
|
-
const data = cancel_1.MsgCancelTransaction.encode(request).finish();
|
|
63
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "CancelTransaction", data);
|
|
64
|
-
return promise.then((data) => cancel_1.MsgCancelTransactionResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
65
|
-
}
|
|
66
|
-
SetTxHash(request) {
|
|
67
|
-
const data = set_hash_1.MsgSetTxHash.encode(request).finish();
|
|
68
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "SetTxHash", data);
|
|
69
|
-
return promise.then((data) => set_hash_1.MsgSetTxHashResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
70
|
-
}
|
|
71
|
-
SetTxProcess(request) {
|
|
72
|
-
const data = set_process_1.MsgSetTxProcess.encode(request).finish();
|
|
73
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "SetTxProcess", data);
|
|
74
|
-
return promise.then((data) => set_process_1.MsgSetTxProcessResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
75
|
-
}
|
|
76
|
-
FinalizeProvisionTransaction(request) {
|
|
77
|
-
const data = provision_finalize_1.MsgFinalizeProvisionTransaction.encode(request).finish();
|
|
78
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "FinalizeProvisionTransaction", data);
|
|
79
|
-
return promise.then((data) => provision_finalize_1.MsgFinalizeProvisionTransactionResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
80
|
-
}
|
|
81
|
-
RequestDrainTransaction(request) {
|
|
82
|
-
const data = drain_1.MsgRequestDrainTransaction.encode(request).finish();
|
|
83
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "RequestDrainTransaction", data);
|
|
84
|
-
return promise.then((data) => drain_1.MsgRequestDrainTransactionResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
85
|
-
}
|
|
86
|
-
FinalizeDrainTransaction(request) {
|
|
87
|
-
const data = drain_finalize_1.MsgFinalizeDrainTransaction.encode(request).finish();
|
|
88
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "FinalizeDrainTransaction", data);
|
|
89
|
-
return promise.then((data) => drain_finalize_1.MsgFinalizeDrainTransactionResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
90
|
-
}
|
|
91
|
-
RequestHtlcLock(request) {
|
|
92
|
-
const data = htlc_lock_1.MsgRequestHtlcLock.encode(request).finish();
|
|
93
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "RequestHtlcLock", data);
|
|
94
|
-
return promise.then((data) => htlc_lock_1.MsgRequestHtlcLockResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
95
|
-
}
|
|
96
|
-
HtlcReclaim(request) {
|
|
97
|
-
const data = htlc_reclaim_1.MsgHtlcReclaim.encode(request).finish();
|
|
98
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "HtlcReclaim", data);
|
|
99
|
-
return promise.then((data) => htlc_reclaim_1.MsgHtlcReclaimResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
100
|
-
}
|
|
101
|
-
UpdateLiquidityProvisionParams(request) {
|
|
102
|
-
const data = liquidity_provision_1.MsgUpdateLiquidityProvisionParams.encode(request).finish();
|
|
103
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "UpdateLiquidityProvisionParams", data);
|
|
104
|
-
return promise.then((data) => liquidity_provision_1.MsgUpdateLiquidityProvisionParamsResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
105
|
-
}
|
|
106
|
-
UpdateTransferLimitParams(request) {
|
|
107
|
-
const data = transfer_limit_1.MsgUpdateTransferLimitParams.encode(request).finish();
|
|
108
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "UpdateTransferLimitParams", data);
|
|
109
|
-
return promise.then((data) => transfer_limit_1.MsgUpdateTransferLimitParamsResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
110
|
-
}
|
|
111
|
-
FinalizeWithdrawTransaction(request) {
|
|
112
|
-
const data = withdraw_1.MsgFinalizeWithdrawTransaction.encode(request).finish();
|
|
113
|
-
const promise = this.rpc.request("kimablockchain.transaction.Msg", "FinalizeWithdrawTransaction", data);
|
|
114
|
-
return promise.then((data) => withdraw_1.MsgFinalizeWithdrawTransactionResponse.decode(new probuff_config_1.default.Reader(data)));
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
exports.MsgClientImpl = MsgClientImpl;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import _m0 from "../../config/probuff.config";
|
|
2
|
-
export interface MsgFinalizeProvisionTransaction {
|
|
3
|
-
creator: string;
|
|
4
|
-
txId: number;
|
|
5
|
-
txHash: string;
|
|
6
|
-
success: boolean;
|
|
7
|
-
signedKey: string;
|
|
8
|
-
errReason: string;
|
|
9
|
-
}
|
|
10
|
-
export interface MsgFinalizeProvisionTransactionResponse {
|
|
11
|
-
code: string;
|
|
12
|
-
msg: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const MsgFinalizeProvisionTransaction: {
|
|
15
|
-
encode(message: MsgFinalizeProvisionTransaction, writer?: _m0.Writer): _m0.Writer;
|
|
16
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgFinalizeProvisionTransaction;
|
|
17
|
-
fromJSON(object: any): MsgFinalizeProvisionTransaction;
|
|
18
|
-
toJSON(message: MsgFinalizeProvisionTransaction): unknown;
|
|
19
|
-
fromPartial<I extends {
|
|
20
|
-
creator?: string | undefined;
|
|
21
|
-
txId?: number | undefined;
|
|
22
|
-
txHash?: string | undefined;
|
|
23
|
-
success?: boolean | undefined;
|
|
24
|
-
signedKey?: string | undefined;
|
|
25
|
-
errReason?: string | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
creator?: string | undefined;
|
|
28
|
-
txId?: number | undefined;
|
|
29
|
-
txHash?: string | undefined;
|
|
30
|
-
success?: boolean | undefined;
|
|
31
|
-
signedKey?: string | undefined;
|
|
32
|
-
errReason?: string | undefined;
|
|
33
|
-
} & { [K in Exclude<keyof I, keyof MsgFinalizeProvisionTransaction>]: never; }>(object: I): MsgFinalizeProvisionTransaction;
|
|
34
|
-
};
|
|
35
|
-
export declare const MsgFinalizeProvisionTransactionResponse: {
|
|
36
|
-
encode(message: MsgFinalizeProvisionTransactionResponse, writer?: _m0.Writer): _m0.Writer;
|
|
37
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgFinalizeProvisionTransactionResponse;
|
|
38
|
-
fromJSON(object: any): MsgFinalizeProvisionTransactionResponse;
|
|
39
|
-
toJSON(message: MsgFinalizeProvisionTransactionResponse): unknown;
|
|
40
|
-
fromPartial<I extends {
|
|
41
|
-
code?: string | undefined;
|
|
42
|
-
msg?: string | undefined;
|
|
43
|
-
} & {
|
|
44
|
-
code?: string | undefined;
|
|
45
|
-
msg?: string | undefined;
|
|
46
|
-
} & { [K in Exclude<keyof I, keyof MsgFinalizeProvisionTransactionResponse>]: never; }>(object: I): MsgFinalizeProvisionTransactionResponse;
|
|
47
|
-
};
|
|
@@ -1,155 +0,0 @@
|
|
|
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.MsgFinalizeProvisionTransactionResponse = exports.MsgFinalizeProvisionTransaction = void 0;
|
|
7
|
-
const probuff_config_1 = __importDefault(require("../../config/probuff.config"));
|
|
8
|
-
const utils_1 = require("../../utils");
|
|
9
|
-
function createBaseMsgFinalizeProvisionTransaction() {
|
|
10
|
-
return {
|
|
11
|
-
creator: "",
|
|
12
|
-
txId: 0,
|
|
13
|
-
txHash: "",
|
|
14
|
-
success: false,
|
|
15
|
-
signedKey: "",
|
|
16
|
-
errReason: "",
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
exports.MsgFinalizeProvisionTransaction = {
|
|
20
|
-
encode(message, writer = probuff_config_1.default.Writer.create()) {
|
|
21
|
-
if (message.creator !== "") {
|
|
22
|
-
writer.uint32(10).string(message.creator);
|
|
23
|
-
}
|
|
24
|
-
if (message.txId !== 0) {
|
|
25
|
-
writer.uint32(16).uint64(message.txId);
|
|
26
|
-
}
|
|
27
|
-
if (message.txHash !== "") {
|
|
28
|
-
writer.uint32(26).string(message.txHash);
|
|
29
|
-
}
|
|
30
|
-
if (message.success === true) {
|
|
31
|
-
writer.uint32(32).bool(message.success);
|
|
32
|
-
}
|
|
33
|
-
if (message.signedKey !== "") {
|
|
34
|
-
writer.uint32(42).string(message.signedKey);
|
|
35
|
-
}
|
|
36
|
-
if (message.errReason !== "") {
|
|
37
|
-
writer.uint32(50).string(message.errReason);
|
|
38
|
-
}
|
|
39
|
-
return writer;
|
|
40
|
-
},
|
|
41
|
-
decode(input, length) {
|
|
42
|
-
const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
|
|
43
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
44
|
-
const message = createBaseMsgFinalizeProvisionTransaction();
|
|
45
|
-
while (reader.pos < end) {
|
|
46
|
-
const tag = reader.uint32();
|
|
47
|
-
switch (tag >>> 3) {
|
|
48
|
-
case 1:
|
|
49
|
-
message.creator = reader.string();
|
|
50
|
-
break;
|
|
51
|
-
case 2:
|
|
52
|
-
message.txId = (0, utils_1.longToNumber)(reader.uint64());
|
|
53
|
-
break;
|
|
54
|
-
case 3:
|
|
55
|
-
message.txHash = reader.string();
|
|
56
|
-
break;
|
|
57
|
-
case 4:
|
|
58
|
-
message.success = reader.bool();
|
|
59
|
-
break;
|
|
60
|
-
case 5:
|
|
61
|
-
message.signedKey = reader.string();
|
|
62
|
-
break;
|
|
63
|
-
case 6:
|
|
64
|
-
message.errReason = reader.string();
|
|
65
|
-
break;
|
|
66
|
-
default:
|
|
67
|
-
reader.skipType(tag & 7);
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return message;
|
|
72
|
-
},
|
|
73
|
-
fromJSON(object) {
|
|
74
|
-
return {
|
|
75
|
-
creator: (0, utils_1.isSet)(object.creator) ? String(object.creator) : "",
|
|
76
|
-
txId: (0, utils_1.isSet)(object.txId) ? Number(object.txId) : 0,
|
|
77
|
-
txHash: (0, utils_1.isSet)(object.txHash) ? String(object.txHash) : "",
|
|
78
|
-
success: (0, utils_1.isSet)(object.success) ? Boolean(object.success) : false,
|
|
79
|
-
signedKey: (0, utils_1.isSet)(object.signedKey) ? String(object.signedKey) : "",
|
|
80
|
-
errReason: (0, utils_1.isSet)(object.errReason) ? String(object.errReason) : "",
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
toJSON(message) {
|
|
84
|
-
const obj = {};
|
|
85
|
-
message.creator !== undefined && (obj.creator = message.creator);
|
|
86
|
-
message.txId !== undefined && (obj.txId = Math.round(message.txId));
|
|
87
|
-
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
88
|
-
message.success !== undefined && (obj.success = message.success);
|
|
89
|
-
message.signedKey !== undefined && (obj.signedKey = message.signedKey);
|
|
90
|
-
message.errReason !== undefined && (obj.errReason = message.errReason);
|
|
91
|
-
return obj;
|
|
92
|
-
},
|
|
93
|
-
fromPartial(object) {
|
|
94
|
-
const message = createBaseMsgFinalizeProvisionTransaction();
|
|
95
|
-
message.creator = object.creator ?? "";
|
|
96
|
-
message.txId = object.txId ?? 0;
|
|
97
|
-
message.txHash = object.txHash ?? "";
|
|
98
|
-
message.success = object.success ?? false;
|
|
99
|
-
message.signedKey = object.signedKey ?? "";
|
|
100
|
-
message.errReason = object.errReason ?? "";
|
|
101
|
-
return message;
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
function createBaseMsgFinalizeProvisionTransactionResponse() {
|
|
105
|
-
return { code: "", msg: "" };
|
|
106
|
-
}
|
|
107
|
-
exports.MsgFinalizeProvisionTransactionResponse = {
|
|
108
|
-
encode(message, writer = probuff_config_1.default.Writer.create()) {
|
|
109
|
-
if (message.code !== "") {
|
|
110
|
-
writer.uint32(10).string(message.code);
|
|
111
|
-
}
|
|
112
|
-
if (message.msg !== "") {
|
|
113
|
-
writer.uint32(18).string(message.msg);
|
|
114
|
-
}
|
|
115
|
-
return writer;
|
|
116
|
-
},
|
|
117
|
-
decode(input, length) {
|
|
118
|
-
const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
|
|
119
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
120
|
-
const message = createBaseMsgFinalizeProvisionTransactionResponse();
|
|
121
|
-
while (reader.pos < end) {
|
|
122
|
-
const tag = reader.uint32();
|
|
123
|
-
switch (tag >>> 3) {
|
|
124
|
-
case 1:
|
|
125
|
-
message.code = reader.string();
|
|
126
|
-
break;
|
|
127
|
-
case 2:
|
|
128
|
-
message.msg = reader.string();
|
|
129
|
-
break;
|
|
130
|
-
default:
|
|
131
|
-
reader.skipType(tag & 7);
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return message;
|
|
136
|
-
},
|
|
137
|
-
fromJSON(object) {
|
|
138
|
-
return {
|
|
139
|
-
code: (0, utils_1.isSet)(object.code) ? String(object.code) : "",
|
|
140
|
-
msg: (0, utils_1.isSet)(object.msg) ? String(object.msg) : "",
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
toJSON(message) {
|
|
144
|
-
const obj = {};
|
|
145
|
-
message.code !== undefined && (obj.code = message.code);
|
|
146
|
-
message.msg !== undefined && (obj.msg = message.msg);
|
|
147
|
-
return obj;
|
|
148
|
-
},
|
|
149
|
-
fromPartial(object) {
|
|
150
|
-
const message = createBaseMsgFinalizeProvisionTransactionResponse();
|
|
151
|
-
message.code = object.code ?? "";
|
|
152
|
-
message.msg = object.msg ?? "";
|
|
153
|
-
return message;
|
|
154
|
-
},
|
|
155
|
-
};
|