@injectivelabs/sdk-ts 1.20.15 → 1.20.16

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 (173) hide show
  1. package/dist/cjs/{AbacusGrpcApi-xrQAr-fH.cjs → AbacusGrpcApi-CIMZFwl6.cjs} +2 -2
  2. package/dist/cjs/{BaseGrpcConsumer-DHYpiqn5.cjs → BaseGrpcConsumer-BCGDaVy8.cjs} +24 -24
  3. package/dist/cjs/{BaseGrpcConsumer-CgIbwIvJ.d.cts → BaseGrpcConsumer-CrbGIyOg.d.cts} +1 -1
  4. package/dist/cjs/{BaseIndexerGrpcConsumer-GHyeUHdH.cjs → BaseIndexerGrpcConsumer-CoMGNooL.cjs} +1 -1
  5. package/dist/cjs/{ChainGrpcExchangeApi-MspF9deW.cjs → ChainGrpcExchangeApi-ChrfB9cv.cjs} +4 -4
  6. package/dist/cjs/{ChainRestTendermintApi-TZoqfN-E.cjs → ChainRestTendermintApi-utYZ9cZL.cjs} +7 -6
  7. package/dist/cjs/{DirectEthSecp256k1Wallet-D_rQWJR4.cjs → DirectEthSecp256k1Wallet-CbsATe2T.cjs} +14 -14
  8. package/dist/cjs/{ExecArgNeptuneWithdraw-ChJ7QUin.cjs → ExecArgNeptuneWithdraw-Sqk_zPQx.cjs} +7 -6
  9. package/dist/cjs/{IndexerGrpcWeb3GwApi-Cj9gotHt.cjs → IndexerGrpcWeb3GwApi-Di6ko7ub.cjs} +11 -10
  10. package/dist/cjs/{MsgBase-CAiwUyBz.cjs → MsgBase-BJmf0IHm.cjs} +1 -1
  11. package/dist/cjs/{MsgSetDenomMetadata-BDNtlSxx.cjs → MsgSetDenomMetadata-ycI5AKU4.cjs} +33 -31
  12. package/dist/cjs/{OLPGrpcApi-BqcMEdma.cjs → OLPGrpcApi-fdkKcWVJ.cjs} +2 -2
  13. package/dist/cjs/{QueryTradingStrategyContractTotalStrategies-CbfuOlxa.cjs → QueryTradingStrategyContractTotalStrategies-CIlJC3Cq.cjs} +29 -29
  14. package/dist/cjs/{StreamManagerV2-Bo7m_nUZ.cjs → StreamManagerV2-B3ar_Wxz.cjs} +72 -71
  15. package/dist/cjs/{TcAbacusGrpcApi-7a0vFnWK.cjs → TcAbacusGrpcApi-B7wlTqfE.cjs} +2 -2
  16. package/dist/cjs/{accounts-gu3aR3dJ.cjs → accounts-pXwUOxWb.cjs} +38 -35
  17. package/dist/cjs/address-light-B5-DYwES.d.cts +14 -0
  18. package/dist/cjs/address-light-C_a6b8yF.cjs +114 -0
  19. package/dist/cjs/{chain-lo3Cyc0M.cjs → chain-D--KOL1m.cjs} +36 -35
  20. package/dist/cjs/client/abacus.cjs +6 -5
  21. package/dist/cjs/client/abacus.d.cts +5 -4
  22. package/dist/cjs/client/chain.cjs +14 -9
  23. package/dist/cjs/client/chain.d.cts +14 -9
  24. package/dist/cjs/client/indexer.cjs +15 -10
  25. package/dist/cjs/client/indexer.d.cts +14 -9
  26. package/dist/cjs/client/olp.cjs +7 -6
  27. package/dist/cjs/client/olp.d.cts +5 -4
  28. package/dist/cjs/client/tcAbacus.cjs +6 -5
  29. package/dist/cjs/client/tcAbacus.d.cts +5 -4
  30. package/dist/cjs/client/wasm.cjs +17 -12
  31. package/dist/cjs/client/wasm.d.cts +4 -3
  32. package/dist/cjs/coins-DRrEtaSG.cjs +20 -0
  33. package/dist/cjs/coins-JbAREn6e.d.cts +7 -0
  34. package/dist/cjs/constants-DSzHAIp3.d.cts +10 -0
  35. package/dist/cjs/constants-tPGACRGC.cjs +53 -0
  36. package/dist/cjs/core/accounts.cjs +9 -5
  37. package/dist/cjs/core/accounts.d.cts +14 -9
  38. package/dist/cjs/core/modules.cjs +20 -15
  39. package/dist/cjs/core/modules.d.cts +14 -9
  40. package/dist/cjs/core/tx.cjs +17 -12
  41. package/dist/cjs/core/tx.d.cts +14 -9
  42. package/dist/cjs/cosmjs.cjs +18 -13
  43. package/dist/cjs/cosmjs.d.cts +2 -2
  44. package/dist/cjs/encoding-light-CrQ0cICT.d.cts +18 -0
  45. package/dist/cjs/encoding-light-D96nxVLW.cjs +176 -0
  46. package/dist/cjs/exports.cjs +18 -13
  47. package/dist/cjs/exports.d.cts +2 -2
  48. package/dist/cjs/{index-DiXeIFAS.d.cts → index-BINBkEIb.d.cts} +1 -1
  49. package/dist/cjs/{index-D3pv75E_.d.cts → index-BaPRB8bU.d.cts} +1 -1
  50. package/dist/cjs/{index-uJW9LUqV.d.cts → index-C4k2HkhI.d.cts} +1 -1
  51. package/dist/{esm/index-DCxzFRMk.d.ts → cjs/index-CBmgjh-q.d.cts} +3 -146
  52. package/dist/cjs/{index-DfNpbUN6.d.cts → index-DE9mGZGH.d.cts} +1 -1
  53. package/dist/{esm/index-Bw9qjGRX.d.ts → cjs/index-eG3KUAK0.d.cts} +2 -1
  54. package/dist/cjs/{index-Ckay0hId.d.cts → index-i4yKnGpI.d.cts} +2 -2
  55. package/dist/cjs/{index-BEK8esHW.d.cts → index-nXX5E77u.d.cts} +8 -189
  56. package/dist/cjs/index.cjs +74 -67
  57. package/dist/cjs/index.d.cts +15 -10
  58. package/dist/cjs/light-BhvqsgHj.d.cts +119 -0
  59. package/dist/cjs/{types-Cn54Lzf-.cjs → light-Qbh16DQE.cjs} +72 -58
  60. package/dist/cjs/proto/cosmos-tx.d.cts +1 -1
  61. package/dist/cjs/{service-2B8kFWdK.cjs → service-WTWXJzS1.cjs} +18 -18
  62. package/dist/cjs/service.cjs +11 -6
  63. package/dist/cjs/service.d.cts +4 -3
  64. package/dist/cjs/stream-CcqYpdwJ.cjs +20 -0
  65. package/dist/cjs/{tx-C2jfAA8Y.cjs → tx-eQttrX5b.cjs} +14 -13
  66. package/dist/cjs/types/light.cjs +13 -0
  67. package/dist/cjs/types/light.d.cts +2 -0
  68. package/dist/cjs/types-BJpWW-Rx.cjs +37 -0
  69. package/dist/cjs/types.cjs +14 -13
  70. package/dist/cjs/types.d.cts +3 -2
  71. package/dist/cjs/utils/address.cjs +13 -0
  72. package/dist/cjs/utils/address.d.cts +2 -0
  73. package/dist/cjs/utils/constants.cjs +9 -0
  74. package/dist/cjs/utils/constants.d.cts +2 -0
  75. package/dist/cjs/utils/encoding.cjs +17 -0
  76. package/dist/cjs/utils/encoding.d.cts +2 -0
  77. package/dist/cjs/utils/light.cjs +39 -0
  78. package/dist/cjs/utils/light.d.cts +5 -0
  79. package/dist/cjs/{utils-DbzXsOHS.cjs → utils-CH1Ojxun.cjs} +132 -592
  80. package/dist/cjs/utils.cjs +40 -34
  81. package/dist/cjs/utils.d.cts +15 -10
  82. package/dist/esm/{AbacusGrpcApi-CtwUxhbH.js → AbacusGrpcApi-DVniM62M.js} +2 -2
  83. package/dist/esm/{BaseGrpcConsumer-C8YhjVn6.d.ts → BaseGrpcConsumer-B9J3abKI.d.ts} +1 -1
  84. package/dist/esm/{BaseGrpcConsumer-C2_ejXG6.js → BaseGrpcConsumer-D-uEnIgH.js} +3 -3
  85. package/dist/esm/{BaseIndexerGrpcConsumer-B7ubNh4y.js → BaseIndexerGrpcConsumer-BUcOBQHD.js} +1 -1
  86. package/dist/esm/{ChainGrpcExchangeApi-46tg3Hzg.js → ChainGrpcExchangeApi-CT0WW59O.js} +4 -4
  87. package/dist/esm/{ChainRestTendermintApi-J6BTcNft.js → ChainRestTendermintApi-C5sizTTA.js} +5 -4
  88. package/dist/esm/{DirectEthSecp256k1Wallet-DOuSBBhp.js → DirectEthSecp256k1Wallet-Daky9CEn.js} +3 -3
  89. package/dist/esm/{ExecArgNeptuneWithdraw-DiiRJIyN.js → ExecArgNeptuneWithdraw-ljDnPI2p.js} +4 -3
  90. package/dist/esm/{IndexerGrpcWeb3GwApi-43sbzWOe.js → IndexerGrpcWeb3GwApi-D9GO0m1v.js} +4 -3
  91. package/dist/esm/{MsgBase-C7o5mYq2.js → MsgBase-CishJWMN.js} +1 -1
  92. package/dist/esm/{MsgSetDenomMetadata-k1Be2o9j.js → MsgSetDenomMetadata-DJaQwf94.js} +8 -6
  93. package/dist/esm/{OLPGrpcApi-DJHRAhPY.js → OLPGrpcApi-thWMIX2S.js} +2 -2
  94. package/dist/esm/{QueryTradingStrategyContractTotalStrategies-NvpGnD6O.js → QueryTradingStrategyContractTotalStrategies-NKplhQpi.js} +4 -4
  95. package/dist/esm/{StreamManagerV2-DiRDW-5W.js → StreamManagerV2-BdSq7ThE.js} +9 -8
  96. package/dist/esm/{TcAbacusGrpcApi-Dat50xET.js → TcAbacusGrpcApi-0zuZRiGi.js} +2 -2
  97. package/dist/esm/{accounts-Bu0DRjk4.js → accounts-3rypojw1.js} +6 -3
  98. package/dist/esm/address-light-BcZDS-ks.d.ts +14 -0
  99. package/dist/esm/address-light-C9skTx0P.js +48 -0
  100. package/dist/esm/{chain-DDGdMRsP.js → chain-CFXdQ_RS.js} +6 -5
  101. package/dist/esm/client/abacus.d.ts +5 -4
  102. package/dist/esm/client/abacus.js +6 -5
  103. package/dist/esm/client/chain.d.ts +14 -9
  104. package/dist/esm/client/chain.js +14 -9
  105. package/dist/esm/client/indexer.d.ts +14 -9
  106. package/dist/esm/client/indexer.js +15 -10
  107. package/dist/esm/client/olp.d.ts +5 -4
  108. package/dist/esm/client/olp.js +7 -6
  109. package/dist/esm/client/tcAbacus.d.ts +5 -4
  110. package/dist/esm/client/tcAbacus.js +6 -5
  111. package/dist/esm/client/wasm.d.ts +4 -3
  112. package/dist/esm/client/wasm.js +17 -12
  113. package/dist/esm/coins-D4vONigS.js +14 -0
  114. package/dist/esm/coins-ceq0Id0M.d.ts +7 -0
  115. package/dist/esm/constants-BZ28P_pH.d.ts +10 -0
  116. package/dist/esm/constants-CCVyqUU9.js +11 -0
  117. package/dist/esm/core/accounts.d.ts +14 -9
  118. package/dist/esm/core/accounts.js +9 -5
  119. package/dist/esm/core/modules.d.ts +14 -9
  120. package/dist/esm/core/modules.js +20 -15
  121. package/dist/esm/core/tx.d.ts +14 -9
  122. package/dist/esm/core/tx.js +17 -12
  123. package/dist/esm/cosmjs.d.ts +2 -2
  124. package/dist/esm/cosmjs.js +18 -13
  125. package/dist/esm/encoding-light-18k0e_8v.d.ts +18 -0
  126. package/dist/esm/encoding-light-DHtTGSg1.js +86 -0
  127. package/dist/esm/exports.d.ts +2 -2
  128. package/dist/esm/exports.js +18 -13
  129. package/dist/esm/{index-BrfNx2yV.d.ts → index-BAxR1qDR.d.ts} +1 -1
  130. package/dist/esm/{index-DA42BIjg.d.ts → index-CFTXl2dv.d.ts} +1 -1
  131. package/dist/esm/{index-CTAobhk3.d.ts → index-CnGE9D2Q.d.ts} +8 -189
  132. package/dist/esm/{index-B0mpSZSK.d.ts → index-DIP5sGCK.d.ts} +1 -1
  133. package/dist/{cjs/index-DpsYFbif.d.cts → esm/index-DPmNu-i9.d.ts} +2 -1
  134. package/dist/{cjs/index-DYAz6OYS.d.cts → esm/index-fqs5eTyD.d.ts} +3 -146
  135. package/dist/esm/{index-JlA-uSsc.d.ts → index-lki5l2NS.d.ts} +1 -1
  136. package/dist/esm/{index-CZhX_Ynf.d.ts → index-reHqEgGi.d.ts} +2 -2
  137. package/dist/esm/index.d.ts +15 -10
  138. package/dist/esm/index.js +29 -24
  139. package/dist/esm/{types-DQ7rwavH.js → light-ClZwkrDK.js} +61 -52
  140. package/dist/esm/light-CrlUMC8c.d.ts +119 -0
  141. package/dist/esm/proto/cosmos-tx.d.ts +1 -1
  142. package/dist/esm/{service-Uo4J-lwR.js → service-B2z6s85o.js} +3 -3
  143. package/dist/esm/service.d.ts +4 -3
  144. package/dist/esm/service.js +11 -6
  145. package/dist/esm/stream-BqkNM_6g.js +14 -0
  146. package/dist/esm/{tx-Ajrd7cHg.js → tx-Bh9bfmCB.js} +7 -6
  147. package/dist/esm/types/light.d.ts +2 -0
  148. package/dist/esm/types/light.js +3 -0
  149. package/dist/esm/types-BAV0654v.js +24 -0
  150. package/dist/esm/types.d.ts +3 -2
  151. package/dist/esm/types.js +3 -2
  152. package/dist/esm/utils/address.d.ts +2 -0
  153. package/dist/esm/utils/address.js +3 -0
  154. package/dist/esm/utils/constants.d.ts +2 -0
  155. package/dist/esm/utils/constants.js +3 -0
  156. package/dist/esm/utils/encoding.d.ts +2 -0
  157. package/dist/esm/utils/encoding.js +3 -0
  158. package/dist/esm/utils/light.d.ts +5 -0
  159. package/dist/esm/utils/light.js +6 -0
  160. package/dist/esm/{utils-bfl-Zimr.js → utils-B3t50ZnB.js} +125 -393
  161. package/dist/esm/utils.d.ts +15 -10
  162. package/dist/esm/utils.js +7 -3
  163. package/package.json +105 -5
  164. package/dist/cjs/stream-CfBvG3Ln.cjs +0 -87
  165. package/dist/esm/stream-Cdx47Nhx.js +0 -63
  166. /package/dist/cjs/{BaseRestConsumer-uSzCOit7.cjs → BaseRestConsumer-BcHgNcNh.cjs} +0 -0
  167. /package/dist/cjs/{defineProperty-DAtJs5JQ.cjs → defineProperty-C3FP2y9Y.cjs} +0 -0
  168. /package/dist/cjs/{grpc-FG2z-ICE.cjs → grpc-3Z8ffFdZ.cjs} +0 -0
  169. /package/dist/cjs/{tx_pb-7h617od9.d.cts → tx_pb-BmZhAoWC.d.cts} +0 -0
  170. /package/dist/esm/{BaseRestConsumer-DMS02DwS.js → BaseRestConsumer-L3j9-i4T.js} +0 -0
  171. /package/dist/esm/{defineProperty-CmydwPCD.js → defineProperty-C0TI9N8m.js} +0 -0
  172. /package/dist/esm/{grpc-lYZqzL0k.js → grpc-aI_RLGoG.js} +0 -0
  173. /package/dist/esm/{tx_pb-Bb9pvoP6.d.ts → tx_pb-DhFh6sWY.d.ts} +0 -0
@@ -1,324 +1,13 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
+ const require_encoding_light = require('./encoding-light-D96nxVLW.cjs');
2
3
  let viem = require("viem");
3
4
  let __injectivelabs_utils = require("@injectivelabs/utils");
4
- let __scure_base = require("@scure/base");
5
5
  let __noble_curves_secp256k1 = require("@noble/curves/secp256k1");
6
6
  let __noble_hashes_sha2 = require("@noble/hashes/sha2");
7
7
  let __noble_hashes_legacy = require("@noble/hashes/legacy");
8
8
  let __injectivelabs_core_proto_ts_v2_generated_cosmos_base_query_v1beta1_pagination_pb = require("@injectivelabs/core-proto-ts-v2/generated/cosmos/base/query/v1beta1/pagination_pb");
9
9
  __injectivelabs_core_proto_ts_v2_generated_cosmos_base_query_v1beta1_pagination_pb = require_chunk.__toESM(__injectivelabs_core_proto_ts_v2_generated_cosmos_base_query_v1beta1_pagination_pb);
10
10
 
11
- //#region src/utils/helpers.ts
12
- const isServerSide = () => typeof window === "undefined";
13
- const isReactNative = () => {
14
- return typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative";
15
- };
16
- const isNode = () => {
17
- if (typeof window === "undefined") return true;
18
- return typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined";
19
- };
20
- const isBrowser = () => {
21
- if (isReactNative()) return false;
22
- if (isNode()) return false;
23
- return typeof window !== "undefined";
24
- };
25
- const objectToJson = (object, params) => {
26
- const { replacer, indentation } = params || {
27
- replacer: void 0,
28
- indentation: 2
29
- };
30
- return safeBigIntStringify(object, replacer, indentation);
31
- };
32
- const protoObjectToJson = (object, params) => {
33
- const { replacer, indentation } = params || {
34
- replacer: void 0,
35
- indentation: 2
36
- };
37
- if (object.toObject !== void 0) return safeBigIntStringify(object.toObject(), replacer, indentation);
38
- return objectToJson(object, {
39
- replacer,
40
- indentation
41
- });
42
- };
43
- const grpcCoinToUiCoin = (coin) => ({
44
- amount: coin.amount,
45
- denom: coin.denom
46
- });
47
- const sortObjectByKeysWithReduce = (obj) => {
48
- if (typeof obj !== "object" || obj === null) return obj;
49
- if (Array.isArray(obj)) return obj.map((e) => sortObjectByKeysWithReduce(e)).sort();
50
- return Object.keys(obj).sort().reduce((sorted, k) => {
51
- const key = k;
52
- sorted[key] = sortObjectByKeysWithReduce(obj[key]);
53
- return sorted;
54
- }, {});
55
- };
56
- const sortObjectByKeys = (obj) => {
57
- if (typeof obj !== "object" || obj === null) return obj;
58
- if (Array.isArray(obj)) return obj.map(sortObjectByKeys);
59
- const sortedKeys = Object.keys(obj).sort();
60
- const result = {};
61
- sortedKeys.forEach((key) => {
62
- result[key] = sortObjectByKeys(obj[key]);
63
- });
64
- return result;
65
- };
66
- const getErrorMessage = (error, endpoint) => {
67
- if (!error.response) return `The request to ${endpoint} has failed.`;
68
- return error.response.data ? error.response.data.message || error.response.data : error.response.statusText;
69
- };
70
- /**
71
- * Converts value to it's number representation
72
- */
73
- const hexToNumber = (value) => {
74
- const [negative, hexValue] = value.startsWith("-") ? [true, value.slice(1)] : [false, value];
75
- const num = BigInt(hexValue);
76
- if (num > Number.MAX_SAFE_INTEGER) return Number(negative ? -num : num);
77
- if (num < Number.MIN_SAFE_INTEGER) return Number(num);
78
- return negative ? -1 * Number(num) : Number(num);
79
- };
80
- function isJsonString(str) {
81
- if (typeof str !== "string") return false;
82
- try {
83
- JSON.parse(str);
84
- } catch (_unused) {
85
- return false;
86
- }
87
- return true;
88
- }
89
- /**
90
- * BigInt-safe JSON replacer function.
91
- * Converts BigInt values to strings during JSON serialization.
92
- */
93
- const bigIntReplacer = (_key, value) => typeof value === "bigint" ? bigIntToString(value) : value;
94
- /**
95
- * Converts a potentially bigint value to a number.
96
- * Handles bigint, string, and other number-like types.
97
- * Returns 0 for null/undefined values.
98
- */
99
- const bigIntToNumber = (value) => {
100
- if (value === null || value === void 0) return 0;
101
- if (typeof value === "bigint") return Number(value);
102
- if (typeof value === "string") return parseInt(value || "0", 10);
103
- if (typeof value === "number") return value;
104
- return parseInt(String(value || "0"), 10);
105
- };
106
- /**
107
- * Converts a potentially bigint value to a string.
108
- * Handles bigint, string, and other types that can be converted to string.
109
- * Returns empty string for null/undefined values.
110
- */
111
- const bigIntToString = (value) => {
112
- if (value === null || value === void 0) return "";
113
- if (typeof value === "bigint") return value.toString();
114
- if (typeof value === "string") return value;
115
- if (typeof value === "number") return value.toString();
116
- return String(value || "");
117
- };
118
- /**
119
- * Stringify an object to JSON with BigInt support.
120
- * Converts BigInt values to strings during serialization to prevent
121
- * "Do not know how to serialize a BigInt" errors.
122
- *
123
- * @param value - The value to serialize
124
- * @param replacer - Optional custom replacer function (BigInt handling is applied first)
125
- * @param space - Optional indentation for pretty printing
126
- * @returns JSON string
127
- */
128
- const safeBigIntStringify = (value, replacer, space) => {
129
- const combinedReplacer = (key, val) => {
130
- const bigIntHandled = bigIntReplacer(key, val);
131
- return replacer ? replacer(key, bigIntHandled) : bigIntHandled;
132
- };
133
- return JSON.stringify(value, combinedReplacer, space);
134
- };
135
-
136
- //#endregion
137
- //#region src/utils/encoding.ts
138
- /**
139
- * Encoding/decoding utilities using industry-standard libraries
140
- *
141
- * Uses viem for hex encoding and @scure/base for base64 encoding
142
- * to ensure compatibility, better performance, and reduce bundle size.
143
- *
144
- * These libraries are already dependencies in the project and are
145
- * battle-tested by millions of developers.
146
- */
147
- /**
148
- * Convert a hex string to Uint8Array
149
- * @param hex - Hex string (with or without 0x prefix)
150
- * @returns Uint8Array
151
- * @throws Error if hex string is invalid
152
- */
153
- function hexToUint8Array(hex) {
154
- if (typeof hex !== "string") throw new Error("Hex string must be a string");
155
- if (hex.trim() === "") throw new Error("Hex string cannot be empty");
156
- const prefixedHex = hex.startsWith("0x") ? hex : `0x${hex}`;
157
- try {
158
- return (0, viem.hexToBytes)(prefixedHex);
159
- } catch (_unused) {
160
- throw new Error(`Invalid hex string: ${hex}`);
161
- }
162
- }
163
- /**
164
- * Convert a Uint8Array to hex string
165
- * @param arr - Uint8Array to convert
166
- * @returns Hex string (without 0x prefix)
167
- */
168
- function uint8ArrayToHex(arr) {
169
- return (0, viem.bytesToHex)(arr).slice(2);
170
- }
171
- /**
172
- * Convert a base64 string to Uint8Array
173
- * @param base64String - Base64 encoded string
174
- * @returns Uint8Array
175
- * @throws Error if base64 string is invalid
176
- */
177
- function base64ToUint8Array(base64String) {
178
- if (typeof base64String !== "string") throw new Error("Base64 string must be a string");
179
- if (base64String.trim() === "") throw new Error("Base64 string cannot be empty");
180
- try {
181
- return __scure_base.base64.decode(base64String);
182
- } catch (_unused2) {
183
- throw new Error(`Invalid base64 string: ${base64String}`);
184
- }
185
- }
186
- /**
187
- * Convert a Uint8Array to base64 string
188
- * @param arr - Uint8Array to convert
189
- * @returns Base64 encoded string
190
- */
191
- function uint8ArrayToBase64(arr) {
192
- return __scure_base.base64.encode(arr);
193
- }
194
- /**
195
- * Convert a string to Uint8Array using UTF-8 encoding
196
- * @param str - String to encode
197
- * @returns Uint8Array
198
- */
199
- function stringToUint8Array(str) {
200
- return new TextEncoder().encode(str);
201
- }
202
- /**
203
- * Convert a hex string to Uint8Array (buffer-like)
204
- * Handles hex strings with or without 0x prefix
205
- * @param hex - Hex string (with or without 0x prefix)
206
- * @returns Uint8Array
207
- */
208
- function hexToBuff(hex) {
209
- return hexToUint8Array(hex.startsWith("0x") ? hex.slice(2) : hex);
210
- }
211
- /**
212
- * Convert a hex string to base64 string
213
- * Handles hex strings with or without 0x prefix
214
- * @param hex - Hex string (with or without 0x prefix)
215
- * @returns Base64 encoded string
216
- */
217
- function hexToBase64(hex) {
218
- return uint8ArrayToBase64(hexToUint8Array(hex.startsWith("0x") ? hex.slice(2) : hex));
219
- }
220
- /**
221
- * Convert a base64 string to UTF-8 string
222
- * @param base64String - Base64 encoded string
223
- * @returns Decoded UTF-8 string
224
- * @throws Error if base64 string is invalid
225
- */
226
- function base64ToUtf8(base64String) {
227
- return toUtf8(base64ToUint8Array(base64String));
228
- }
229
- /**
230
- * Convert a string or Uint8Array to Uint8Array using UTF-8 encoding
231
- * If input is already Uint8Array, returns it as-is
232
- * @param str - String or Uint8Array to encode
233
- * @returns Uint8Array
234
- */
235
- function fromUtf8(str) {
236
- if (typeof str !== "string") return str;
237
- return stringToUint8Array(str);
238
- }
239
- /**
240
- * Convert a Uint8Array or string to string using UTF-8 decoding
241
- * If input is already a string, returns it as-is
242
- * @param data - Uint8Array or string to decode
243
- * @returns Decoded string
244
- */
245
- function toUtf8(data) {
246
- if (typeof data === "string") return data;
247
- return new TextDecoder().decode(data);
248
- }
249
- /**
250
- * Convert a Uint8Array, string, null, or undefined to string using UTF-8 decoding
251
- * More robust version that handles null/undefined gracefully
252
- * @param string - Uint8Array, string, null, or undefined to decode
253
- * @returns Decoded string (empty string if input is null/undefined)
254
- */
255
- function uint8ArrayToString(string) {
256
- if (!string) return "";
257
- if (string.constructor !== Uint8Array) return string;
258
- return new TextDecoder().decode(string);
259
- }
260
- /**
261
- * Convert binary data (string or Uint8Array) to base64 string
262
- * If input is already a string, returns it as-is
263
- * @param data - String or Uint8Array to encode
264
- * @returns Base64 encoded string
265
- */
266
- function binaryToBase64(data) {
267
- return typeof data === "string" ? data : uint8ArrayToBase64(data);
268
- }
269
- /**
270
- * Convert a JSON object to base64 string
271
- * @param data - JSON object to encode
272
- * @returns Base64 encoded string
273
- */
274
- function toBase64(data) {
275
- return uint8ArrayToBase64(stringToUint8Array(safeBigIntStringify(data)));
276
- }
277
- /**
278
- * Convert a base64 string to JSON object
279
- * @param payload - Base64 encoded string
280
- * @returns Decoded JSON object
281
- * @throws Error if base64 string is invalid or contains invalid JSON
282
- */
283
- function fromBase64(payload) {
284
- if (typeof payload !== "string") throw new Error("Base64 payload must be a string");
285
- if (payload.trim() === "") throw new Error("Base64 payload cannot be empty");
286
- try {
287
- const decoded = new TextDecoder().decode(base64ToUint8Array(payload));
288
- return JSON.parse(decoded);
289
- } catch (_unused3) {
290
- throw new Error(`Failed to decode base64 JSON: ${payload}`);
291
- }
292
- }
293
- /**
294
- * Concatenate multiple Uint8Arrays into a single Uint8Array
295
- * Replacement for Buffer.concat()
296
- * @param arrays - Array of Uint8Arrays to concatenate
297
- * @returns Concatenated Uint8Array
298
- */
299
- function concatUint8Arrays(arrays) {
300
- if (arrays.length === 0) return new Uint8Array(0);
301
- const totalLength = arrays.reduce((sum, arr) => sum + arr.length, 0);
302
- const result = new Uint8Array(totalLength);
303
- let offset = 0;
304
- for (const arr of arrays) {
305
- result.set(arr, offset);
306
- offset += arr.length;
307
- }
308
- return result;
309
- }
310
-
311
- //#endregion
312
- //#region src/utils/constants.ts
313
- const BECH32_PUBKEY_ACC_PREFIX = "injpub";
314
- const BECH32_PUBKEY_VAL_PREFIX = "injvaloperpub";
315
- const BECH32_PUBKEY_CONS_PREFIX = "injvalconspub";
316
- const BECH32_ADDR_ACC_PREFIX = "inj";
317
- const BECH32_ADDR_VAL_PREFIX = "injvaloper";
318
- const BECH32_ADDR_CONS_PREFIX = "injvalcons";
319
- const DEFAULT_DERIVATION_PATH = "m/44'/60'/0'/0/0";
320
-
321
- //#endregion
322
11
  //#region src/utils/time.ts
323
12
  /**
324
13
  * Returns a timeout timestamp in milliseconds so its compatible
@@ -485,16 +174,129 @@ const ofacList = [
485
174
  ];
486
175
 
487
176
  //#endregion
488
- //#region src/utils/coins.ts
489
- const parseCoins = (input) => {
490
- return input.replace(/\s/g, "").split(",").filter(Boolean).map((part) => {
491
- const match = part.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/]{2,127})$/);
492
- if (!match) throw new Error("Got an invalid coin string");
493
- return {
494
- amount: match[1].replace(/^0+/, "") || "0",
495
- denom: match[2]
496
- };
177
+ //#region src/utils/helpers.ts
178
+ const isServerSide = () => typeof window === "undefined";
179
+ const isReactNative = () => {
180
+ return typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative";
181
+ };
182
+ const isNode = () => {
183
+ if (typeof window === "undefined") return true;
184
+ return typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined";
185
+ };
186
+ const isBrowser = () => {
187
+ if (isReactNative()) return false;
188
+ if (isNode()) return false;
189
+ return typeof window !== "undefined";
190
+ };
191
+ const objectToJson = (object, params) => {
192
+ const { replacer, indentation } = params || {
193
+ replacer: void 0,
194
+ indentation: 2
195
+ };
196
+ return safeBigIntStringify(object, replacer, indentation);
197
+ };
198
+ const protoObjectToJson = (object, params) => {
199
+ const { replacer, indentation } = params || {
200
+ replacer: void 0,
201
+ indentation: 2
202
+ };
203
+ if (object.toObject !== void 0) return safeBigIntStringify(object.toObject(), replacer, indentation);
204
+ return objectToJson(object, {
205
+ replacer,
206
+ indentation
207
+ });
208
+ };
209
+ const grpcCoinToUiCoin = (coin) => ({
210
+ amount: coin.amount,
211
+ denom: coin.denom
212
+ });
213
+ const sortObjectByKeysWithReduce = (obj) => {
214
+ if (typeof obj !== "object" || obj === null) return obj;
215
+ if (Array.isArray(obj)) return obj.map((e) => sortObjectByKeysWithReduce(e)).sort();
216
+ return Object.keys(obj).sort().reduce((sorted, k) => {
217
+ const key = k;
218
+ sorted[key] = sortObjectByKeysWithReduce(obj[key]);
219
+ return sorted;
220
+ }, {});
221
+ };
222
+ const sortObjectByKeys = (obj) => {
223
+ if (typeof obj !== "object" || obj === null) return obj;
224
+ if (Array.isArray(obj)) return obj.map(sortObjectByKeys);
225
+ const sortedKeys = Object.keys(obj).sort();
226
+ const result = {};
227
+ sortedKeys.forEach((key) => {
228
+ result[key] = sortObjectByKeys(obj[key]);
497
229
  });
230
+ return result;
231
+ };
232
+ const getErrorMessage = (error, endpoint) => {
233
+ if (!error.response) return `The request to ${endpoint} has failed.`;
234
+ return error.response.data ? error.response.data.message || error.response.data : error.response.statusText;
235
+ };
236
+ /**
237
+ * Converts value to it's number representation
238
+ */
239
+ const hexToNumber = (value) => {
240
+ const [negative, hexValue] = value.startsWith("-") ? [true, value.slice(1)] : [false, value];
241
+ const num = BigInt(hexValue);
242
+ if (num > Number.MAX_SAFE_INTEGER) return Number(negative ? -num : num);
243
+ if (num < Number.MIN_SAFE_INTEGER) return Number(num);
244
+ return negative ? -1 * Number(num) : Number(num);
245
+ };
246
+ function isJsonString(str) {
247
+ if (typeof str !== "string") return false;
248
+ try {
249
+ JSON.parse(str);
250
+ } catch (_unused) {
251
+ return false;
252
+ }
253
+ return true;
254
+ }
255
+ /**
256
+ * BigInt-safe JSON replacer function.
257
+ * Converts BigInt values to strings during JSON serialization.
258
+ */
259
+ const bigIntReplacer = (_key, value) => typeof value === "bigint" ? bigIntToString(value) : value;
260
+ /**
261
+ * Converts a potentially bigint value to a number.
262
+ * Handles bigint, string, and other number-like types.
263
+ * Returns 0 for null/undefined values.
264
+ */
265
+ const bigIntToNumber = (value) => {
266
+ if (value === null || value === void 0) return 0;
267
+ if (typeof value === "bigint") return Number(value);
268
+ if (typeof value === "string") return parseInt(value || "0", 10);
269
+ if (typeof value === "number") return value;
270
+ return parseInt(String(value || "0"), 10);
271
+ };
272
+ /**
273
+ * Converts a potentially bigint value to a string.
274
+ * Handles bigint, string, and other types that can be converted to string.
275
+ * Returns empty string for null/undefined values.
276
+ */
277
+ const bigIntToString = (value) => {
278
+ if (value === null || value === void 0) return "";
279
+ if (typeof value === "bigint") return value.toString();
280
+ if (typeof value === "string") return value;
281
+ if (typeof value === "number") return value.toString();
282
+ return String(value || "");
283
+ };
284
+ /**
285
+ * Stringify an object to JSON with BigInt support.
286
+ * Converts BigInt values to strings during serialization to prevent
287
+ * "Do not know how to serialize a BigInt" errors.
288
+ *
289
+ * @param value - The value to serialize
290
+ * @param replacer - Optional custom replacer function (BigInt handling is applied first)
291
+ * @param space - Optional indentation for pretty printing
292
+ * @returns JSON string
293
+ */
294
+ const safeBigIntStringify = (value, replacer, space) => {
295
+ const combinedReplacer = (key, val) => {
296
+ const bigIntHandled = bigIntReplacer(key, val);
297
+ return replacer ? replacer(key, bigIntHandled) : bigIntHandled;
298
+ };
299
+ return JSON.stringify(value, combinedReplacer, space);
498
300
  };
499
301
 
500
302
  //#endregion
@@ -505,7 +307,7 @@ const parseCoins = (input) => {
505
307
  * @returns Uppercase hex string
506
308
  */
507
309
  const hashToHex = (data) => {
508
- return uint8ArrayToHex((0, __noble_hashes_sha2.sha256)(base64ToUint8Array(data))).toUpperCase();
310
+ return require_encoding_light.uint8ArrayToHex((0, __noble_hashes_sha2.sha256)(require_encoding_light.base64ToUint8Array(data))).toUpperCase();
509
311
  };
510
312
  /**
511
313
  * Compute SHA256 hash of Uint8Array data
@@ -538,7 +340,7 @@ const privateKeyToPublicKey = (privateKey) => {
538
340
  */
539
341
  const privateKeyHashToPublicKey = (privateKeyHash) => {
540
342
  const privateKey = privateKeyHash.startsWith("0x") ? privateKeyHash.slice(2) : privateKeyHash;
541
- return __noble_curves_secp256k1.secp256k1.getPublicKey(hexToUint8Array(privateKey), true);
343
+ return __noble_curves_secp256k1.secp256k1.getPublicKey(require_encoding_light.hexToUint8Array(privateKey), true);
542
344
  };
543
345
  /**
544
346
  * Derive public key from private key and encode as base64
@@ -546,7 +348,7 @@ const privateKeyHashToPublicKey = (privateKeyHash) => {
546
348
  * @returns Base64 encoded compressed public key
547
349
  */
548
350
  const privateKeyToPublicKeyBase64 = (privateKey) => {
549
- return uint8ArrayToBase64(privateKeyToPublicKey(privateKey));
351
+ return require_encoding_light.uint8ArrayToBase64(privateKeyToPublicKey(privateKey));
550
352
  };
551
353
  /**
552
354
  * Derive public key from private key hash and encode as base64
@@ -554,7 +356,7 @@ const privateKeyToPublicKeyBase64 = (privateKey) => {
554
356
  * @returns Base64 encoded compressed public key
555
357
  */
556
358
  const privateKeyHashToPublicKeyBase64 = (privateKeyHash) => {
557
- return uint8ArrayToBase64(privateKeyHashToPublicKey(privateKeyHash));
359
+ return require_encoding_light.uint8ArrayToBase64(privateKeyHashToPublicKey(privateKeyHash));
558
360
  };
559
361
  /**
560
362
  * Hash only the domain portion of EIP-712 typed data
@@ -589,7 +391,7 @@ const messageHash = (message) => {
589
391
  * @returns Decompressed public key hex string (without 04 prefix)
590
392
  */
591
393
  function decompressPubKey(startsWith02Or03) {
592
- if (hexToUint8Array(startsWith02Or03).length === 64) startsWith02Or03 = "04" + startsWith02Or03;
394
+ if (require_encoding_light.hexToUint8Array(startsWith02Or03).length === 64) startsWith02Or03 = "04" + startsWith02Or03;
593
395
  const decompressed = __noble_curves_secp256k1.secp256k1.ProjectivePoint.fromHex(startsWith02Or03).toHex(false);
594
396
  if (!decompressed.startsWith("04")) return decompressed;
595
397
  return decompressed.slice(2);
@@ -981,58 +783,6 @@ const getSpotMarketDecimals = ({ minPriceTickSize, minQuantityTickSize, baseDeci
981
783
  //#endregion
982
784
  //#region src/utils/address.ts
983
785
  /**
984
- * Get injective address from Ethereum hex address
985
- *
986
- * @param ethAddress string
987
- * @returns string
988
- */
989
- const getInjectiveAddress = (ethAddress) => {
990
- const addressBuffer = (0, viem.toBytes)(ethAddress.toString());
991
- return __scure_base.bech32.encode("inj", __scure_base.bech32.toWords(addressBuffer));
992
- };
993
- /**
994
- * Get ethereum address from injective bech32 address
995
- *
996
- * @param injectiveAddress string
997
- * @returns string
998
- */
999
- const getEthereumAddress = (injectiveAddress) => {
1000
- if (injectiveAddress.startsWith("0x")) return injectiveAddress;
1001
- return `0x${uint8ArrayToHex(__scure_base.bech32.fromWords(__scure_base.bech32.decode(injectiveAddress).words))}`;
1002
- };
1003
- /**
1004
- * Get ethereum address from injective bech32 address
1005
- *
1006
- * @param injectiveAddress string
1007
- * @returns string
1008
- */
1009
- const getInjectiveAddressFromSubaccountId = (subaccountId) => {
1010
- return getInjectiveAddress(subaccountId.slice(0, 42));
1011
- };
1012
- /**
1013
- * Get default subaccount id from injective bech32 address
1014
- *
1015
- * @param injectiveAddress string
1016
- * @returns string
1017
- */
1018
- const getDefaultSubaccountId = (injectiveAddress) => {
1019
- return `0x${uint8ArrayToHex(__scure_base.bech32.fromWords(__scure_base.bech32.decode(injectiveAddress).words))}${"0".repeat(24)}`;
1020
- };
1021
- /**
1022
- * Get subaccount id from injective bech32 address and an index (defaults to 0)
1023
- * @param injectiveAddress string
1024
- * @param nonce number
1025
- * @returns string
1026
- */
1027
- const getSubaccountId = (injectiveAddress, nonce = 0) => {
1028
- return `0x${uint8ArrayToHex(__scure_base.bech32.fromWords(__scure_base.bech32.decode(injectiveAddress).words))}${"0".repeat(23)}${nonce}`;
1029
- };
1030
- /** @deprecated - use getEthereumAddress */
1031
- const getAddressFromInjectiveAddress = (address) => {
1032
- if (address.startsWith("0x")) return address;
1033
- return `0x${uint8ArrayToHex(__scure_base.bech32.fromWords(__scure_base.bech32.decode(address).words))}`;
1034
- };
1035
- /**
1036
786
  * Convert Ethereum address to checksummed format (EIP-55)
1037
787
  * @param ethAddress - Ethereum address (with or without 0x prefix)
1038
788
  * @returns Checksummed Ethereum address
@@ -1044,24 +794,6 @@ const getChecksumAddress = (ethAddress) => {
1044
794
  return parseInt(addressHash[i], 16) > 7 ? char.toUpperCase() : char;
1045
795
  }).join("");
1046
796
  };
1047
- /**
1048
- * Check if address is a CW20 contract address
1049
- * @param address - Address to check
1050
- * @returns True if address is a CW20 contract address
1051
- */
1052
- const isCw20ContractAddress = (address) => address.length === 42 && address.startsWith("inj");
1053
- /**
1054
- * Add 0x prefix to hex string if not present
1055
- * @param hex - Hex string
1056
- * @returns Hex string with 0x prefix
1057
- */
1058
- const addHexPrefix = (hex) => hex.startsWith("0x") ? hex : `0x${hex}`;
1059
- /**
1060
- * Remove 0x prefix from hex string if present
1061
- * @param hex - Hex string
1062
- * @returns Hex string without 0x prefix
1063
- */
1064
- const removeHexPrefix = (hex) => hex.startsWith("0x") ? hex.slice(2) : hex;
1065
797
 
1066
798
  //#endregion
1067
799
  //#region src/client/chain/transformers/ChainGrpcCommonTransformer.ts
@@ -1075,7 +807,7 @@ var ChainGrpcCommonTransformer = class ChainGrpcCommonTransformer {
1075
807
  static pageRequestToGrpcPageRequestV2(pageRequest) {
1076
808
  if (!pageRequest) return;
1077
809
  return __injectivelabs_core_proto_ts_v2_generated_cosmos_base_query_v1beta1_pagination_pb.PageRequest.create({
1078
- key: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.key) ? base64ToUint8Array(pageRequest.key) : void 0,
810
+ key: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.key) ? require_encoding_light.base64ToUint8Array(pageRequest.key) : void 0,
1079
811
  limit: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.limit) ? BigInt(pageRequest.limit) : void 0,
1080
812
  offset: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.offset) ? BigInt(pageRequest.offset) : void 0,
1081
813
  reverse: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.reverse) ? pageRequest.reverse : void 0,
@@ -1085,7 +817,7 @@ var ChainGrpcCommonTransformer = class ChainGrpcCommonTransformer {
1085
817
  static pageRequestToGrpcPageRequest(pageRequest) {
1086
818
  if (!pageRequest) return;
1087
819
  return __injectivelabs_core_proto_ts_v2_generated_cosmos_base_query_v1beta1_pagination_pb.PageRequest.create({
1088
- key: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.key) ? base64ToUint8Array(pageRequest.key) : void 0,
820
+ key: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.key) ? require_encoding_light.base64ToUint8Array(pageRequest.key) : void 0,
1089
821
  limit: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.limit) ? BigInt(pageRequest.limit) : void 0,
1090
822
  offset: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.offset) ? BigInt(pageRequest.offset) : void 0,
1091
823
  reverse: (pageRequest === null || pageRequest === void 0 ? void 0 : pageRequest.reverse) ? pageRequest.reverse : void 0,
@@ -1095,7 +827,7 @@ var ChainGrpcCommonTransformer = class ChainGrpcCommonTransformer {
1095
827
  static paginationUint8ArrayToString(key) {
1096
828
  if (!key) return "";
1097
829
  if (key.constructor !== Uint8Array) return key;
1098
- return uint8ArrayToBase64(key);
830
+ return require_encoding_light.uint8ArrayToBase64(key);
1099
831
  }
1100
832
  static grpcPaginationToPagination(pagination) {
1101
833
  return {
@@ -1193,58 +925,16 @@ const recoverTypedSignaturePubKey = async (data, signature) => {
1193
925
  hash: (0, viem.hashTypedData)(data),
1194
926
  signature
1195
927
  });
1196
- return `0x${uint8ArrayToHex(__noble_curves_secp256k1.secp256k1.ProjectivePoint.fromHex(publicKeyHex.slice(2)).toRawBytes(true))}`;
928
+ return `0x${require_encoding_light.uint8ArrayToHex(__noble_curves_secp256k1.secp256k1.ProjectivePoint.fromHex(publicKeyHex.slice(2)).toRawBytes(true))}`;
1197
929
  };
1198
930
 
1199
931
  //#endregion
1200
- Object.defineProperty(exports, 'BECH32_ADDR_ACC_PREFIX', {
1201
- enumerable: true,
1202
- get: function () {
1203
- return BECH32_ADDR_ACC_PREFIX;
1204
- }
1205
- });
1206
- Object.defineProperty(exports, 'BECH32_ADDR_CONS_PREFIX', {
1207
- enumerable: true,
1208
- get: function () {
1209
- return BECH32_ADDR_CONS_PREFIX;
1210
- }
1211
- });
1212
- Object.defineProperty(exports, 'BECH32_ADDR_VAL_PREFIX', {
1213
- enumerable: true,
1214
- get: function () {
1215
- return BECH32_ADDR_VAL_PREFIX;
1216
- }
1217
- });
1218
- Object.defineProperty(exports, 'BECH32_PUBKEY_ACC_PREFIX', {
1219
- enumerable: true,
1220
- get: function () {
1221
- return BECH32_PUBKEY_ACC_PREFIX;
1222
- }
1223
- });
1224
- Object.defineProperty(exports, 'BECH32_PUBKEY_CONS_PREFIX', {
1225
- enumerable: true,
1226
- get: function () {
1227
- return BECH32_PUBKEY_CONS_PREFIX;
1228
- }
1229
- });
1230
- Object.defineProperty(exports, 'BECH32_PUBKEY_VAL_PREFIX', {
1231
- enumerable: true,
1232
- get: function () {
1233
- return BECH32_PUBKEY_VAL_PREFIX;
1234
- }
1235
- });
1236
932
  Object.defineProperty(exports, 'ChainGrpcCommonTransformer', {
1237
933
  enumerable: true,
1238
934
  get: function () {
1239
935
  return ChainGrpcCommonTransformer;
1240
936
  }
1241
937
  });
1242
- Object.defineProperty(exports, 'DEFAULT_DERIVATION_PATH', {
1243
- enumerable: true,
1244
- get: function () {
1245
- return DEFAULT_DERIVATION_PATH;
1246
- }
1247
- });
1248
938
  Object.defineProperty(exports, 'SignTypedDataVersionV4', {
1249
939
  enumerable: true,
1250
940
  get: function () {
@@ -1263,30 +953,12 @@ Object.defineProperty(exports, 'TypedDataUtilsSanitizeData', {
1263
953
  return TypedDataUtilsSanitizeData;
1264
954
  }
1265
955
  });
1266
- Object.defineProperty(exports, 'addHexPrefix', {
1267
- enumerable: true,
1268
- get: function () {
1269
- return addHexPrefix;
1270
- }
1271
- });
1272
956
  Object.defineProperty(exports, 'amountToCosmosSdkDecAmount', {
1273
957
  enumerable: true,
1274
958
  get: function () {
1275
959
  return amountToCosmosSdkDecAmount;
1276
960
  }
1277
961
  });
1278
- Object.defineProperty(exports, 'base64ToUint8Array', {
1279
- enumerable: true,
1280
- get: function () {
1281
- return base64ToUint8Array;
1282
- }
1283
- });
1284
- Object.defineProperty(exports, 'base64ToUtf8', {
1285
- enumerable: true,
1286
- get: function () {
1287
- return base64ToUtf8;
1288
- }
1289
- });
1290
962
  Object.defineProperty(exports, 'bigIntReplacer', {
1291
963
  enumerable: true,
1292
964
  get: function () {
@@ -1305,18 +977,6 @@ Object.defineProperty(exports, 'bigIntToString', {
1305
977
  return bigIntToString;
1306
978
  }
1307
979
  });
1308
- Object.defineProperty(exports, 'binaryToBase64', {
1309
- enumerable: true,
1310
- get: function () {
1311
- return binaryToBase64;
1312
- }
1313
- });
1314
- Object.defineProperty(exports, 'concatUint8Arrays', {
1315
- enumerable: true,
1316
- get: function () {
1317
- return concatUint8Arrays;
1318
- }
1319
- });
1320
980
  Object.defineProperty(exports, 'cosmosSdkDecToBigNumber', {
1321
981
  enumerable: true,
1322
982
  get: function () {
@@ -1485,36 +1145,12 @@ Object.defineProperty(exports, 'formatPriceToAllowablePrice', {
1485
1145
  return formatPriceToAllowablePrice;
1486
1146
  }
1487
1147
  });
1488
- Object.defineProperty(exports, 'fromBase64', {
1489
- enumerable: true,
1490
- get: function () {
1491
- return fromBase64;
1492
- }
1493
- });
1494
- Object.defineProperty(exports, 'fromUtf8', {
1495
- enumerable: true,
1496
- get: function () {
1497
- return fromUtf8;
1498
- }
1499
- });
1500
- Object.defineProperty(exports, 'getAddressFromInjectiveAddress', {
1501
- enumerable: true,
1502
- get: function () {
1503
- return getAddressFromInjectiveAddress;
1504
- }
1505
- });
1506
1148
  Object.defineProperty(exports, 'getChecksumAddress', {
1507
1149
  enumerable: true,
1508
1150
  get: function () {
1509
1151
  return getChecksumAddress;
1510
1152
  }
1511
1153
  });
1512
- Object.defineProperty(exports, 'getDefaultSubaccountId', {
1513
- enumerable: true,
1514
- get: function () {
1515
- return getDefaultSubaccountId;
1516
- }
1517
- });
1518
1154
  Object.defineProperty(exports, 'getDerivativeMarketDecimals', {
1519
1155
  enumerable: true,
1520
1156
  get: function () {
@@ -1533,30 +1169,12 @@ Object.defineProperty(exports, 'getErrorMessage', {
1533
1169
  return getErrorMessage;
1534
1170
  }
1535
1171
  });
1536
- Object.defineProperty(exports, 'getEthereumAddress', {
1537
- enumerable: true,
1538
- get: function () {
1539
- return getEthereumAddress;
1540
- }
1541
- });
1542
1172
  Object.defineProperty(exports, 'getGasPriceBasedOnMessage', {
1543
1173
  enumerable: true,
1544
1174
  get: function () {
1545
1175
  return getGasPriceBasedOnMessage;
1546
1176
  }
1547
1177
  });
1548
- Object.defineProperty(exports, 'getInjectiveAddress', {
1549
- enumerable: true,
1550
- get: function () {
1551
- return getInjectiveAddress;
1552
- }
1553
- });
1554
- Object.defineProperty(exports, 'getInjectiveAddressFromSubaccountId', {
1555
- enumerable: true,
1556
- get: function () {
1557
- return getInjectiveAddressFromSubaccountId;
1558
- }
1559
- });
1560
1178
  Object.defineProperty(exports, 'getSpotMarketDecimals', {
1561
1179
  enumerable: true,
1562
1180
  get: function () {
@@ -1569,12 +1187,6 @@ Object.defineProperty(exports, 'getSpotMarketTensMultiplier', {
1569
1187
  return getSpotMarketTensMultiplier;
1570
1188
  }
1571
1189
  });
1572
- Object.defineProperty(exports, 'getSubaccountId', {
1573
- enumerable: true,
1574
- get: function () {
1575
- return getSubaccountId;
1576
- }
1577
- });
1578
1190
  Object.defineProperty(exports, 'getTensMultiplier', {
1579
1191
  enumerable: true,
1580
1192
  get: function () {
@@ -1611,42 +1223,18 @@ Object.defineProperty(exports, 'hashToHex', {
1611
1223
  return hashToHex;
1612
1224
  }
1613
1225
  });
1614
- Object.defineProperty(exports, 'hexToBase64', {
1615
- enumerable: true,
1616
- get: function () {
1617
- return hexToBase64;
1618
- }
1619
- });
1620
- Object.defineProperty(exports, 'hexToBuff', {
1621
- enumerable: true,
1622
- get: function () {
1623
- return hexToBuff;
1624
- }
1625
- });
1626
1226
  Object.defineProperty(exports, 'hexToNumber', {
1627
1227
  enumerable: true,
1628
1228
  get: function () {
1629
1229
  return hexToNumber;
1630
1230
  }
1631
1231
  });
1632
- Object.defineProperty(exports, 'hexToUint8Array', {
1633
- enumerable: true,
1634
- get: function () {
1635
- return hexToUint8Array;
1636
- }
1637
- });
1638
1232
  Object.defineProperty(exports, 'isBrowser', {
1639
1233
  enumerable: true,
1640
1234
  get: function () {
1641
1235
  return isBrowser;
1642
1236
  }
1643
1237
  });
1644
- Object.defineProperty(exports, 'isCw20ContractAddress', {
1645
- enumerable: true,
1646
- get: function () {
1647
- return isCw20ContractAddress;
1648
- }
1649
- });
1650
1238
  Object.defineProperty(exports, 'isJsonString', {
1651
1239
  enumerable: true,
1652
1240
  get: function () {
@@ -1731,12 +1319,6 @@ Object.defineProperty(exports, 'paginationUint8ArrayToString', {
1731
1319
  return paginationUint8ArrayToString;
1732
1320
  }
1733
1321
  });
1734
- Object.defineProperty(exports, 'parseCoins', {
1735
- enumerable: true,
1736
- get: function () {
1737
- return parseCoins;
1738
- }
1739
- });
1740
1322
  Object.defineProperty(exports, 'privateKeyHashToPublicKey', {
1741
1323
  enumerable: true,
1742
1324
  get: function () {
@@ -1797,12 +1379,6 @@ Object.defineProperty(exports, 'recoverTypedSignaturePubKey', {
1797
1379
  return recoverTypedSignaturePubKey;
1798
1380
  }
1799
1381
  });
1800
- Object.defineProperty(exports, 'removeHexPrefix', {
1801
- enumerable: true,
1802
- get: function () {
1803
- return removeHexPrefix;
1804
- }
1805
- });
1806
1382
  Object.defineProperty(exports, 'ripemd160', {
1807
1383
  enumerable: true,
1808
1384
  get: function () {
@@ -1886,40 +1462,4 @@ Object.defineProperty(exports, 'spotQuantityToChainQuantityToFixed', {
1886
1462
  get: function () {
1887
1463
  return spotQuantityToChainQuantityToFixed;
1888
1464
  }
1889
- });
1890
- Object.defineProperty(exports, 'stringToUint8Array', {
1891
- enumerable: true,
1892
- get: function () {
1893
- return stringToUint8Array;
1894
- }
1895
- });
1896
- Object.defineProperty(exports, 'toBase64', {
1897
- enumerable: true,
1898
- get: function () {
1899
- return toBase64;
1900
- }
1901
- });
1902
- Object.defineProperty(exports, 'toUtf8', {
1903
- enumerable: true,
1904
- get: function () {
1905
- return toUtf8;
1906
- }
1907
- });
1908
- Object.defineProperty(exports, 'uint8ArrayToBase64', {
1909
- enumerable: true,
1910
- get: function () {
1911
- return uint8ArrayToBase64;
1912
- }
1913
- });
1914
- Object.defineProperty(exports, 'uint8ArrayToHex', {
1915
- enumerable: true,
1916
- get: function () {
1917
- return uint8ArrayToHex;
1918
- }
1919
- });
1920
- Object.defineProperty(exports, 'uint8ArrayToString', {
1921
- enumerable: true,
1922
- get: function () {
1923
- return uint8ArrayToString;
1924
- }
1925
1465
  });