@kimafinance/kima-transaction-api 1.4.1 → 1.4.3

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.
Files changed (89) hide show
  1. package/README.md +37 -3
  2. package/build/index.d.ts +6 -3
  3. package/build/index.js +91 -17
  4. package/build/kima/common.d.ts +3 -4
  5. package/build/kima/common.js +15 -12
  6. package/build/kima/swap_tx.d.ts +387 -0
  7. package/build/kima/swap_tx.js +1109 -0
  8. package/build/kima/transfer_tx.d.ts +674 -0
  9. package/build/kima/transfer_tx.js +2170 -0
  10. package/build/types.d.ts +68 -0
  11. package/build/types.js +34 -0
  12. package/package.json +10 -10
  13. package/src/index.ts +167 -3
  14. package/src/kima/common.ts +22 -5
  15. package/src/kima/swap_tx.ts +1353 -0
  16. package/src/kima/transfer_tx.ts +2945 -0
  17. package/src/types.ts +78 -0
  18. package/build/api/htlc-lock.d.ts +0 -23
  19. package/build/api/htlc-lock.js +0 -37
  20. package/build/api/htlc-reclaim.d.ts +0 -14
  21. package/build/api/htlc-reclaim.js +0 -28
  22. package/build/api/submit.d.ts +0 -54
  23. package/build/api/submit.js +0 -94
  24. package/build/config/global-this.config.d.ts +0 -2
  25. package/build/config/global-this.config.js +0 -18
  26. package/build/config/probuff.config.d.ts +0 -2
  27. package/build/config/probuff.config.js +0 -12
  28. package/build/kima/tx/cancel.d.ts +0 -35
  29. package/build/kima/tx/cancel.js +0 -115
  30. package/build/kima/tx/drain-finalize.d.ts +0 -47
  31. package/build/kima/tx/drain-finalize.js +0 -155
  32. package/build/kima/tx/drain.d.ts +0 -50
  33. package/build/kima/tx/drain.js +0 -164
  34. package/build/kima/tx/finalize.d.ts +0 -47
  35. package/build/kima/tx/finalize.js +0 -155
  36. package/build/kima/tx/htlc-lock.d.ts +0 -42
  37. package/build/kima/tx/htlc-lock.js +0 -152
  38. package/build/kima/tx/htlc-reclaim.d.ts +0 -30
  39. package/build/kima/tx/htlc-reclaim.js +0 -105
  40. package/build/kima/tx/index.d.ts +0 -1
  41. package/build/kima/tx/index.js +0 -4
  42. package/build/kima/tx/liquidity-provision.d.ts +0 -30
  43. package/build/kima/tx/liquidity-provision.js +0 -102
  44. package/build/kima/tx/message-service.d.ts +0 -54
  45. package/build/kima/tx/message-service.js +0 -117
  46. package/build/kima/tx/provision-finalize.d.ts +0 -47
  47. package/build/kima/tx/provision-finalize.js +0 -155
  48. package/build/kima/tx/provision.d.ts +0 -70
  49. package/build/kima/tx/provision.js +0 -230
  50. package/build/kima/tx/request.d.ts +0 -63
  51. package/build/kima/tx/request.js +0 -222
  52. package/build/kima/tx/response.d.ts +0 -21
  53. package/build/kima/tx/response.js +0 -69
  54. package/build/kima/tx/rpc.d.ts +0 -0
  55. package/build/kima/tx/rpc.js +0 -1
  56. package/build/kima/tx/set-hash.d.ts +0 -42
  57. package/build/kima/tx/set-hash.js +0 -130
  58. package/build/kima/tx/set-process.d.ts +0 -37
  59. package/build/kima/tx/set-process.js +0 -121
  60. package/build/kima/tx/transfer-limit.d.ts +0 -30
  61. package/build/kima/tx/transfer-limit.js +0 -102
  62. package/build/kima/tx/withdraw.d.ts +0 -47
  63. package/build/kima/tx/withdraw.js +0 -155
  64. package/build/utils.d.ts +0 -17
  65. package/build/utils.js +0 -49
  66. package/src/api/htlc-lock.ts +0 -57
  67. package/src/api/htlc-reclaim.ts +0 -39
  68. package/src/api/submit.ts +0 -132
  69. package/src/config/global-this.config.ts +0 -20
  70. package/src/config/probuff.config.ts +0 -9
  71. package/src/kima/tx/cancel.ts +0 -147
  72. package/src/kima/tx/drain-finalize.ts +0 -191
  73. package/src/kima/tx/drain.ts +0 -201
  74. package/src/kima/tx/finalize.ts +0 -191
  75. package/src/kima/tx/htlc-lock.ts +0 -183
  76. package/src/kima/tx/htlc-reclaim.ts +0 -132
  77. package/src/kima/tx/index.ts +0 -1
  78. package/src/kima/tx/liquidity-provision.ts +0 -132
  79. package/src/kima/tx/message-service.ts +0 -278
  80. package/src/kima/tx/provision-finalize.ts +0 -191
  81. package/src/kima/tx/provision.ts +0 -279
  82. package/src/kima/tx/request.ts +0 -256
  83. package/src/kima/tx/response.ts +0 -83
  84. package/src/kima/tx/rpc.ts +0 -0
  85. package/src/kima/tx/set-hash.ts +0 -162
  86. package/src/kima/tx/set-process.ts +0 -151
  87. package/src/kima/tx/transfer-limit.ts +0 -132
  88. package/src/kima/tx/withdraw.ts +0 -191
  89. package/src/utils.ts +0 -67
@@ -1,152 +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.MsgRequestHtlcLockResponse = exports.MsgRequestHtlcLock = void 0;
7
- const probuff_config_1 = __importDefault(require("../../config/probuff.config"));
8
- const utils_1 = require("../../utils");
9
- function createBaseMsgRequestHtlcLock() {
10
- return {
11
- creator: "",
12
- fromAddress: "",
13
- senderPubkey: "",
14
- amount: "",
15
- htlcTimeout: "",
16
- txHash: "",
17
- htlcAddress: "",
18
- };
19
- }
20
- exports.MsgRequestHtlcLock = {
21
- encode(message, writer = probuff_config_1.default.Writer.create()) {
22
- if (message.creator !== "") {
23
- writer.uint32(10).string(message.creator);
24
- }
25
- if (message.fromAddress !== "") {
26
- writer.uint32(18).string(message.fromAddress);
27
- }
28
- if (message.senderPubkey !== "") {
29
- writer.uint32(26).string(message.senderPubkey);
30
- }
31
- if (message.amount !== "") {
32
- writer.uint32(34).string(message.amount);
33
- }
34
- if (message.htlcTimeout !== "") {
35
- writer.uint32(42).string(message.htlcTimeout);
36
- }
37
- if (message.txHash !== "") {
38
- writer.uint32(50).string(message.txHash);
39
- }
40
- if (message.htlcAddress !== "") {
41
- writer.uint32(58).string(message.htlcAddress);
42
- }
43
- return writer;
44
- },
45
- decode(input, length) {
46
- const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
47
- let end = length === undefined ? reader.len : reader.pos + length;
48
- const message = createBaseMsgRequestHtlcLock();
49
- while (reader.pos < end) {
50
- const tag = reader.uint32();
51
- switch (tag >>> 3) {
52
- case 1:
53
- message.creator = reader.string();
54
- break;
55
- case 2:
56
- message.fromAddress = reader.string();
57
- break;
58
- case 3:
59
- message.senderPubkey = reader.string();
60
- break;
61
- case 4:
62
- message.amount = reader.string();
63
- break;
64
- case 5:
65
- message.htlcTimeout = reader.string();
66
- break;
67
- case 6:
68
- message.txHash = reader.string();
69
- break;
70
- case 7:
71
- message.htlcAddress = reader.string();
72
- break;
73
- default:
74
- reader.skipType(tag & 7);
75
- break;
76
- }
77
- }
78
- return message;
79
- },
80
- fromJSON(object) {
81
- return {
82
- creator: (0, utils_1.isSet)(object.creator) ? String(object.creator) : "",
83
- fromAddress: (0, utils_1.isSet)(object.fromAddress) ? String(object.fromAddress) : "",
84
- senderPubkey: (0, utils_1.isSet)(object.senderPubkey)
85
- ? String(object.senderPubkey)
86
- : "",
87
- amount: (0, utils_1.isSet)(object.amount) ? String(object.amount) : "",
88
- htlcTimeout: (0, utils_1.isSet)(object.htlcTimeout) ? String(object.htlcTimeout) : "",
89
- txHash: (0, utils_1.isSet)(object.txHash) ? String(object.txHash) : "",
90
- htlcAddress: (0, utils_1.isSet)(object.htlcAddress) ? String(object.htlcAddress) : "",
91
- };
92
- },
93
- toJSON(message) {
94
- const obj = {};
95
- message.creator !== undefined && (obj.creator = message.creator);
96
- message.fromAddress !== undefined &&
97
- (obj.fromAddress = message.fromAddress);
98
- message.senderPubkey !== undefined &&
99
- (obj.senderPubkey = message.senderPubkey);
100
- message.amount !== undefined && (obj.amount = message.amount);
101
- message.htlcTimeout !== undefined &&
102
- (obj.htlcTimeout = message.htlcTimeout);
103
- message.txHash !== undefined && (obj.txHash = message.txHash);
104
- message.htlcAddress !== undefined &&
105
- (obj.htlcAddress = message.htlcAddress);
106
- return obj;
107
- },
108
- fromPartial(object) {
109
- const message = createBaseMsgRequestHtlcLock();
110
- message.creator = object.creator ?? "";
111
- message.fromAddress = object.fromAddress ?? "";
112
- message.senderPubkey = object.senderPubkey ?? "";
113
- message.amount = object.amount ?? "";
114
- message.htlcTimeout = object.htlcTimeout ?? "";
115
- message.txHash = object.txHash ?? "";
116
- message.htlcAddress = object.htlcAddress ?? "";
117
- return message;
118
- },
119
- };
120
- function createBaseMsgRequestHtlcLockResponse() {
121
- return {};
122
- }
123
- exports.MsgRequestHtlcLockResponse = {
124
- encode(_, writer = probuff_config_1.default.Writer.create()) {
125
- return writer;
126
- },
127
- decode(input, length) {
128
- const reader = input instanceof probuff_config_1.default.Reader ? input : new probuff_config_1.default.Reader(input);
129
- let end = length === undefined ? reader.len : reader.pos + length;
130
- const message = createBaseMsgRequestHtlcLockResponse();
131
- while (reader.pos < end) {
132
- const tag = reader.uint32();
133
- switch (tag >>> 3) {
134
- default:
135
- reader.skipType(tag & 7);
136
- break;
137
- }
138
- }
139
- return message;
140
- },
141
- fromJSON(_) {
142
- return {};
143
- },
144
- toJSON(_) {
145
- const obj = {};
146
- return obj;
147
- },
148
- fromPartial(_) {
149
- const message = createBaseMsgRequestHtlcLockResponse();
150
- return message;
151
- },
152
- };
@@ -1,30 +0,0 @@
1
- import _m0 from "../../config/probuff.config";
2
- export interface MsgHtlcReclaim {
3
- creator: string;
4
- txHash: string;
5
- senderAddress: string;
6
- }
7
- export interface MsgHtlcReclaimResponse {
8
- }
9
- export declare const MsgHtlcReclaim: {
10
- encode(message: MsgHtlcReclaim, writer?: _m0.Writer): _m0.Writer;
11
- decode(input: _m0.Reader | Uint8Array, length?: number): MsgHtlcReclaim;
12
- fromJSON(object: any): MsgHtlcReclaim;
13
- toJSON(message: MsgHtlcReclaim): unknown;
14
- fromPartial<I extends {
15
- creator?: string | undefined;
16
- txHash?: string | undefined;
17
- senderAddress?: string | undefined;
18
- } & {
19
- creator?: string | undefined;
20
- txHash?: string | undefined;
21
- senderAddress?: string | undefined;
22
- } & { [K in Exclude<keyof I, keyof MsgHtlcReclaim>]: never; }>(object: I): MsgHtlcReclaim;
23
- };
24
- export declare const MsgHtlcReclaimResponse: {
25
- encode(_: MsgHtlcReclaimResponse, writer?: _m0.Writer): _m0.Writer;
26
- decode(input: _m0.Reader | Uint8Array, length?: number): MsgHtlcReclaimResponse;
27
- fromJSON(_: any): MsgHtlcReclaimResponse;
28
- toJSON(_: MsgHtlcReclaimResponse): unknown;
29
- fromPartial<I extends {} & {} & { [K in Exclude<keyof I, never>]: never; }>(_: I): MsgHtlcReclaimResponse;
30
- };
@@ -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
- };
@@ -1 +0,0 @@
1
- export declare const protobufPackage = "kimablockchain.transaction";
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.protobufPackage = void 0;
4
- exports.protobufPackage = "kimablockchain.transaction";
@@ -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
- };