@kimafinance/kima-transaction-api 1.0.22-beta.1 → 1.0.24-beta.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/build/index.js CHANGED
@@ -55,6 +55,7 @@ async function submitKimaTransaction({ originChain, originAddress, targetChain,
55
55
  creator: firstAccount.address,
56
56
  txId,
57
57
  txHash: result.transactionHash,
58
+ txType: "request_transaction"
58
59
  });
59
60
  console.log(msg);
60
61
  let hashResult;
@@ -11,7 +11,7 @@ const tx_1 = require("./tx");
11
11
  dotenv_1.default.config();
12
12
  const defaultFee = {
13
13
  amount: [],
14
- gas: "2000000",
14
+ gas: "4000000",
15
15
  };
16
16
  const types = [
17
17
  ["/kimablockchain.transaction.MsgRequestTransaction", tx_1.MsgRequestTransaction],
@@ -62,6 +62,8 @@ export interface MsgSetTxHash {
62
62
  creator: string;
63
63
  txId: number;
64
64
  txHash: string;
65
+ /** request_transaction, request_provision_transaction, request_drain_transaction */
66
+ txType: string;
65
67
  }
66
68
  export interface MsgSetTxHashResponse {
67
69
  code: string;
@@ -72,6 +74,8 @@ export interface MsgSetTxProcess {
72
74
  txId: number;
73
75
  timestamp: number;
74
76
  msgId: string;
77
+ /** request_transaction, request_provision_transaction, request_drain_transaction */
78
+ txType: string;
75
79
  }
76
80
  export interface MsgSetTxProcessResponse {
77
81
  }
@@ -274,10 +278,12 @@ export declare const MsgSetTxHash: {
274
278
  creator?: string | undefined;
275
279
  txId?: number | undefined;
276
280
  txHash?: string | undefined;
281
+ txType?: string | undefined;
277
282
  } & {
278
283
  creator?: string | undefined;
279
284
  txId?: number | undefined;
280
285
  txHash?: string | undefined;
286
+ txType?: string | undefined;
281
287
  } & { [K in Exclude<keyof I, keyof MsgSetTxHash>]: never; }>(object: I): MsgSetTxHash;
282
288
  };
283
289
  export declare const MsgSetTxHashResponse: {
@@ -303,11 +309,13 @@ export declare const MsgSetTxProcess: {
303
309
  txId?: number | undefined;
304
310
  timestamp?: number | undefined;
305
311
  msgId?: string | undefined;
312
+ txType?: string | undefined;
306
313
  } & {
307
314
  creator?: string | undefined;
308
315
  txId?: number | undefined;
309
316
  timestamp?: number | undefined;
310
317
  msgId?: string | undefined;
318
+ txType?: string | undefined;
311
319
  } & { [K in Exclude<keyof I, keyof MsgSetTxProcess>]: never; }>(object: I): MsgSetTxProcess;
312
320
  };
313
321
  export declare const MsgSetTxProcessResponse: {
package/build/kima/tx.js CHANGED
@@ -691,7 +691,7 @@ exports.MsgCancelTransactionResponse = {
691
691
  },
692
692
  };
693
693
  function createBaseMsgSetTxHash() {
694
- return { creator: "", txId: 0, txHash: "" };
694
+ return { creator: "", txId: 0, txHash: "", txType: "" };
695
695
  }
696
696
  exports.MsgSetTxHash = {
697
697
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -704,6 +704,9 @@ exports.MsgSetTxHash = {
704
704
  if (message.txHash !== "") {
705
705
  writer.uint32(26).string(message.txHash);
706
706
  }
707
+ if (message.txType !== "") {
708
+ writer.uint32(34).string(message.txType);
709
+ }
707
710
  return writer;
708
711
  },
709
712
  decode(input, length) {
@@ -722,6 +725,9 @@ exports.MsgSetTxHash = {
722
725
  case 3:
723
726
  message.txHash = reader.string();
724
727
  break;
728
+ case 4:
729
+ message.txType = reader.string();
730
+ break;
725
731
  default:
726
732
  reader.skipType(tag & 7);
727
733
  break;
@@ -734,6 +740,7 @@ exports.MsgSetTxHash = {
734
740
  creator: isSet(object.creator) ? String(object.creator) : "",
735
741
  txId: isSet(object.txId) ? Number(object.txId) : 0,
736
742
  txHash: isSet(object.txHash) ? String(object.txHash) : "",
743
+ txType: isSet(object.txType) ? String(object.txType) : "",
737
744
  };
738
745
  },
739
746
  toJSON(message) {
@@ -741,6 +748,7 @@ exports.MsgSetTxHash = {
741
748
  message.creator !== undefined && (obj.creator = message.creator);
742
749
  message.txId !== undefined && (obj.txId = Math.round(message.txId));
743
750
  message.txHash !== undefined && (obj.txHash = message.txHash);
751
+ message.txType !== undefined && (obj.txType = message.txType);
744
752
  return obj;
745
753
  },
746
754
  fromPartial(object) {
@@ -748,6 +756,7 @@ exports.MsgSetTxHash = {
748
756
  message.creator = object.creator ?? "";
749
757
  message.txId = object.txId ?? 0;
750
758
  message.txHash = object.txHash ?? "";
759
+ message.txType = object.txType ?? "";
751
760
  return message;
752
761
  },
753
762
  };
@@ -801,7 +810,7 @@ exports.MsgSetTxHashResponse = {
801
810
  },
802
811
  };
803
812
  function createBaseMsgSetTxProcess() {
804
- return { creator: "", txId: 0, timestamp: 0, msgId: "" };
813
+ return { creator: "", txId: 0, timestamp: 0, msgId: "", txType: "" };
805
814
  }
806
815
  exports.MsgSetTxProcess = {
807
816
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -817,6 +826,9 @@ exports.MsgSetTxProcess = {
817
826
  if (message.msgId !== "") {
818
827
  writer.uint32(34).string(message.msgId);
819
828
  }
829
+ if (message.txType !== "") {
830
+ writer.uint32(42).string(message.txType);
831
+ }
820
832
  return writer;
821
833
  },
822
834
  decode(input, length) {
@@ -838,6 +850,9 @@ exports.MsgSetTxProcess = {
838
850
  case 4:
839
851
  message.msgId = reader.string();
840
852
  break;
853
+ case 5:
854
+ message.txType = reader.string();
855
+ break;
841
856
  default:
842
857
  reader.skipType(tag & 7);
843
858
  break;
@@ -851,6 +866,7 @@ exports.MsgSetTxProcess = {
851
866
  txId: isSet(object.txId) ? Number(object.txId) : 0,
852
867
  timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
853
868
  msgId: isSet(object.msgId) ? String(object.msgId) : "",
869
+ txType: isSet(object.txType) ? String(object.txType) : "",
854
870
  };
855
871
  },
856
872
  toJSON(message) {
@@ -859,6 +875,7 @@ exports.MsgSetTxProcess = {
859
875
  message.txId !== undefined && (obj.txId = Math.round(message.txId));
860
876
  message.timestamp !== undefined && (obj.timestamp = Math.round(message.timestamp));
861
877
  message.msgId !== undefined && (obj.msgId = message.msgId);
878
+ message.txType !== undefined && (obj.txType = message.txType);
862
879
  return obj;
863
880
  },
864
881
  fromPartial(object) {
@@ -867,6 +884,7 @@ exports.MsgSetTxProcess = {
867
884
  message.txId = object.txId ?? 0;
868
885
  message.timestamp = object.timestamp ?? 0;
869
886
  message.msgId = object.msgId ?? "";
887
+ message.txType = object.txType ?? "";
870
888
  return message;
871
889
  },
872
890
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kimafinance/kima-transaction-api",
3
- "version": "1.0.22-beta.1",
3
+ "version": "1.0.24-beta.1",
4
4
  "description": "A wrapper around Kima's API, enabling sending and monitoring transactions (Beta version)",
5
5
  "repository": "https://github.com/kima-finance/kima-transaction-api",
6
6
  "author": "",
package/src/index.ts CHANGED
@@ -80,6 +80,7 @@ export async function submitKimaTransaction({
80
80
  creator: firstAccount.address,
81
81
  txId,
82
82
  txHash: result.transactionHash,
83
+ txType: "request_transaction"
83
84
  });
84
85
 
85
86
  console.log(msg);
@@ -7,7 +7,7 @@ dotenv.config();
7
7
 
8
8
  const defaultFee = {
9
9
  amount: [],
10
- gas: "2000000",
10
+ gas: "4000000",
11
11
  };
12
12
 
13
13
  interface SignAndBroadcastOptions {
package/src/kima/tx.ts CHANGED
@@ -76,6 +76,8 @@ export interface MsgSetTxHash {
76
76
  creator: string;
77
77
  txId: number;
78
78
  txHash: string;
79
+ /** request_transaction, request_provision_transaction, request_drain_transaction */
80
+ txType: string;
79
81
  }
80
82
 
81
83
  export interface MsgSetTxHashResponse {
@@ -88,6 +90,8 @@ export interface MsgSetTxProcess {
88
90
  txId: number;
89
91
  timestamp: number;
90
92
  msgId: string;
93
+ /** request_transaction, request_provision_transaction, request_drain_transaction */
94
+ txType: string;
91
95
  }
92
96
 
93
97
  export interface MsgSetTxProcessResponse {
@@ -876,7 +880,7 @@ export const MsgCancelTransactionResponse = {
876
880
  };
877
881
 
878
882
  function createBaseMsgSetTxHash(): MsgSetTxHash {
879
- return { creator: "", txId: 0, txHash: "" };
883
+ return { creator: "", txId: 0, txHash: "", txType: "" };
880
884
  }
881
885
 
882
886
  export const MsgSetTxHash = {
@@ -890,6 +894,9 @@ export const MsgSetTxHash = {
890
894
  if (message.txHash !== "") {
891
895
  writer.uint32(26).string(message.txHash);
892
896
  }
897
+ if (message.txType !== "") {
898
+ writer.uint32(34).string(message.txType);
899
+ }
893
900
  return writer;
894
901
  },
895
902
 
@@ -909,6 +916,9 @@ export const MsgSetTxHash = {
909
916
  case 3:
910
917
  message.txHash = reader.string();
911
918
  break;
919
+ case 4:
920
+ message.txType = reader.string();
921
+ break;
912
922
  default:
913
923
  reader.skipType(tag & 7);
914
924
  break;
@@ -922,6 +932,7 @@ export const MsgSetTxHash = {
922
932
  creator: isSet(object.creator) ? String(object.creator) : "",
923
933
  txId: isSet(object.txId) ? Number(object.txId) : 0,
924
934
  txHash: isSet(object.txHash) ? String(object.txHash) : "",
935
+ txType: isSet(object.txType) ? String(object.txType) : "",
925
936
  };
926
937
  },
927
938
 
@@ -930,6 +941,7 @@ export const MsgSetTxHash = {
930
941
  message.creator !== undefined && (obj.creator = message.creator);
931
942
  message.txId !== undefined && (obj.txId = Math.round(message.txId));
932
943
  message.txHash !== undefined && (obj.txHash = message.txHash);
944
+ message.txType !== undefined && (obj.txType = message.txType);
933
945
  return obj;
934
946
  },
935
947
 
@@ -938,6 +950,7 @@ export const MsgSetTxHash = {
938
950
  message.creator = object.creator ?? "";
939
951
  message.txId = object.txId ?? 0;
940
952
  message.txHash = object.txHash ?? "";
953
+ message.txType = object.txType ?? "";
941
954
  return message;
942
955
  },
943
956
  };
@@ -998,7 +1011,7 @@ export const MsgSetTxHashResponse = {
998
1011
  };
999
1012
 
1000
1013
  function createBaseMsgSetTxProcess(): MsgSetTxProcess {
1001
- return { creator: "", txId: 0, timestamp: 0, msgId: "" };
1014
+ return { creator: "", txId: 0, timestamp: 0, msgId: "", txType: "" };
1002
1015
  }
1003
1016
 
1004
1017
  export const MsgSetTxProcess = {
@@ -1015,6 +1028,9 @@ export const MsgSetTxProcess = {
1015
1028
  if (message.msgId !== "") {
1016
1029
  writer.uint32(34).string(message.msgId);
1017
1030
  }
1031
+ if (message.txType !== "") {
1032
+ writer.uint32(42).string(message.txType);
1033
+ }
1018
1034
  return writer;
1019
1035
  },
1020
1036
 
@@ -1037,6 +1053,9 @@ export const MsgSetTxProcess = {
1037
1053
  case 4:
1038
1054
  message.msgId = reader.string();
1039
1055
  break;
1056
+ case 5:
1057
+ message.txType = reader.string();
1058
+ break;
1040
1059
  default:
1041
1060
  reader.skipType(tag & 7);
1042
1061
  break;
@@ -1051,6 +1070,7 @@ export const MsgSetTxProcess = {
1051
1070
  txId: isSet(object.txId) ? Number(object.txId) : 0,
1052
1071
  timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
1053
1072
  msgId: isSet(object.msgId) ? String(object.msgId) : "",
1073
+ txType: isSet(object.txType) ? String(object.txType) : "",
1054
1074
  };
1055
1075
  },
1056
1076
 
@@ -1060,6 +1080,7 @@ export const MsgSetTxProcess = {
1060
1080
  message.txId !== undefined && (obj.txId = Math.round(message.txId));
1061
1081
  message.timestamp !== undefined && (obj.timestamp = Math.round(message.timestamp));
1062
1082
  message.msgId !== undefined && (obj.msgId = message.msgId);
1083
+ message.txType !== undefined && (obj.txType = message.txType);
1063
1084
  return obj;
1064
1085
  },
1065
1086
 
@@ -1069,6 +1090,7 @@ export const MsgSetTxProcess = {
1069
1090
  message.txId = object.txId ?? 0;
1070
1091
  message.timestamp = object.timestamp ?? 0;
1071
1092
  message.msgId = object.msgId ?? "";
1093
+ message.txType = object.txType ?? "";
1072
1094
  return message;
1073
1095
  },
1074
1096
  };