@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
package/src/kima/tx/drain.ts
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import _m0 from "../../config/probuff.config";
|
|
2
|
-
import { DeepPartial, Exact, isSet, longToNumber } from "../../utils";
|
|
3
|
-
|
|
4
|
-
export interface MsgRequestDrainTransaction {
|
|
5
|
-
creator: string;
|
|
6
|
-
toChain: string;
|
|
7
|
-
toAddress: string;
|
|
8
|
-
symbol: string;
|
|
9
|
-
amount: string;
|
|
10
|
-
options: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface MsgRequestDrainTransactionResponse {
|
|
14
|
-
code: string;
|
|
15
|
-
msg: string;
|
|
16
|
-
txId: number;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function createBaseMsgRequestDrainTransaction(): MsgRequestDrainTransaction {
|
|
20
|
-
return {
|
|
21
|
-
creator: "",
|
|
22
|
-
toChain: "",
|
|
23
|
-
toAddress: "",
|
|
24
|
-
symbol: "",
|
|
25
|
-
amount: "",
|
|
26
|
-
options: "",
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const MsgRequestDrainTransaction = {
|
|
31
|
-
encode(
|
|
32
|
-
message: MsgRequestDrainTransaction,
|
|
33
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
34
|
-
): _m0.Writer {
|
|
35
|
-
if (message.creator !== "") {
|
|
36
|
-
writer.uint32(10).string(message.creator);
|
|
37
|
-
}
|
|
38
|
-
if (message.toChain !== "") {
|
|
39
|
-
writer.uint32(18).string(message.toChain);
|
|
40
|
-
}
|
|
41
|
-
if (message.toAddress !== "") {
|
|
42
|
-
writer.uint32(26).string(message.toAddress);
|
|
43
|
-
}
|
|
44
|
-
if (message.symbol !== "") {
|
|
45
|
-
writer.uint32(34).string(message.symbol);
|
|
46
|
-
}
|
|
47
|
-
if (message.amount !== "") {
|
|
48
|
-
writer.uint32(42).string(message.amount);
|
|
49
|
-
}
|
|
50
|
-
if (message.options !== "") {
|
|
51
|
-
writer.uint32(50).string(message.options);
|
|
52
|
-
}
|
|
53
|
-
return writer;
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
decode(
|
|
57
|
-
input: _m0.Reader | Uint8Array,
|
|
58
|
-
length?: number
|
|
59
|
-
): MsgRequestDrainTransaction {
|
|
60
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
61
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
62
|
-
const message = createBaseMsgRequestDrainTransaction();
|
|
63
|
-
while (reader.pos < end) {
|
|
64
|
-
const tag = reader.uint32();
|
|
65
|
-
switch (tag >>> 3) {
|
|
66
|
-
case 1:
|
|
67
|
-
message.creator = reader.string();
|
|
68
|
-
break;
|
|
69
|
-
case 2:
|
|
70
|
-
message.toChain = reader.string();
|
|
71
|
-
break;
|
|
72
|
-
case 3:
|
|
73
|
-
message.toAddress = reader.string();
|
|
74
|
-
break;
|
|
75
|
-
case 4:
|
|
76
|
-
message.symbol = reader.string();
|
|
77
|
-
break;
|
|
78
|
-
case 5:
|
|
79
|
-
message.amount = reader.string();
|
|
80
|
-
break;
|
|
81
|
-
case 6:
|
|
82
|
-
message.options = reader.string();
|
|
83
|
-
break;
|
|
84
|
-
default:
|
|
85
|
-
reader.skipType(tag & 7);
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return message;
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
fromJSON(object: any): MsgRequestDrainTransaction {
|
|
93
|
-
return {
|
|
94
|
-
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
95
|
-
toChain: isSet(object.toChain) ? String(object.toChain) : "",
|
|
96
|
-
toAddress: isSet(object.toAddress) ? String(object.toAddress) : "",
|
|
97
|
-
symbol: isSet(object.symbol) ? String(object.symbol) : "",
|
|
98
|
-
amount: isSet(object.amount) ? String(object.amount) : "",
|
|
99
|
-
options: isSet(object.options) ? String(object.options) : "",
|
|
100
|
-
};
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
toJSON(message: MsgRequestDrainTransaction): unknown {
|
|
104
|
-
const obj: any = {};
|
|
105
|
-
message.creator !== undefined && (obj.creator = message.creator);
|
|
106
|
-
message.toChain !== undefined && (obj.toChain = message.toChain);
|
|
107
|
-
message.toAddress !== undefined && (obj.toAddress = message.toAddress);
|
|
108
|
-
message.symbol !== undefined && (obj.symbol = message.symbol);
|
|
109
|
-
message.amount !== undefined && (obj.amount = message.amount);
|
|
110
|
-
message.options !== undefined && (obj.options = message.options);
|
|
111
|
-
return obj;
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
fromPartial<I extends Exact<DeepPartial<MsgRequestDrainTransaction>, I>>(
|
|
115
|
-
object: I
|
|
116
|
-
): MsgRequestDrainTransaction {
|
|
117
|
-
const message = createBaseMsgRequestDrainTransaction();
|
|
118
|
-
message.creator = object.creator ?? "";
|
|
119
|
-
message.toChain = object.toChain ?? "";
|
|
120
|
-
message.toAddress = object.toAddress ?? "";
|
|
121
|
-
message.symbol = object.symbol ?? "";
|
|
122
|
-
message.amount = object.amount ?? "";
|
|
123
|
-
message.options = object.options ?? "";
|
|
124
|
-
return message;
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
function createBaseMsgRequestDrainTransactionResponse(): MsgRequestDrainTransactionResponse {
|
|
129
|
-
return { code: "", msg: "", txId: 0 };
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export const MsgRequestDrainTransactionResponse = {
|
|
133
|
-
encode(
|
|
134
|
-
message: MsgRequestDrainTransactionResponse,
|
|
135
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
136
|
-
): _m0.Writer {
|
|
137
|
-
if (message.code !== "") {
|
|
138
|
-
writer.uint32(10).string(message.code);
|
|
139
|
-
}
|
|
140
|
-
if (message.msg !== "") {
|
|
141
|
-
writer.uint32(18).string(message.msg);
|
|
142
|
-
}
|
|
143
|
-
if (message.txId !== 0) {
|
|
144
|
-
writer.uint32(24).uint64(message.txId);
|
|
145
|
-
}
|
|
146
|
-
return writer;
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
decode(
|
|
150
|
-
input: _m0.Reader | Uint8Array,
|
|
151
|
-
length?: number
|
|
152
|
-
): MsgRequestDrainTransactionResponse {
|
|
153
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
154
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
155
|
-
const message = createBaseMsgRequestDrainTransactionResponse();
|
|
156
|
-
while (reader.pos < end) {
|
|
157
|
-
const tag = reader.uint32();
|
|
158
|
-
switch (tag >>> 3) {
|
|
159
|
-
case 1:
|
|
160
|
-
message.code = reader.string();
|
|
161
|
-
break;
|
|
162
|
-
case 2:
|
|
163
|
-
message.msg = reader.string();
|
|
164
|
-
break;
|
|
165
|
-
case 3:
|
|
166
|
-
message.txId = longToNumber(reader.uint64() as Long);
|
|
167
|
-
break;
|
|
168
|
-
default:
|
|
169
|
-
reader.skipType(tag & 7);
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return message;
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
fromJSON(object: any): MsgRequestDrainTransactionResponse {
|
|
177
|
-
return {
|
|
178
|
-
code: isSet(object.code) ? String(object.code) : "",
|
|
179
|
-
msg: isSet(object.msg) ? String(object.msg) : "",
|
|
180
|
-
txId: isSet(object.txId) ? Number(object.txId) : 0,
|
|
181
|
-
};
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
toJSON(message: MsgRequestDrainTransactionResponse): unknown {
|
|
185
|
-
const obj: any = {};
|
|
186
|
-
message.code !== undefined && (obj.code = message.code);
|
|
187
|
-
message.msg !== undefined && (obj.msg = message.msg);
|
|
188
|
-
message.txId !== undefined && (obj.txId = Math.round(message.txId));
|
|
189
|
-
return obj;
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
fromPartial<
|
|
193
|
-
I extends Exact<DeepPartial<MsgRequestDrainTransactionResponse>, I>
|
|
194
|
-
>(object: I): MsgRequestDrainTransactionResponse {
|
|
195
|
-
const message = createBaseMsgRequestDrainTransactionResponse();
|
|
196
|
-
message.code = object.code ?? "";
|
|
197
|
-
message.msg = object.msg ?? "";
|
|
198
|
-
message.txId = object.txId ?? 0;
|
|
199
|
-
return message;
|
|
200
|
-
},
|
|
201
|
-
};
|
package/src/kima/tx/finalize.ts
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import _m0 from "../../config/probuff.config";
|
|
2
|
-
import { DeepPartial, Exact, isSet, longToNumber } from "../../utils";
|
|
3
|
-
|
|
4
|
-
export interface MsgFinalizeTransaction {
|
|
5
|
-
creator: string;
|
|
6
|
-
txId: number;
|
|
7
|
-
txHash: string;
|
|
8
|
-
success: boolean;
|
|
9
|
-
signedKey: string;
|
|
10
|
-
errReason: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface MsgFinalizeTransactionResponse {
|
|
14
|
-
code: string;
|
|
15
|
-
msg: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function createBaseMsgFinalizeTransaction(): MsgFinalizeTransaction {
|
|
19
|
-
return {
|
|
20
|
-
creator: "",
|
|
21
|
-
txId: 0,
|
|
22
|
-
txHash: "",
|
|
23
|
-
success: false,
|
|
24
|
-
signedKey: "",
|
|
25
|
-
errReason: "",
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const MsgFinalizeTransaction = {
|
|
30
|
-
encode(
|
|
31
|
-
message: MsgFinalizeTransaction,
|
|
32
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
33
|
-
): _m0.Writer {
|
|
34
|
-
if (message.creator !== "") {
|
|
35
|
-
writer.uint32(10).string(message.creator);
|
|
36
|
-
}
|
|
37
|
-
if (message.txId !== 0) {
|
|
38
|
-
writer.uint32(16).uint64(message.txId);
|
|
39
|
-
}
|
|
40
|
-
if (message.txHash !== "") {
|
|
41
|
-
writer.uint32(26).string(message.txHash);
|
|
42
|
-
}
|
|
43
|
-
if (message.success === true) {
|
|
44
|
-
writer.uint32(32).bool(message.success);
|
|
45
|
-
}
|
|
46
|
-
if (message.signedKey !== "") {
|
|
47
|
-
writer.uint32(42).string(message.signedKey);
|
|
48
|
-
}
|
|
49
|
-
if (message.errReason !== "") {
|
|
50
|
-
writer.uint32(50).string(message.errReason);
|
|
51
|
-
}
|
|
52
|
-
return writer;
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
decode(
|
|
56
|
-
input: _m0.Reader | Uint8Array,
|
|
57
|
-
length?: number
|
|
58
|
-
): MsgFinalizeTransaction {
|
|
59
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
60
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
61
|
-
const message = createBaseMsgFinalizeTransaction();
|
|
62
|
-
while (reader.pos < end) {
|
|
63
|
-
const tag = reader.uint32();
|
|
64
|
-
switch (tag >>> 3) {
|
|
65
|
-
case 1:
|
|
66
|
-
message.creator = reader.string();
|
|
67
|
-
break;
|
|
68
|
-
case 2:
|
|
69
|
-
message.txId = longToNumber(reader.uint64() as Long);
|
|
70
|
-
break;
|
|
71
|
-
case 3:
|
|
72
|
-
message.txHash = reader.string();
|
|
73
|
-
break;
|
|
74
|
-
case 4:
|
|
75
|
-
message.success = reader.bool();
|
|
76
|
-
break;
|
|
77
|
-
case 5:
|
|
78
|
-
message.signedKey = reader.string();
|
|
79
|
-
break;
|
|
80
|
-
case 6:
|
|
81
|
-
message.errReason = reader.string();
|
|
82
|
-
break;
|
|
83
|
-
default:
|
|
84
|
-
reader.skipType(tag & 7);
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return message;
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
fromJSON(object: any): MsgFinalizeTransaction {
|
|
92
|
-
return {
|
|
93
|
-
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
94
|
-
txId: isSet(object.txId) ? Number(object.txId) : 0,
|
|
95
|
-
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
96
|
-
success: isSet(object.success) ? Boolean(object.success) : false,
|
|
97
|
-
signedKey: isSet(object.signedKey) ? String(object.signedKey) : "",
|
|
98
|
-
errReason: isSet(object.errReason) ? String(object.errReason) : "",
|
|
99
|
-
};
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
toJSON(message: MsgFinalizeTransaction): unknown {
|
|
103
|
-
const obj: any = {};
|
|
104
|
-
message.creator !== undefined && (obj.creator = message.creator);
|
|
105
|
-
message.txId !== undefined && (obj.txId = Math.round(message.txId));
|
|
106
|
-
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
107
|
-
message.success !== undefined && (obj.success = message.success);
|
|
108
|
-
message.signedKey !== undefined && (obj.signedKey = message.signedKey);
|
|
109
|
-
message.errReason !== undefined && (obj.errReason = message.errReason);
|
|
110
|
-
return obj;
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
fromPartial<I extends Exact<DeepPartial<MsgFinalizeTransaction>, I>>(
|
|
114
|
-
object: I
|
|
115
|
-
): MsgFinalizeTransaction {
|
|
116
|
-
const message = createBaseMsgFinalizeTransaction();
|
|
117
|
-
message.creator = object.creator ?? "";
|
|
118
|
-
message.txId = object.txId ?? 0;
|
|
119
|
-
message.txHash = object.txHash ?? "";
|
|
120
|
-
message.success = object.success ?? false;
|
|
121
|
-
message.signedKey = object.signedKey ?? "";
|
|
122
|
-
message.errReason = object.errReason ?? "";
|
|
123
|
-
return message;
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
function createBaseMsgFinalizeTransactionResponse(): MsgFinalizeTransactionResponse {
|
|
128
|
-
return { code: "", msg: "" };
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export const MsgFinalizeTransactionResponse = {
|
|
132
|
-
encode(
|
|
133
|
-
message: MsgFinalizeTransactionResponse,
|
|
134
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
135
|
-
): _m0.Writer {
|
|
136
|
-
if (message.code !== "") {
|
|
137
|
-
writer.uint32(10).string(message.code);
|
|
138
|
-
}
|
|
139
|
-
if (message.msg !== "") {
|
|
140
|
-
writer.uint32(18).string(message.msg);
|
|
141
|
-
}
|
|
142
|
-
return writer;
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
decode(
|
|
146
|
-
input: _m0.Reader | Uint8Array,
|
|
147
|
-
length?: number
|
|
148
|
-
): MsgFinalizeTransactionResponse {
|
|
149
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
150
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
151
|
-
const message = createBaseMsgFinalizeTransactionResponse();
|
|
152
|
-
while (reader.pos < end) {
|
|
153
|
-
const tag = reader.uint32();
|
|
154
|
-
switch (tag >>> 3) {
|
|
155
|
-
case 1:
|
|
156
|
-
message.code = reader.string();
|
|
157
|
-
break;
|
|
158
|
-
case 2:
|
|
159
|
-
message.msg = reader.string();
|
|
160
|
-
break;
|
|
161
|
-
default:
|
|
162
|
-
reader.skipType(tag & 7);
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return message;
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
fromJSON(object: any): MsgFinalizeTransactionResponse {
|
|
170
|
-
return {
|
|
171
|
-
code: isSet(object.code) ? String(object.code) : "",
|
|
172
|
-
msg: isSet(object.msg) ? String(object.msg) : "",
|
|
173
|
-
};
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
toJSON(message: MsgFinalizeTransactionResponse): unknown {
|
|
177
|
-
const obj: any = {};
|
|
178
|
-
message.code !== undefined && (obj.code = message.code);
|
|
179
|
-
message.msg !== undefined && (obj.msg = message.msg);
|
|
180
|
-
return obj;
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
fromPartial<I extends Exact<DeepPartial<MsgFinalizeTransactionResponse>, I>>(
|
|
184
|
-
object: I
|
|
185
|
-
): MsgFinalizeTransactionResponse {
|
|
186
|
-
const message = createBaseMsgFinalizeTransactionResponse();
|
|
187
|
-
message.code = object.code ?? "";
|
|
188
|
-
message.msg = object.msg ?? "";
|
|
189
|
-
return message;
|
|
190
|
-
},
|
|
191
|
-
};
|
package/src/kima/tx/htlc-lock.ts
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import _m0 from "../../config/probuff.config";
|
|
2
|
-
import { DeepPartial, Exact, isSet, longToNumber } from "../../utils";
|
|
3
|
-
|
|
4
|
-
export interface MsgRequestHtlcLock {
|
|
5
|
-
creator: string;
|
|
6
|
-
fromAddress: string;
|
|
7
|
-
senderPubkey: string;
|
|
8
|
-
amount: string;
|
|
9
|
-
htlcTimeout: string;
|
|
10
|
-
txHash: string;
|
|
11
|
-
htlcAddress: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface MsgRequestHtlcLockResponse {}
|
|
15
|
-
|
|
16
|
-
function createBaseMsgRequestHtlcLock(): MsgRequestHtlcLock {
|
|
17
|
-
return {
|
|
18
|
-
creator: "",
|
|
19
|
-
fromAddress: "",
|
|
20
|
-
senderPubkey: "",
|
|
21
|
-
amount: "",
|
|
22
|
-
htlcTimeout: "",
|
|
23
|
-
txHash: "",
|
|
24
|
-
htlcAddress: "",
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const MsgRequestHtlcLock = {
|
|
29
|
-
encode(
|
|
30
|
-
message: MsgRequestHtlcLock,
|
|
31
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
32
|
-
): _m0.Writer {
|
|
33
|
-
if (message.creator !== "") {
|
|
34
|
-
writer.uint32(10).string(message.creator);
|
|
35
|
-
}
|
|
36
|
-
if (message.fromAddress !== "") {
|
|
37
|
-
writer.uint32(18).string(message.fromAddress);
|
|
38
|
-
}
|
|
39
|
-
if (message.senderPubkey !== "") {
|
|
40
|
-
writer.uint32(26).string(message.senderPubkey);
|
|
41
|
-
}
|
|
42
|
-
if (message.amount !== "") {
|
|
43
|
-
writer.uint32(34).string(message.amount);
|
|
44
|
-
}
|
|
45
|
-
if (message.htlcTimeout !== "") {
|
|
46
|
-
writer.uint32(42).string(message.htlcTimeout);
|
|
47
|
-
}
|
|
48
|
-
if (message.txHash !== "") {
|
|
49
|
-
writer.uint32(50).string(message.txHash);
|
|
50
|
-
}
|
|
51
|
-
if (message.htlcAddress !== "") {
|
|
52
|
-
writer.uint32(58).string(message.htlcAddress);
|
|
53
|
-
}
|
|
54
|
-
return writer;
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgRequestHtlcLock {
|
|
58
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
59
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
60
|
-
const message = createBaseMsgRequestHtlcLock();
|
|
61
|
-
while (reader.pos < end) {
|
|
62
|
-
const tag = reader.uint32();
|
|
63
|
-
switch (tag >>> 3) {
|
|
64
|
-
case 1:
|
|
65
|
-
message.creator = reader.string();
|
|
66
|
-
break;
|
|
67
|
-
case 2:
|
|
68
|
-
message.fromAddress = reader.string();
|
|
69
|
-
break;
|
|
70
|
-
case 3:
|
|
71
|
-
message.senderPubkey = reader.string();
|
|
72
|
-
break;
|
|
73
|
-
case 4:
|
|
74
|
-
message.amount = reader.string();
|
|
75
|
-
break;
|
|
76
|
-
case 5:
|
|
77
|
-
message.htlcTimeout = reader.string();
|
|
78
|
-
break;
|
|
79
|
-
case 6:
|
|
80
|
-
message.txHash = reader.string();
|
|
81
|
-
break;
|
|
82
|
-
case 7:
|
|
83
|
-
message.htlcAddress = reader.string();
|
|
84
|
-
break;
|
|
85
|
-
default:
|
|
86
|
-
reader.skipType(tag & 7);
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return message;
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
fromJSON(object: any): MsgRequestHtlcLock {
|
|
94
|
-
return {
|
|
95
|
-
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
96
|
-
fromAddress: isSet(object.fromAddress) ? String(object.fromAddress) : "",
|
|
97
|
-
senderPubkey: isSet(object.senderPubkey)
|
|
98
|
-
? String(object.senderPubkey)
|
|
99
|
-
: "",
|
|
100
|
-
amount: isSet(object.amount) ? String(object.amount) : "",
|
|
101
|
-
htlcTimeout: isSet(object.htlcTimeout) ? String(object.htlcTimeout) : "",
|
|
102
|
-
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
103
|
-
htlcAddress: isSet(object.htlcAddress) ? String(object.htlcAddress) : "",
|
|
104
|
-
};
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
toJSON(message: MsgRequestHtlcLock): unknown {
|
|
108
|
-
const obj: any = {};
|
|
109
|
-
message.creator !== undefined && (obj.creator = message.creator);
|
|
110
|
-
message.fromAddress !== undefined &&
|
|
111
|
-
(obj.fromAddress = message.fromAddress);
|
|
112
|
-
message.senderPubkey !== undefined &&
|
|
113
|
-
(obj.senderPubkey = message.senderPubkey);
|
|
114
|
-
message.amount !== undefined && (obj.amount = message.amount);
|
|
115
|
-
message.htlcTimeout !== undefined &&
|
|
116
|
-
(obj.htlcTimeout = message.htlcTimeout);
|
|
117
|
-
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
118
|
-
message.htlcAddress !== undefined &&
|
|
119
|
-
(obj.htlcAddress = message.htlcAddress);
|
|
120
|
-
return obj;
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
fromPartial<I extends Exact<DeepPartial<MsgRequestHtlcLock>, I>>(
|
|
124
|
-
object: I
|
|
125
|
-
): MsgRequestHtlcLock {
|
|
126
|
-
const message = createBaseMsgRequestHtlcLock();
|
|
127
|
-
message.creator = object.creator ?? "";
|
|
128
|
-
message.fromAddress = object.fromAddress ?? "";
|
|
129
|
-
message.senderPubkey = object.senderPubkey ?? "";
|
|
130
|
-
message.amount = object.amount ?? "";
|
|
131
|
-
message.htlcTimeout = object.htlcTimeout ?? "";
|
|
132
|
-
message.txHash = object.txHash ?? "";
|
|
133
|
-
message.htlcAddress = object.htlcAddress ?? "";
|
|
134
|
-
return message;
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
function createBaseMsgRequestHtlcLockResponse(): MsgRequestHtlcLockResponse {
|
|
139
|
-
return {};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export const MsgRequestHtlcLockResponse = {
|
|
143
|
-
encode(
|
|
144
|
-
_: MsgRequestHtlcLockResponse,
|
|
145
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
146
|
-
): _m0.Writer {
|
|
147
|
-
return writer;
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
decode(
|
|
151
|
-
input: _m0.Reader | Uint8Array,
|
|
152
|
-
length?: number
|
|
153
|
-
): MsgRequestHtlcLockResponse {
|
|
154
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
155
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
156
|
-
const message = createBaseMsgRequestHtlcLockResponse();
|
|
157
|
-
while (reader.pos < end) {
|
|
158
|
-
const tag = reader.uint32();
|
|
159
|
-
switch (tag >>> 3) {
|
|
160
|
-
default:
|
|
161
|
-
reader.skipType(tag & 7);
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return message;
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
fromJSON(_: any): MsgRequestHtlcLockResponse {
|
|
169
|
-
return {};
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
toJSON(_: MsgRequestHtlcLockResponse): unknown {
|
|
173
|
-
const obj: any = {};
|
|
174
|
-
return obj;
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
fromPartial<I extends Exact<DeepPartial<MsgRequestHtlcLockResponse>, I>>(
|
|
178
|
-
_: I
|
|
179
|
-
): MsgRequestHtlcLockResponse {
|
|
180
|
-
const message = createBaseMsgRequestHtlcLockResponse();
|
|
181
|
-
return message;
|
|
182
|
-
},
|
|
183
|
-
};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import _m0 from "../../config/probuff.config";
|
|
2
|
-
import { DeepPartial, Exact, isSet, longToNumber } from "../../utils";
|
|
3
|
-
|
|
4
|
-
export interface MsgHtlcReclaim {
|
|
5
|
-
creator: string;
|
|
6
|
-
txHash: string;
|
|
7
|
-
senderAddress: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface MsgHtlcReclaimResponse {}
|
|
11
|
-
|
|
12
|
-
function createBaseMsgHtlcReclaim(): MsgHtlcReclaim {
|
|
13
|
-
return { creator: "", txHash: "", senderAddress: "" };
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const MsgHtlcReclaim = {
|
|
17
|
-
encode(
|
|
18
|
-
message: MsgHtlcReclaim,
|
|
19
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
20
|
-
): _m0.Writer {
|
|
21
|
-
if (message.creator !== "") {
|
|
22
|
-
writer.uint32(10).string(message.creator);
|
|
23
|
-
}
|
|
24
|
-
if (message.txHash !== "") {
|
|
25
|
-
writer.uint32(18).string(message.txHash);
|
|
26
|
-
}
|
|
27
|
-
if (message.senderAddress !== "") {
|
|
28
|
-
writer.uint32(26).string(message.senderAddress);
|
|
29
|
-
}
|
|
30
|
-
return writer;
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgHtlcReclaim {
|
|
34
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
35
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
36
|
-
const message = createBaseMsgHtlcReclaim();
|
|
37
|
-
while (reader.pos < end) {
|
|
38
|
-
const tag = reader.uint32();
|
|
39
|
-
switch (tag >>> 3) {
|
|
40
|
-
case 1:
|
|
41
|
-
message.creator = reader.string();
|
|
42
|
-
break;
|
|
43
|
-
case 2:
|
|
44
|
-
message.txHash = reader.string();
|
|
45
|
-
break;
|
|
46
|
-
case 3:
|
|
47
|
-
message.senderAddress = reader.string();
|
|
48
|
-
break;
|
|
49
|
-
default:
|
|
50
|
-
reader.skipType(tag & 7);
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return message;
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
fromJSON(object: any): MsgHtlcReclaim {
|
|
58
|
-
return {
|
|
59
|
-
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
60
|
-
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
61
|
-
senderAddress: isSet(object.senderAddress)
|
|
62
|
-
? String(object.senderAddress)
|
|
63
|
-
: "",
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
toJSON(message: MsgHtlcReclaim): unknown {
|
|
68
|
-
const obj: any = {};
|
|
69
|
-
message.creator !== undefined && (obj.creator = message.creator);
|
|
70
|
-
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
71
|
-
message.senderAddress !== undefined &&
|
|
72
|
-
(obj.senderAddress = message.senderAddress);
|
|
73
|
-
return obj;
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
fromPartial<I extends Exact<DeepPartial<MsgHtlcReclaim>, I>>(
|
|
77
|
-
object: I
|
|
78
|
-
): MsgHtlcReclaim {
|
|
79
|
-
const message = createBaseMsgHtlcReclaim();
|
|
80
|
-
message.creator = object.creator ?? "";
|
|
81
|
-
message.txHash = object.txHash ?? "";
|
|
82
|
-
message.senderAddress = object.senderAddress ?? "";
|
|
83
|
-
return message;
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
function createBaseMsgHtlcReclaimResponse(): MsgHtlcReclaimResponse {
|
|
88
|
-
return {};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export const MsgHtlcReclaimResponse = {
|
|
92
|
-
encode(
|
|
93
|
-
_: MsgHtlcReclaimResponse,
|
|
94
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
95
|
-
): _m0.Writer {
|
|
96
|
-
return writer;
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
decode(
|
|
100
|
-
input: _m0.Reader | Uint8Array,
|
|
101
|
-
length?: number
|
|
102
|
-
): MsgHtlcReclaimResponse {
|
|
103
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
104
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
105
|
-
const message = createBaseMsgHtlcReclaimResponse();
|
|
106
|
-
while (reader.pos < end) {
|
|
107
|
-
const tag = reader.uint32();
|
|
108
|
-
switch (tag >>> 3) {
|
|
109
|
-
default:
|
|
110
|
-
reader.skipType(tag & 7);
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return message;
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
fromJSON(_: any): MsgHtlcReclaimResponse {
|
|
118
|
-
return {};
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
toJSON(_: MsgHtlcReclaimResponse): unknown {
|
|
122
|
-
const obj: any = {};
|
|
123
|
-
return obj;
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
fromPartial<I extends Exact<DeepPartial<MsgHtlcReclaimResponse>, I>>(
|
|
127
|
-
_: I
|
|
128
|
-
): MsgHtlcReclaimResponse {
|
|
129
|
-
const message = createBaseMsgHtlcReclaimResponse();
|
|
130
|
-
return message;
|
|
131
|
-
},
|
|
132
|
-
};
|
package/src/kima/tx/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const protobufPackage = "kimablockchain.transaction";
|