@kimafinance/kima-transaction-api 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -5
- package/build/api/htlc-lock.d.ts +23 -0
- package/build/api/htlc-lock.js +37 -0
- package/build/api/htlc-reclaim.d.ts +14 -0
- package/build/api/htlc-reclaim.js +28 -0
- package/build/api/submit.d.ts +54 -0
- package/build/api/submit.js +94 -0
- package/build/config/global-this.config.d.ts +2 -0
- package/build/config/global-this.config.js +18 -0
- package/build/config/probuff.config.d.ts +2 -0
- package/build/config/probuff.config.js +12 -0
- package/build/index.d.ts +3 -50
- package/build/index.js +17 -121
- package/build/kima/common.d.ts +4 -1
- package/build/kima/common.js +12 -9
- package/build/kima/tx/cancel.d.ts +35 -0
- package/build/kima/tx/cancel.js +115 -0
- package/build/kima/tx/drain-finalize.d.ts +47 -0
- package/build/kima/tx/drain-finalize.js +155 -0
- package/build/kima/tx/drain.d.ts +50 -0
- package/build/kima/tx/drain.js +164 -0
- package/build/kima/tx/finalize.d.ts +47 -0
- package/build/kima/tx/finalize.js +155 -0
- package/build/kima/tx/htlc-lock.d.ts +42 -0
- package/build/kima/tx/htlc-lock.js +152 -0
- package/build/kima/tx/htlc-reclaim.d.ts +30 -0
- package/build/kima/tx/htlc-reclaim.js +105 -0
- package/build/kima/tx/index.d.ts +1 -0
- package/build/kima/tx/index.js +4 -0
- package/build/kima/tx/liquidity-provision.d.ts +30 -0
- package/build/kima/tx/liquidity-provision.js +102 -0
- package/build/kima/tx/message-service.d.ts +54 -0
- package/build/kima/tx/message-service.js +117 -0
- package/build/kima/tx/provision-finalize.d.ts +47 -0
- package/build/kima/tx/provision-finalize.js +155 -0
- package/build/kima/tx/provision.d.ts +70 -0
- package/build/kima/tx/provision.js +230 -0
- package/build/kima/tx/request.d.ts +63 -0
- package/build/kima/tx/request.js +222 -0
- package/build/kima/tx/response.d.ts +21 -0
- package/build/kima/tx/response.js +69 -0
- package/build/kima/tx/rpc.d.ts +0 -0
- package/build/kima/tx/rpc.js +1 -0
- package/build/kima/tx/set-hash.d.ts +42 -0
- package/build/kima/tx/set-hash.js +130 -0
- package/build/kima/tx/set-process.d.ts +37 -0
- package/build/kima/tx/set-process.js +121 -0
- package/build/kima/tx/transfer-limit.d.ts +30 -0
- package/build/kima/tx/transfer-limit.js +102 -0
- package/build/kima/tx/withdraw.d.ts +47 -0
- package/build/kima/tx/withdraw.js +155 -0
- package/build/utils.d.ts +17 -0
- package/build/utils.js +49 -0
- package/package.json +10 -10
- package/src/api/htlc-lock.ts +57 -0
- package/src/api/htlc-reclaim.ts +39 -0
- package/src/api/submit.ts +132 -0
- package/src/config/global-this.config.ts +20 -0
- package/src/config/probuff.config.ts +9 -0
- package/src/index.ts +3 -206
- package/src/kima/common.ts +5 -12
- package/src/kima/tx/cancel.ts +147 -0
- package/src/kima/tx/drain-finalize.ts +191 -0
- package/src/kima/tx/drain.ts +201 -0
- package/src/kima/tx/finalize.ts +191 -0
- package/src/kima/tx/htlc-lock.ts +183 -0
- package/src/kima/tx/htlc-reclaim.ts +132 -0
- package/src/kima/tx/index.ts +1 -0
- package/src/kima/tx/liquidity-provision.ts +132 -0
- package/src/kima/tx/message-service.ts +278 -0
- package/src/kima/tx/provision-finalize.ts +191 -0
- package/src/kima/tx/provision.ts +279 -0
- package/src/kima/tx/request.ts +256 -0
- package/src/kima/tx/response.ts +83 -0
- package/src/kima/tx/rpc.ts +0 -0
- package/src/kima/tx/set-hash.ts +162 -0
- package/src/kima/tx/set-process.ts +151 -0
- package/src/kima/tx/transfer-limit.ts +132 -0
- package/src/kima/tx/withdraw.ts +191 -0
- package/src/utils.ts +67 -0
- package/build/kima/tx.d.ts +0 -674
- package/build/kima/tx.js +0 -2170
- package/src/kima/tx.ts +0 -2945
|
@@ -0,0 +1,115 @@
|
|
|
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.MsgCancelTransactionResponse = exports.MsgCancelTransaction = void 0;
|
|
7
|
+
const probuff_config_1 = __importDefault(require("../../config/probuff.config"));
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
function createBaseMsgCancelTransaction() {
|
|
10
|
+
return { creator: "", transactionId: "" };
|
|
11
|
+
}
|
|
12
|
+
exports.MsgCancelTransaction = {
|
|
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.transactionId !== "") {
|
|
18
|
+
writer.uint32(18).string(message.transactionId);
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
},
|
|
22
|
+
decode(input, length) {
|
|
23
|
+
const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
|
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
+
const message = createBaseMsgCancelTransaction();
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
case 1:
|
|
30
|
+
message.creator = reader.string();
|
|
31
|
+
break;
|
|
32
|
+
case 2:
|
|
33
|
+
message.transactionId = reader.string();
|
|
34
|
+
break;
|
|
35
|
+
default:
|
|
36
|
+
reader.skipType(tag & 7);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return message;
|
|
41
|
+
},
|
|
42
|
+
fromJSON(object) {
|
|
43
|
+
return {
|
|
44
|
+
creator: (0, utils_1.isSet)(object.creator) ? String(object.creator) : "",
|
|
45
|
+
transactionId: (0, utils_1.isSet)(object.transactionId)
|
|
46
|
+
? String(object.transactionId)
|
|
47
|
+
: "",
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
toJSON(message) {
|
|
51
|
+
const obj = {};
|
|
52
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
53
|
+
message.transactionId !== undefined &&
|
|
54
|
+
(obj.transactionId = message.transactionId);
|
|
55
|
+
return obj;
|
|
56
|
+
},
|
|
57
|
+
fromPartial(object) {
|
|
58
|
+
const message = createBaseMsgCancelTransaction();
|
|
59
|
+
message.creator = object.creator ?? "";
|
|
60
|
+
message.transactionId = object.transactionId ?? "";
|
|
61
|
+
return message;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
function createBaseMsgCancelTransactionResponse() {
|
|
65
|
+
return { code: "", msg: "" };
|
|
66
|
+
}
|
|
67
|
+
exports.MsgCancelTransactionResponse = {
|
|
68
|
+
encode(message, writer = probuff_config_1.default.Writer.create()) {
|
|
69
|
+
if (message.code !== "") {
|
|
70
|
+
writer.uint32(10).string(message.code);
|
|
71
|
+
}
|
|
72
|
+
if (message.msg !== "") {
|
|
73
|
+
writer.uint32(18).string(message.msg);
|
|
74
|
+
}
|
|
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 = createBaseMsgCancelTransactionResponse();
|
|
81
|
+
while (reader.pos < end) {
|
|
82
|
+
const tag = reader.uint32();
|
|
83
|
+
switch (tag >>> 3) {
|
|
84
|
+
case 1:
|
|
85
|
+
message.code = reader.string();
|
|
86
|
+
break;
|
|
87
|
+
case 2:
|
|
88
|
+
message.msg = reader.string();
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
reader.skipType(tag & 7);
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return message;
|
|
96
|
+
},
|
|
97
|
+
fromJSON(object) {
|
|
98
|
+
return {
|
|
99
|
+
code: (0, utils_1.isSet)(object.code) ? String(object.code) : "",
|
|
100
|
+
msg: (0, utils_1.isSet)(object.msg) ? String(object.msg) : "",
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
toJSON(message) {
|
|
104
|
+
const obj = {};
|
|
105
|
+
message.code !== undefined && (obj.code = message.code);
|
|
106
|
+
message.msg !== undefined && (obj.msg = message.msg);
|
|
107
|
+
return obj;
|
|
108
|
+
},
|
|
109
|
+
fromPartial(object) {
|
|
110
|
+
const message = createBaseMsgCancelTransactionResponse();
|
|
111
|
+
message.code = object.code ?? "";
|
|
112
|
+
message.msg = object.msg ?? "";
|
|
113
|
+
return message;
|
|
114
|
+
},
|
|
115
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _m0 from "../../config/probuff.config";
|
|
2
|
+
export interface MsgFinalizeDrainTransaction {
|
|
3
|
+
creator: string;
|
|
4
|
+
txId: number;
|
|
5
|
+
txHash: string;
|
|
6
|
+
success: boolean;
|
|
7
|
+
signedKey: string;
|
|
8
|
+
errReason: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MsgFinalizeDrainTransactionResponse {
|
|
11
|
+
code: string;
|
|
12
|
+
msg: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const MsgFinalizeDrainTransaction: {
|
|
15
|
+
encode(message: MsgFinalizeDrainTransaction, writer?: _m0.Writer): _m0.Writer;
|
|
16
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgFinalizeDrainTransaction;
|
|
17
|
+
fromJSON(object: any): MsgFinalizeDrainTransaction;
|
|
18
|
+
toJSON(message: MsgFinalizeDrainTransaction): 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 MsgFinalizeDrainTransaction>]: never; }>(object: I): MsgFinalizeDrainTransaction;
|
|
34
|
+
};
|
|
35
|
+
export declare const MsgFinalizeDrainTransactionResponse: {
|
|
36
|
+
encode(message: MsgFinalizeDrainTransactionResponse, writer?: _m0.Writer): _m0.Writer;
|
|
37
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgFinalizeDrainTransactionResponse;
|
|
38
|
+
fromJSON(object: any): MsgFinalizeDrainTransactionResponse;
|
|
39
|
+
toJSON(message: MsgFinalizeDrainTransactionResponse): 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 MsgFinalizeDrainTransactionResponse>]: never; }>(object: I): MsgFinalizeDrainTransactionResponse;
|
|
47
|
+
};
|
|
@@ -0,0 +1,155 @@
|
|
|
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.MsgFinalizeDrainTransactionResponse = exports.MsgFinalizeDrainTransaction = void 0;
|
|
7
|
+
const probuff_config_1 = __importDefault(require("../../config/probuff.config"));
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
function createBaseMsgFinalizeDrainTransaction() {
|
|
10
|
+
return {
|
|
11
|
+
creator: "",
|
|
12
|
+
txId: 0,
|
|
13
|
+
txHash: "",
|
|
14
|
+
success: false,
|
|
15
|
+
signedKey: "",
|
|
16
|
+
errReason: "",
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.MsgFinalizeDrainTransaction = {
|
|
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 = createBaseMsgFinalizeDrainTransaction();
|
|
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 = createBaseMsgFinalizeDrainTransaction();
|
|
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 createBaseMsgFinalizeDrainTransactionResponse() {
|
|
105
|
+
return { code: "", msg: "" };
|
|
106
|
+
}
|
|
107
|
+
exports.MsgFinalizeDrainTransactionResponse = {
|
|
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 = createBaseMsgFinalizeDrainTransactionResponse();
|
|
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 = createBaseMsgFinalizeDrainTransactionResponse();
|
|
151
|
+
message.code = object.code ?? "";
|
|
152
|
+
message.msg = object.msg ?? "";
|
|
153
|
+
return message;
|
|
154
|
+
},
|
|
155
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _m0 from "../../config/probuff.config";
|
|
2
|
+
export interface MsgRequestDrainTransaction {
|
|
3
|
+
creator: string;
|
|
4
|
+
toChain: string;
|
|
5
|
+
toAddress: string;
|
|
6
|
+
symbol: string;
|
|
7
|
+
amount: string;
|
|
8
|
+
options: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MsgRequestDrainTransactionResponse {
|
|
11
|
+
code: string;
|
|
12
|
+
msg: string;
|
|
13
|
+
txId: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const MsgRequestDrainTransaction: {
|
|
16
|
+
encode(message: MsgRequestDrainTransaction, writer?: _m0.Writer): _m0.Writer;
|
|
17
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgRequestDrainTransaction;
|
|
18
|
+
fromJSON(object: any): MsgRequestDrainTransaction;
|
|
19
|
+
toJSON(message: MsgRequestDrainTransaction): unknown;
|
|
20
|
+
fromPartial<I extends {
|
|
21
|
+
creator?: string | undefined;
|
|
22
|
+
toChain?: string | undefined;
|
|
23
|
+
toAddress?: string | undefined;
|
|
24
|
+
symbol?: string | undefined;
|
|
25
|
+
amount?: string | undefined;
|
|
26
|
+
options?: string | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
creator?: string | undefined;
|
|
29
|
+
toChain?: string | undefined;
|
|
30
|
+
toAddress?: string | undefined;
|
|
31
|
+
symbol?: string | undefined;
|
|
32
|
+
amount?: string | undefined;
|
|
33
|
+
options?: string | undefined;
|
|
34
|
+
} & { [K in Exclude<keyof I, keyof MsgRequestDrainTransaction>]: never; }>(object: I): MsgRequestDrainTransaction;
|
|
35
|
+
};
|
|
36
|
+
export declare const MsgRequestDrainTransactionResponse: {
|
|
37
|
+
encode(message: MsgRequestDrainTransactionResponse, writer?: _m0.Writer): _m0.Writer;
|
|
38
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgRequestDrainTransactionResponse;
|
|
39
|
+
fromJSON(object: any): MsgRequestDrainTransactionResponse;
|
|
40
|
+
toJSON(message: MsgRequestDrainTransactionResponse): unknown;
|
|
41
|
+
fromPartial<I extends {
|
|
42
|
+
code?: string | undefined;
|
|
43
|
+
msg?: string | undefined;
|
|
44
|
+
txId?: number | undefined;
|
|
45
|
+
} & {
|
|
46
|
+
code?: string | undefined;
|
|
47
|
+
msg?: string | undefined;
|
|
48
|
+
txId?: number | undefined;
|
|
49
|
+
} & { [K in Exclude<keyof I, keyof MsgRequestDrainTransactionResponse>]: never; }>(object: I): MsgRequestDrainTransactionResponse;
|
|
50
|
+
};
|
|
@@ -0,0 +1,164 @@
|
|
|
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.MsgRequestDrainTransactionResponse = exports.MsgRequestDrainTransaction = void 0;
|
|
7
|
+
const probuff_config_1 = __importDefault(require("../../config/probuff.config"));
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
function createBaseMsgRequestDrainTransaction() {
|
|
10
|
+
return {
|
|
11
|
+
creator: "",
|
|
12
|
+
toChain: "",
|
|
13
|
+
toAddress: "",
|
|
14
|
+
symbol: "",
|
|
15
|
+
amount: "",
|
|
16
|
+
options: "",
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.MsgRequestDrainTransaction = {
|
|
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.toChain !== "") {
|
|
25
|
+
writer.uint32(18).string(message.toChain);
|
|
26
|
+
}
|
|
27
|
+
if (message.toAddress !== "") {
|
|
28
|
+
writer.uint32(26).string(message.toAddress);
|
|
29
|
+
}
|
|
30
|
+
if (message.symbol !== "") {
|
|
31
|
+
writer.uint32(34).string(message.symbol);
|
|
32
|
+
}
|
|
33
|
+
if (message.amount !== "") {
|
|
34
|
+
writer.uint32(42).string(message.amount);
|
|
35
|
+
}
|
|
36
|
+
if (message.options !== "") {
|
|
37
|
+
writer.uint32(50).string(message.options);
|
|
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 = createBaseMsgRequestDrainTransaction();
|
|
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.toChain = reader.string();
|
|
53
|
+
break;
|
|
54
|
+
case 3:
|
|
55
|
+
message.toAddress = reader.string();
|
|
56
|
+
break;
|
|
57
|
+
case 4:
|
|
58
|
+
message.symbol = reader.string();
|
|
59
|
+
break;
|
|
60
|
+
case 5:
|
|
61
|
+
message.amount = reader.string();
|
|
62
|
+
break;
|
|
63
|
+
case 6:
|
|
64
|
+
message.options = 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
|
+
toChain: (0, utils_1.isSet)(object.toChain) ? String(object.toChain) : "",
|
|
77
|
+
toAddress: (0, utils_1.isSet)(object.toAddress) ? String(object.toAddress) : "",
|
|
78
|
+
symbol: (0, utils_1.isSet)(object.symbol) ? String(object.symbol) : "",
|
|
79
|
+
amount: (0, utils_1.isSet)(object.amount) ? String(object.amount) : "",
|
|
80
|
+
options: (0, utils_1.isSet)(object.options) ? String(object.options) : "",
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
toJSON(message) {
|
|
84
|
+
const obj = {};
|
|
85
|
+
message.creator !== undefined && (obj.creator = message.creator);
|
|
86
|
+
message.toChain !== undefined && (obj.toChain = message.toChain);
|
|
87
|
+
message.toAddress !== undefined && (obj.toAddress = message.toAddress);
|
|
88
|
+
message.symbol !== undefined && (obj.symbol = message.symbol);
|
|
89
|
+
message.amount !== undefined && (obj.amount = message.amount);
|
|
90
|
+
message.options !== undefined && (obj.options = message.options);
|
|
91
|
+
return obj;
|
|
92
|
+
},
|
|
93
|
+
fromPartial(object) {
|
|
94
|
+
const message = createBaseMsgRequestDrainTransaction();
|
|
95
|
+
message.creator = object.creator ?? "";
|
|
96
|
+
message.toChain = object.toChain ?? "";
|
|
97
|
+
message.toAddress = object.toAddress ?? "";
|
|
98
|
+
message.symbol = object.symbol ?? "";
|
|
99
|
+
message.amount = object.amount ?? "";
|
|
100
|
+
message.options = object.options ?? "";
|
|
101
|
+
return message;
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
function createBaseMsgRequestDrainTransactionResponse() {
|
|
105
|
+
return { code: "", msg: "", txId: 0 };
|
|
106
|
+
}
|
|
107
|
+
exports.MsgRequestDrainTransactionResponse = {
|
|
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
|
+
if (message.txId !== 0) {
|
|
116
|
+
writer.uint32(24).uint64(message.txId);
|
|
117
|
+
}
|
|
118
|
+
return writer;
|
|
119
|
+
},
|
|
120
|
+
decode(input, length) {
|
|
121
|
+
const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
|
|
122
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
123
|
+
const message = createBaseMsgRequestDrainTransactionResponse();
|
|
124
|
+
while (reader.pos < end) {
|
|
125
|
+
const tag = reader.uint32();
|
|
126
|
+
switch (tag >>> 3) {
|
|
127
|
+
case 1:
|
|
128
|
+
message.code = reader.string();
|
|
129
|
+
break;
|
|
130
|
+
case 2:
|
|
131
|
+
message.msg = reader.string();
|
|
132
|
+
break;
|
|
133
|
+
case 3:
|
|
134
|
+
message.txId = (0, utils_1.longToNumber)(reader.uint64());
|
|
135
|
+
break;
|
|
136
|
+
default:
|
|
137
|
+
reader.skipType(tag & 7);
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return message;
|
|
142
|
+
},
|
|
143
|
+
fromJSON(object) {
|
|
144
|
+
return {
|
|
145
|
+
code: (0, utils_1.isSet)(object.code) ? String(object.code) : "",
|
|
146
|
+
msg: (0, utils_1.isSet)(object.msg) ? String(object.msg) : "",
|
|
147
|
+
txId: (0, utils_1.isSet)(object.txId) ? Number(object.txId) : 0,
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
toJSON(message) {
|
|
151
|
+
const obj = {};
|
|
152
|
+
message.code !== undefined && (obj.code = message.code);
|
|
153
|
+
message.msg !== undefined && (obj.msg = message.msg);
|
|
154
|
+
message.txId !== undefined && (obj.txId = Math.round(message.txId));
|
|
155
|
+
return obj;
|
|
156
|
+
},
|
|
157
|
+
fromPartial(object) {
|
|
158
|
+
const message = createBaseMsgRequestDrainTransactionResponse();
|
|
159
|
+
message.code = object.code ?? "";
|
|
160
|
+
message.msg = object.msg ?? "";
|
|
161
|
+
message.txId = object.txId ?? 0;
|
|
162
|
+
return message;
|
|
163
|
+
},
|
|
164
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _m0 from "../../config/probuff.config";
|
|
2
|
+
export interface MsgFinalizeTransaction {
|
|
3
|
+
creator: string;
|
|
4
|
+
txId: number;
|
|
5
|
+
txHash: string;
|
|
6
|
+
success: boolean;
|
|
7
|
+
signedKey: string;
|
|
8
|
+
errReason: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MsgFinalizeTransactionResponse {
|
|
11
|
+
code: string;
|
|
12
|
+
msg: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const MsgFinalizeTransaction: {
|
|
15
|
+
encode(message: MsgFinalizeTransaction, writer?: _m0.Writer): _m0.Writer;
|
|
16
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgFinalizeTransaction;
|
|
17
|
+
fromJSON(object: any): MsgFinalizeTransaction;
|
|
18
|
+
toJSON(message: MsgFinalizeTransaction): 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 MsgFinalizeTransaction>]: never; }>(object: I): MsgFinalizeTransaction;
|
|
34
|
+
};
|
|
35
|
+
export declare const MsgFinalizeTransactionResponse: {
|
|
36
|
+
encode(message: MsgFinalizeTransactionResponse, writer?: _m0.Writer): _m0.Writer;
|
|
37
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgFinalizeTransactionResponse;
|
|
38
|
+
fromJSON(object: any): MsgFinalizeTransactionResponse;
|
|
39
|
+
toJSON(message: MsgFinalizeTransactionResponse): 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 MsgFinalizeTransactionResponse>]: never; }>(object: I): MsgFinalizeTransactionResponse;
|
|
47
|
+
};
|