@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,322 +1,11 @@
1
- import { bytesToHex, hashTypedData, hexToBytes, keccak256, recoverPublicKey, toBytes } from "viem";
1
+ import { l as hexToUint8Array, m as uint8ArrayToHex, p as uint8ArrayToBase64, t as base64ToUint8Array } from "./encoding-light-DHtTGSg1.js";
2
+ import { hashTypedData, keccak256, recoverPublicKey } from "viem";
2
3
  import { BigNumber, DEFAULT_EXCHANGE_LIMIT, DEFAULT_GAS_LIMIT, DEFAULT_IBC_GAS_LIMIT, DEFAULT_TIMESTAMP_TIMEOUT_MS, getExactDecimalsFromNumber, getSignificantDecimalsFromNumber, toBigNumber, toChainFormat, toHumanReadable } from "@injectivelabs/utils";
3
- import { base64, bech32 } from "@scure/base";
4
4
  import { secp256k1 } from "@noble/curves/secp256k1";
5
5
  import { sha256 } from "@noble/hashes/sha2";
6
6
  import { ripemd160 } from "@noble/hashes/legacy";
7
7
  import * as CosmosBaseQueryV1Beta1PaginationPb from "@injectivelabs/core-proto-ts-v2/generated/cosmos/base/query/v1beta1/pagination_pb";
8
8
 
9
- //#region src/utils/helpers.ts
10
- const isServerSide = () => typeof window === "undefined";
11
- const isReactNative = () => {
12
- return typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative";
13
- };
14
- const isNode = () => {
15
- if (typeof window === "undefined") return true;
16
- return typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined";
17
- };
18
- const isBrowser = () => {
19
- if (isReactNative()) return false;
20
- if (isNode()) return false;
21
- return typeof window !== "undefined";
22
- };
23
- const objectToJson = (object, params) => {
24
- const { replacer, indentation } = params || {
25
- replacer: void 0,
26
- indentation: 2
27
- };
28
- return safeBigIntStringify(object, replacer, indentation);
29
- };
30
- const protoObjectToJson = (object, params) => {
31
- const { replacer, indentation } = params || {
32
- replacer: void 0,
33
- indentation: 2
34
- };
35
- if (object.toObject !== void 0) return safeBigIntStringify(object.toObject(), replacer, indentation);
36
- return objectToJson(object, {
37
- replacer,
38
- indentation
39
- });
40
- };
41
- const grpcCoinToUiCoin = (coin) => ({
42
- amount: coin.amount,
43
- denom: coin.denom
44
- });
45
- const sortObjectByKeysWithReduce = (obj) => {
46
- if (typeof obj !== "object" || obj === null) return obj;
47
- if (Array.isArray(obj)) return obj.map((e) => sortObjectByKeysWithReduce(e)).sort();
48
- return Object.keys(obj).sort().reduce((sorted, k) => {
49
- const key = k;
50
- sorted[key] = sortObjectByKeysWithReduce(obj[key]);
51
- return sorted;
52
- }, {});
53
- };
54
- const sortObjectByKeys = (obj) => {
55
- if (typeof obj !== "object" || obj === null) return obj;
56
- if (Array.isArray(obj)) return obj.map(sortObjectByKeys);
57
- const sortedKeys = Object.keys(obj).sort();
58
- const result = {};
59
- sortedKeys.forEach((key) => {
60
- result[key] = sortObjectByKeys(obj[key]);
61
- });
62
- return result;
63
- };
64
- const getErrorMessage = (error, endpoint) => {
65
- if (!error.response) return `The request to ${endpoint} has failed.`;
66
- return error.response.data ? error.response.data.message || error.response.data : error.response.statusText;
67
- };
68
- /**
69
- * Converts value to it's number representation
70
- */
71
- const hexToNumber = (value) => {
72
- const [negative, hexValue] = value.startsWith("-") ? [true, value.slice(1)] : [false, value];
73
- const num = BigInt(hexValue);
74
- if (num > Number.MAX_SAFE_INTEGER) return Number(negative ? -num : num);
75
- if (num < Number.MIN_SAFE_INTEGER) return Number(num);
76
- return negative ? -1 * Number(num) : Number(num);
77
- };
78
- function isJsonString(str) {
79
- if (typeof str !== "string") return false;
80
- try {
81
- JSON.parse(str);
82
- } catch (_unused) {
83
- return false;
84
- }
85
- return true;
86
- }
87
- /**
88
- * BigInt-safe JSON replacer function.
89
- * Converts BigInt values to strings during JSON serialization.
90
- */
91
- const bigIntReplacer = (_key, value) => typeof value === "bigint" ? bigIntToString(value) : value;
92
- /**
93
- * Converts a potentially bigint value to a number.
94
- * Handles bigint, string, and other number-like types.
95
- * Returns 0 for null/undefined values.
96
- */
97
- const bigIntToNumber = (value) => {
98
- if (value === null || value === void 0) return 0;
99
- if (typeof value === "bigint") return Number(value);
100
- if (typeof value === "string") return parseInt(value || "0", 10);
101
- if (typeof value === "number") return value;
102
- return parseInt(String(value || "0"), 10);
103
- };
104
- /**
105
- * Converts a potentially bigint value to a string.
106
- * Handles bigint, string, and other types that can be converted to string.
107
- * Returns empty string for null/undefined values.
108
- */
109
- const bigIntToString = (value) => {
110
- if (value === null || value === void 0) return "";
111
- if (typeof value === "bigint") return value.toString();
112
- if (typeof value === "string") return value;
113
- if (typeof value === "number") return value.toString();
114
- return String(value || "");
115
- };
116
- /**
117
- * Stringify an object to JSON with BigInt support.
118
- * Converts BigInt values to strings during serialization to prevent
119
- * "Do not know how to serialize a BigInt" errors.
120
- *
121
- * @param value - The value to serialize
122
- * @param replacer - Optional custom replacer function (BigInt handling is applied first)
123
- * @param space - Optional indentation for pretty printing
124
- * @returns JSON string
125
- */
126
- const safeBigIntStringify = (value, replacer, space) => {
127
- const combinedReplacer = (key, val) => {
128
- const bigIntHandled = bigIntReplacer(key, val);
129
- return replacer ? replacer(key, bigIntHandled) : bigIntHandled;
130
- };
131
- return JSON.stringify(value, combinedReplacer, space);
132
- };
133
-
134
- //#endregion
135
- //#region src/utils/encoding.ts
136
- /**
137
- * Encoding/decoding utilities using industry-standard libraries
138
- *
139
- * Uses viem for hex encoding and @scure/base for base64 encoding
140
- * to ensure compatibility, better performance, and reduce bundle size.
141
- *
142
- * These libraries are already dependencies in the project and are
143
- * battle-tested by millions of developers.
144
- */
145
- /**
146
- * Convert a hex string to Uint8Array
147
- * @param hex - Hex string (with or without 0x prefix)
148
- * @returns Uint8Array
149
- * @throws Error if hex string is invalid
150
- */
151
- function hexToUint8Array(hex) {
152
- if (typeof hex !== "string") throw new Error("Hex string must be a string");
153
- if (hex.trim() === "") throw new Error("Hex string cannot be empty");
154
- const prefixedHex = hex.startsWith("0x") ? hex : `0x${hex}`;
155
- try {
156
- return hexToBytes(prefixedHex);
157
- } catch (_unused) {
158
- throw new Error(`Invalid hex string: ${hex}`);
159
- }
160
- }
161
- /**
162
- * Convert a Uint8Array to hex string
163
- * @param arr - Uint8Array to convert
164
- * @returns Hex string (without 0x prefix)
165
- */
166
- function uint8ArrayToHex(arr) {
167
- return bytesToHex(arr).slice(2);
168
- }
169
- /**
170
- * Convert a base64 string to Uint8Array
171
- * @param base64String - Base64 encoded string
172
- * @returns Uint8Array
173
- * @throws Error if base64 string is invalid
174
- */
175
- function base64ToUint8Array(base64String) {
176
- if (typeof base64String !== "string") throw new Error("Base64 string must be a string");
177
- if (base64String.trim() === "") throw new Error("Base64 string cannot be empty");
178
- try {
179
- return base64.decode(base64String);
180
- } catch (_unused2) {
181
- throw new Error(`Invalid base64 string: ${base64String}`);
182
- }
183
- }
184
- /**
185
- * Convert a Uint8Array to base64 string
186
- * @param arr - Uint8Array to convert
187
- * @returns Base64 encoded string
188
- */
189
- function uint8ArrayToBase64(arr) {
190
- return base64.encode(arr);
191
- }
192
- /**
193
- * Convert a string to Uint8Array using UTF-8 encoding
194
- * @param str - String to encode
195
- * @returns Uint8Array
196
- */
197
- function stringToUint8Array(str) {
198
- return new TextEncoder().encode(str);
199
- }
200
- /**
201
- * Convert a hex string to Uint8Array (buffer-like)
202
- * Handles hex strings with or without 0x prefix
203
- * @param hex - Hex string (with or without 0x prefix)
204
- * @returns Uint8Array
205
- */
206
- function hexToBuff(hex) {
207
- return hexToUint8Array(hex.startsWith("0x") ? hex.slice(2) : hex);
208
- }
209
- /**
210
- * Convert a hex string to base64 string
211
- * Handles hex strings with or without 0x prefix
212
- * @param hex - Hex string (with or without 0x prefix)
213
- * @returns Base64 encoded string
214
- */
215
- function hexToBase64(hex) {
216
- return uint8ArrayToBase64(hexToUint8Array(hex.startsWith("0x") ? hex.slice(2) : hex));
217
- }
218
- /**
219
- * Convert a base64 string to UTF-8 string
220
- * @param base64String - Base64 encoded string
221
- * @returns Decoded UTF-8 string
222
- * @throws Error if base64 string is invalid
223
- */
224
- function base64ToUtf8(base64String) {
225
- return toUtf8(base64ToUint8Array(base64String));
226
- }
227
- /**
228
- * Convert a string or Uint8Array to Uint8Array using UTF-8 encoding
229
- * If input is already Uint8Array, returns it as-is
230
- * @param str - String or Uint8Array to encode
231
- * @returns Uint8Array
232
- */
233
- function fromUtf8(str) {
234
- if (typeof str !== "string") return str;
235
- return stringToUint8Array(str);
236
- }
237
- /**
238
- * Convert a Uint8Array or string to string using UTF-8 decoding
239
- * If input is already a string, returns it as-is
240
- * @param data - Uint8Array or string to decode
241
- * @returns Decoded string
242
- */
243
- function toUtf8(data) {
244
- if (typeof data === "string") return data;
245
- return new TextDecoder().decode(data);
246
- }
247
- /**
248
- * Convert a Uint8Array, string, null, or undefined to string using UTF-8 decoding
249
- * More robust version that handles null/undefined gracefully
250
- * @param string - Uint8Array, string, null, or undefined to decode
251
- * @returns Decoded string (empty string if input is null/undefined)
252
- */
253
- function uint8ArrayToString(string) {
254
- if (!string) return "";
255
- if (string.constructor !== Uint8Array) return string;
256
- return new TextDecoder().decode(string);
257
- }
258
- /**
259
- * Convert binary data (string or Uint8Array) to base64 string
260
- * If input is already a string, returns it as-is
261
- * @param data - String or Uint8Array to encode
262
- * @returns Base64 encoded string
263
- */
264
- function binaryToBase64(data) {
265
- return typeof data === "string" ? data : uint8ArrayToBase64(data);
266
- }
267
- /**
268
- * Convert a JSON object to base64 string
269
- * @param data - JSON object to encode
270
- * @returns Base64 encoded string
271
- */
272
- function toBase64(data) {
273
- return uint8ArrayToBase64(stringToUint8Array(safeBigIntStringify(data)));
274
- }
275
- /**
276
- * Convert a base64 string to JSON object
277
- * @param payload - Base64 encoded string
278
- * @returns Decoded JSON object
279
- * @throws Error if base64 string is invalid or contains invalid JSON
280
- */
281
- function fromBase64(payload) {
282
- if (typeof payload !== "string") throw new Error("Base64 payload must be a string");
283
- if (payload.trim() === "") throw new Error("Base64 payload cannot be empty");
284
- try {
285
- const decoded = new TextDecoder().decode(base64ToUint8Array(payload));
286
- return JSON.parse(decoded);
287
- } catch (_unused3) {
288
- throw new Error(`Failed to decode base64 JSON: ${payload}`);
289
- }
290
- }
291
- /**
292
- * Concatenate multiple Uint8Arrays into a single Uint8Array
293
- * Replacement for Buffer.concat()
294
- * @param arrays - Array of Uint8Arrays to concatenate
295
- * @returns Concatenated Uint8Array
296
- */
297
- function concatUint8Arrays(arrays) {
298
- if (arrays.length === 0) return new Uint8Array(0);
299
- const totalLength = arrays.reduce((sum, arr) => sum + arr.length, 0);
300
- const result = new Uint8Array(totalLength);
301
- let offset = 0;
302
- for (const arr of arrays) {
303
- result.set(arr, offset);
304
- offset += arr.length;
305
- }
306
- return result;
307
- }
308
-
309
- //#endregion
310
- //#region src/utils/constants.ts
311
- const BECH32_PUBKEY_ACC_PREFIX = "injpub";
312
- const BECH32_PUBKEY_VAL_PREFIX = "injvaloperpub";
313
- const BECH32_PUBKEY_CONS_PREFIX = "injvalconspub";
314
- const BECH32_ADDR_ACC_PREFIX = "inj";
315
- const BECH32_ADDR_VAL_PREFIX = "injvaloper";
316
- const BECH32_ADDR_CONS_PREFIX = "injvalcons";
317
- const DEFAULT_DERIVATION_PATH = "m/44'/60'/0'/0/0";
318
-
319
- //#endregion
320
9
  //#region src/utils/time.ts
321
10
  /**
322
11
  * Returns a timeout timestamp in milliseconds so its compatible
@@ -483,16 +172,129 @@ const ofacList = [
483
172
  ];
484
173
 
485
174
  //#endregion
486
- //#region src/utils/coins.ts
487
- const parseCoins = (input) => {
488
- return input.replace(/\s/g, "").split(",").filter(Boolean).map((part) => {
489
- const match = part.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/]{2,127})$/);
490
- if (!match) throw new Error("Got an invalid coin string");
491
- return {
492
- amount: match[1].replace(/^0+/, "") || "0",
493
- denom: match[2]
494
- };
175
+ //#region src/utils/helpers.ts
176
+ const isServerSide = () => typeof window === "undefined";
177
+ const isReactNative = () => {
178
+ return typeof document === "undefined" && typeof navigator !== "undefined" && navigator.product === "ReactNative";
179
+ };
180
+ const isNode = () => {
181
+ if (typeof window === "undefined") return true;
182
+ return typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined";
183
+ };
184
+ const isBrowser = () => {
185
+ if (isReactNative()) return false;
186
+ if (isNode()) return false;
187
+ return typeof window !== "undefined";
188
+ };
189
+ const objectToJson = (object, params) => {
190
+ const { replacer, indentation } = params || {
191
+ replacer: void 0,
192
+ indentation: 2
193
+ };
194
+ return safeBigIntStringify(object, replacer, indentation);
195
+ };
196
+ const protoObjectToJson = (object, params) => {
197
+ const { replacer, indentation } = params || {
198
+ replacer: void 0,
199
+ indentation: 2
200
+ };
201
+ if (object.toObject !== void 0) return safeBigIntStringify(object.toObject(), replacer, indentation);
202
+ return objectToJson(object, {
203
+ replacer,
204
+ indentation
205
+ });
206
+ };
207
+ const grpcCoinToUiCoin = (coin) => ({
208
+ amount: coin.amount,
209
+ denom: coin.denom
210
+ });
211
+ const sortObjectByKeysWithReduce = (obj) => {
212
+ if (typeof obj !== "object" || obj === null) return obj;
213
+ if (Array.isArray(obj)) return obj.map((e) => sortObjectByKeysWithReduce(e)).sort();
214
+ return Object.keys(obj).sort().reduce((sorted, k) => {
215
+ const key = k;
216
+ sorted[key] = sortObjectByKeysWithReduce(obj[key]);
217
+ return sorted;
218
+ }, {});
219
+ };
220
+ const sortObjectByKeys = (obj) => {
221
+ if (typeof obj !== "object" || obj === null) return obj;
222
+ if (Array.isArray(obj)) return obj.map(sortObjectByKeys);
223
+ const sortedKeys = Object.keys(obj).sort();
224
+ const result = {};
225
+ sortedKeys.forEach((key) => {
226
+ result[key] = sortObjectByKeys(obj[key]);
495
227
  });
228
+ return result;
229
+ };
230
+ const getErrorMessage = (error, endpoint) => {
231
+ if (!error.response) return `The request to ${endpoint} has failed.`;
232
+ return error.response.data ? error.response.data.message || error.response.data : error.response.statusText;
233
+ };
234
+ /**
235
+ * Converts value to it's number representation
236
+ */
237
+ const hexToNumber = (value) => {
238
+ const [negative, hexValue] = value.startsWith("-") ? [true, value.slice(1)] : [false, value];
239
+ const num = BigInt(hexValue);
240
+ if (num > Number.MAX_SAFE_INTEGER) return Number(negative ? -num : num);
241
+ if (num < Number.MIN_SAFE_INTEGER) return Number(num);
242
+ return negative ? -1 * Number(num) : Number(num);
243
+ };
244
+ function isJsonString(str) {
245
+ if (typeof str !== "string") return false;
246
+ try {
247
+ JSON.parse(str);
248
+ } catch (_unused) {
249
+ return false;
250
+ }
251
+ return true;
252
+ }
253
+ /**
254
+ * BigInt-safe JSON replacer function.
255
+ * Converts BigInt values to strings during JSON serialization.
256
+ */
257
+ const bigIntReplacer = (_key, value) => typeof value === "bigint" ? bigIntToString(value) : value;
258
+ /**
259
+ * Converts a potentially bigint value to a number.
260
+ * Handles bigint, string, and other number-like types.
261
+ * Returns 0 for null/undefined values.
262
+ */
263
+ const bigIntToNumber = (value) => {
264
+ if (value === null || value === void 0) return 0;
265
+ if (typeof value === "bigint") return Number(value);
266
+ if (typeof value === "string") return parseInt(value || "0", 10);
267
+ if (typeof value === "number") return value;
268
+ return parseInt(String(value || "0"), 10);
269
+ };
270
+ /**
271
+ * Converts a potentially bigint value to a string.
272
+ * Handles bigint, string, and other types that can be converted to string.
273
+ * Returns empty string for null/undefined values.
274
+ */
275
+ const bigIntToString = (value) => {
276
+ if (value === null || value === void 0) return "";
277
+ if (typeof value === "bigint") return value.toString();
278
+ if (typeof value === "string") return value;
279
+ if (typeof value === "number") return value.toString();
280
+ return String(value || "");
281
+ };
282
+ /**
283
+ * Stringify an object to JSON with BigInt support.
284
+ * Converts BigInt values to strings during serialization to prevent
285
+ * "Do not know how to serialize a BigInt" errors.
286
+ *
287
+ * @param value - The value to serialize
288
+ * @param replacer - Optional custom replacer function (BigInt handling is applied first)
289
+ * @param space - Optional indentation for pretty printing
290
+ * @returns JSON string
291
+ */
292
+ const safeBigIntStringify = (value, replacer, space) => {
293
+ const combinedReplacer = (key, val) => {
294
+ const bigIntHandled = bigIntReplacer(key, val);
295
+ return replacer ? replacer(key, bigIntHandled) : bigIntHandled;
296
+ };
297
+ return JSON.stringify(value, combinedReplacer, space);
496
298
  };
497
299
 
498
300
  //#endregion
@@ -979,58 +781,6 @@ const getSpotMarketDecimals = ({ minPriceTickSize, minQuantityTickSize, baseDeci
979
781
  //#endregion
980
782
  //#region src/utils/address.ts
981
783
  /**
982
- * Get injective address from Ethereum hex address
983
- *
984
- * @param ethAddress string
985
- * @returns string
986
- */
987
- const getInjectiveAddress = (ethAddress) => {
988
- const addressBuffer = toBytes(ethAddress.toString());
989
- return bech32.encode("inj", bech32.toWords(addressBuffer));
990
- };
991
- /**
992
- * Get ethereum address from injective bech32 address
993
- *
994
- * @param injectiveAddress string
995
- * @returns string
996
- */
997
- const getEthereumAddress = (injectiveAddress) => {
998
- if (injectiveAddress.startsWith("0x")) return injectiveAddress;
999
- return `0x${uint8ArrayToHex(bech32.fromWords(bech32.decode(injectiveAddress).words))}`;
1000
- };
1001
- /**
1002
- * Get ethereum address from injective bech32 address
1003
- *
1004
- * @param injectiveAddress string
1005
- * @returns string
1006
- */
1007
- const getInjectiveAddressFromSubaccountId = (subaccountId) => {
1008
- return getInjectiveAddress(subaccountId.slice(0, 42));
1009
- };
1010
- /**
1011
- * Get default subaccount id from injective bech32 address
1012
- *
1013
- * @param injectiveAddress string
1014
- * @returns string
1015
- */
1016
- const getDefaultSubaccountId = (injectiveAddress) => {
1017
- return `0x${uint8ArrayToHex(bech32.fromWords(bech32.decode(injectiveAddress).words))}${"0".repeat(24)}`;
1018
- };
1019
- /**
1020
- * Get subaccount id from injective bech32 address and an index (defaults to 0)
1021
- * @param injectiveAddress string
1022
- * @param nonce number
1023
- * @returns string
1024
- */
1025
- const getSubaccountId = (injectiveAddress, nonce = 0) => {
1026
- return `0x${uint8ArrayToHex(bech32.fromWords(bech32.decode(injectiveAddress).words))}${"0".repeat(23)}${nonce}`;
1027
- };
1028
- /** @deprecated - use getEthereumAddress */
1029
- const getAddressFromInjectiveAddress = (address) => {
1030
- if (address.startsWith("0x")) return address;
1031
- return `0x${uint8ArrayToHex(bech32.fromWords(bech32.decode(address).words))}`;
1032
- };
1033
- /**
1034
784
  * Convert Ethereum address to checksummed format (EIP-55)
1035
785
  * @param ethAddress - Ethereum address (with or without 0x prefix)
1036
786
  * @returns Checksummed Ethereum address
@@ -1042,24 +792,6 @@ const getChecksumAddress = (ethAddress) => {
1042
792
  return parseInt(addressHash[i], 16) > 7 ? char.toUpperCase() : char;
1043
793
  }).join("");
1044
794
  };
1045
- /**
1046
- * Check if address is a CW20 contract address
1047
- * @param address - Address to check
1048
- * @returns True if address is a CW20 contract address
1049
- */
1050
- const isCw20ContractAddress = (address) => address.length === 42 && address.startsWith("inj");
1051
- /**
1052
- * Add 0x prefix to hex string if not present
1053
- * @param hex - Hex string
1054
- * @returns Hex string with 0x prefix
1055
- */
1056
- const addHexPrefix = (hex) => hex.startsWith("0x") ? hex : `0x${hex}`;
1057
- /**
1058
- * Remove 0x prefix from hex string if present
1059
- * @param hex - Hex string
1060
- * @returns Hex string without 0x prefix
1061
- */
1062
- const removeHexPrefix = (hex) => hex.startsWith("0x") ? hex.slice(2) : hex;
1063
795
 
1064
796
  //#endregion
1065
797
  //#region src/client/chain/transformers/ChainGrpcCommonTransformer.ts
@@ -1195,4 +927,4 @@ const recoverTypedSignaturePubKey = async (data, signature) => {
1195
927
  };
1196
928
 
1197
929
  //#endregion
1198
- export { isNumber as $, uint8ArrayToString as $t, denomAmountToChainDenomAmountToFixed as A, protobufTimestampToUnixMs as At, derivativeQuantityFromChainQuantity as B, base64ToUtf8 as Bt, getSpotMarketTensMultiplier as C, sha256$1 as Ct, denomAmountFromChainDenomAmountToFixed as D, makeTimeoutTimestamp as Dt, denomAmountFromChainDenomAmount as E, getGasPriceBasedOnMessage as Et, derivativeMarginToChainMarginToFixed as F, BECH32_PUBKEY_ACC_PREFIX as Ft, formatAmountToAllowableDecimals as G, hexToBase64 as Gt, derivativeQuantityToChainQuantity as H, concatUint8Arrays as Ht, derivativePriceFromChainPrice as I, BECH32_PUBKEY_CONS_PREFIX as It, formatPriceToAllowableDecimals as J, stringToUint8Array as Jt, formatNumberToAllowableDecimals as K, hexToBuff as Kt, derivativePriceFromChainPriceToFixed as L, BECH32_PUBKEY_VAL_PREFIX as Lt, derivativeMarginFromChainMargin as M, BECH32_ADDR_ACC_PREFIX as Mt, derivativeMarginFromChainMarginToFixed as N, BECH32_ADDR_CONS_PREFIX as Nt, denomAmountFromGrpcChainDenomAmount as O, makeTimeoutTimestampInNs as Ot, derivativeMarginToChainMargin as P, BECH32_ADDR_VAL_PREFIX as Pt, getTensMultiplier as Q, uint8ArrayToHex as Qt, derivativePriceToChainPrice as R, DEFAULT_DERIVATION_PATH as Rt, getSpotMarketDecimals as S, sanitizeTypedData as St, cosmosSdkDecToBigNumber as T, ofacList as Tt, derivativeQuantityToChainQuantityToFixed as U, fromBase64 as Ut, derivativeQuantityFromChainQuantityToFixed as V, binaryToBase64 as Vt, formatAmountToAllowableAmount as W, fromUtf8 as Wt, getExactDecimalsFromNumber as X, toUtf8 as Xt, formatPriceToAllowablePrice as Y, toBase64 as Yt, getSignificantDecimalsFromNumber as Z, uint8ArrayToBase64 as Zt, getSubaccountId as _, privateKeyHashToPublicKeyBase64 as _t, grpcPagingToPagingV2 as a, hexToNumber as an, spotQuantityFromChainQuantity as at, getDerivativeMarketDecimals as b, publicKeyToAddress as bt, paginationUint8ArrayToString as c, isNode as cn, spotQuantityToChainQuantityToFixed as ct, getAddressFromInjectiveAddress as d, objectToJson as dn, TypedDataUtilsSanitizeData as dt, bigIntReplacer as en, numberToCosmosSdkDecString as et, getChecksumAddress as f, protoObjectToJson as fn, decompressPubKey as ft, getInjectiveAddressFromSubaccountId as g, privateKeyHashToPublicKey as gt, getInjectiveAddress as h, sortObjectByKeysWithReduce as hn, messageHash as ht, grpcPagingToPaging as i, grpcCoinToUiCoin as in, spotPriceToChainPriceToFixed as it, denomAmountToGrpcChainDenomAmount as j, protobufTimestampToUnixSeconds as jt, denomAmountToChainDenomAmount as k, protobufTimestampToDate as kt, ChainGrpcCommonTransformer as l, isReactNative as ln, SignTypedDataVersionV4 as lt, getEthereumAddress as m, sortObjectByKeys as mn, hashToHex as mt, fetchAllWithPagination as n, bigIntToString as nn, spotPriceFromChainPriceToFixed as nt, pageRequestToGrpcPageRequestV2 as o, isBrowser as on, spotQuantityFromChainQuantityToFixed as ot, getDefaultSubaccountId as p, safeBigIntStringify as pn, domainHash as pt, formatNumberToAllowableTensMultiplier as q, hexToUint8Array as qt, grpcPaginationToPagination as r, getErrorMessage as rn, spotPriceToChainPrice as rt, paginationRequestFromPagination as s, isJsonString as sn, spotQuantityToChainQuantity as st, recoverTypedSignaturePubKey as t, bigIntToNumber as tn, spotPriceFromChainPrice as tt, addHexPrefix as u, isServerSide as un, TypedDataUtilsHashStruct as ut, isCw20ContractAddress as v, privateKeyToPublicKey as vt, amountToCosmosSdkDecAmount as w, parseCoins as wt, getDerivativeMarketTensMultiplier as x, ripemd160$1 as xt, removeHexPrefix as y, privateKeyToPublicKeyBase64 as yt, derivativePriceToChainPriceToFixed as z, base64ToUint8Array as zt };
930
+ export { spotQuantityToChainQuantityToFixed as $, derivativePriceToChainPriceToFixed as A, sortObjectByKeysWithReduce as At, formatPriceToAllowablePrice as B, derivativeMarginFromChainMargin as C, isNode as Ct, derivativePriceFromChainPrice as D, protoObjectToJson as Dt, derivativeMarginToChainMarginToFixed as E, objectToJson as Et, formatAmountToAllowableAmount as F, protobufTimestampToDate as Ft, numberToCosmosSdkDecString as G, getSignificantDecimalsFromNumber as H, formatAmountToAllowableDecimals as I, protobufTimestampToUnixMs as It, spotPriceToChainPrice as J, spotPriceFromChainPrice as K, formatNumberToAllowableDecimals as L, protobufTimestampToUnixSeconds as Lt, derivativeQuantityFromChainQuantityToFixed as M, getGasPriceBasedOnMessage as Mt, derivativeQuantityToChainQuantity as N, makeTimeoutTimestamp as Nt, derivativePriceFromChainPriceToFixed as O, safeBigIntStringify as Ot, derivativeQuantityToChainQuantityToFixed as P, makeTimeoutTimestampInNs as Pt, spotQuantityToChainQuantity as Q, formatNumberToAllowableTensMultiplier as R, denomAmountToGrpcChainDenomAmount as S, isJsonString as St, derivativeMarginToChainMargin as T, isServerSide as Tt, getTensMultiplier as U, getExactDecimalsFromNumber as V, isNumber as W, spotQuantityFromChainQuantity as X, spotPriceToChainPriceToFixed as Y, spotQuantityFromChainQuantityToFixed as Z, denomAmountFromChainDenomAmount as _, bigIntToString as _t, grpcPagingToPagingV2 as a, hashToHex as at, denomAmountToChainDenomAmount as b, hexToNumber as bt, paginationUint8ArrayToString as c, privateKeyHashToPublicKeyBase64 as ct, getDerivativeMarketDecimals as d, publicKeyToAddress as dt, SignTypedDataVersionV4 as et, getDerivativeMarketTensMultiplier as f, ripemd160$1 as ft, cosmosSdkDecToBigNumber as g, bigIntToNumber as gt, amountToCosmosSdkDecAmount as h, bigIntReplacer as ht, grpcPagingToPaging as i, domainHash as it, derivativeQuantityFromChainQuantity as j, ofacList as jt, derivativePriceToChainPrice as k, sortObjectByKeys as kt, ChainGrpcCommonTransformer as l, privateKeyToPublicKey as lt, getSpotMarketTensMultiplier as m, sha256$1 as mt, fetchAllWithPagination as n, TypedDataUtilsSanitizeData as nt, pageRequestToGrpcPageRequestV2 as o, messageHash as ot, getSpotMarketDecimals as p, sanitizeTypedData as pt, spotPriceFromChainPriceToFixed as q, grpcPaginationToPagination as r, decompressPubKey as rt, paginationRequestFromPagination as s, privateKeyHashToPublicKey as st, recoverTypedSignaturePubKey as t, TypedDataUtilsHashStruct as tt, getChecksumAddress as u, privateKeyToPublicKeyBase64 as ut, denomAmountFromChainDenomAmountToFixed as v, getErrorMessage as vt, derivativeMarginFromChainMarginToFixed as w, isReactNative as wt, denomAmountToChainDenomAmountToFixed as x, isBrowser as xt, denomAmountFromGrpcChainDenomAmount as y, grpcCoinToUiCoin as yt, formatPriceToAllowableDecimals as z };
@@ -1,10 +1,15 @@
1
- import "./tx_pb-Bb9pvoP6.js";
2
- import "./index-DCxzFRMk.js";
3
- import { $d as addHexPrefix, $f as bigIntToNumber, Ad as paginationUint8ArrayToString, Af as derivativeQuantityFromChainQuantityToFixed, Ap as parseCoins, Bd as binaryToBase64, Bf as getSignificantDecimalsFromNumber, Cd as recoverTypedSignaturePubKey, Cf as derivativeMarginToChainMargin, Cp as privateKeyHashToPublicKeyBase64, Dd as grpcPagingToPagingV2, Df as derivativePriceToChainPrice, Dp as ripemd160, Ed as grpcPagingToPaging, Ef as derivativePriceFromChainPriceToFixed, Ep as publicKeyToAddress, Fd as BECH32_PUBKEY_CONS_PREFIX, Ff as formatNumberToAllowableDecimals, Fp as makeTimeoutTimestampInNs, Gd as hexToBuff, Gf as spotPriceFromChainPriceToFixed, Hd as fromBase64, Hf as isNumber, Id as BECH32_PUBKEY_VAL_PREFIX, If as formatNumberToAllowableTensMultiplier, Ip as protobufTimestampToDate, Jd as toBase64, Jf as spotQuantityFromChainQuantity, Kd as hexToUint8Array, Kf as spotPriceToChainPrice, Ld as DEFAULT_DERIVATION_PATH, Lf as formatPriceToAllowableDecimals, Lp as protobufTimestampToUnixMs, Md as BECH32_ADDR_CONS_PREFIX, Mf as derivativeQuantityToChainQuantityToFixed, Mp as getGrpcWebTransport, Nd as BECH32_ADDR_VAL_PREFIX, Nf as formatAmountToAllowableAmount, Np as getGasPriceBasedOnMessage, Od as pageRequestToGrpcPageRequestV2, Of as derivativePriceToChainPriceToFixed, Op as sanitizeTypedData, Pd as BECH32_PUBKEY_ACC_PREFIX, Pf as formatAmountToAllowableDecimals, Pp as makeTimeoutTimestamp, Qd as uint8ArrayToString, Qf as bigIntReplacer, Rd as base64ToUint8Array, Rf as formatPriceToAllowablePrice, Rp as protobufTimestampToUnixSeconds, Sf as derivativeMarginFromChainMarginToFixed, Sp as privateKeyHashToPublicKey, Td as grpcPaginationToPagination, Tf as derivativePriceFromChainPrice, Tp as privateKeyToPublicKeyBase64, Ud as fromUtf8, Uf as numberToCosmosSdkDecString, Vd as concatUint8Arrays, Vf as getTensMultiplier, Wd as hexToBase64, Wf as spotPriceFromChainPrice, Xd as uint8ArrayToBase64, Xf as spotQuantityToChainQuantity, Yd as toUtf8, Yf as spotQuantityFromChainQuantityToFixed, Zd as uint8ArrayToHex, Zf as spotQuantityToChainQuantityToFixed, _f as denomAmountFromGrpcChainDenomAmount, _p as TypedMessageV4, af as getInjectiveAddressFromSubaccountId, ap as isJsonString, bf as denomAmountToGrpcChainDenomAmount, bp as hashToHex, cS as GrpcWebFetchTransport, cf as removeHexPrefix, cp as isServerSide, df as getSpotMarketDecimals, dp as safeBigIntStringify, ef as getAddressFromInjectiveAddress, ep as bigIntToString, ff as getSpotMarketTensMultiplier, fp as sortObjectByKeys, gf as denomAmountFromChainDenomAmountToFixed, gp as TypedDataUtilsSanitizeData, hf as denomAmountFromChainDenomAmount, hp as TypedDataUtilsHashStruct, if as getInjectiveAddress, ip as isBrowser, jd as BECH32_ADDR_ACC_PREFIX, jf as derivativeQuantityToChainQuantity, jp as ofacList, kd as paginationRequestFromPagination, kf as derivativeQuantityFromChainQuantity, kp as sha256, lf as getDerivativeMarketDecimals, lp as objectToJson, mf as cosmosSdkDecToBigNumber, mp as SignTypedDataVersionV4, nf as getDefaultSubaccountId, np as grpcCoinToUiCoin, of as getSubaccountId, op as isNode, pf as amountToCosmosSdkDecAmount, pp as sortObjectByKeysWithReduce, qd as stringToUint8Array, qf as spotPriceToChainPriceToFixed, rf as getEthereumAddress, rp as hexToNumber, sf as isCw20ContractAddress, sp as isReactNative, tf as getChecksumAddress, tp as getErrorMessage, uf as getDerivativeMarketTensMultiplier, up as protoObjectToJson, vf as denomAmountToChainDenomAmount, vp as decompressPubKey, wd as fetchAllWithPagination, wf as derivativeMarginToChainMarginToFixed, wp as privateKeyToPublicKey, xf as derivativeMarginFromChainMargin, xp as messageHash, yf as denomAmountToChainDenomAmountToFixed, yp as domainHash, zd as base64ToUtf8, zf as getExactDecimalsFromNumber } from "./index-CTAobhk3.js";
4
- import "./BaseGrpcConsumer-C8YhjVn6.js";
5
- import "./index-B0mpSZSK.js";
6
- import "./index-CZhX_Ynf.js";
7
- import "./index-BrfNx2yV.js";
8
- import "./index-JlA-uSsc.js";
9
- import "./index-Bw9qjGRX.js";
10
- export { BECH32_ADDR_ACC_PREFIX, BECH32_ADDR_CONS_PREFIX, BECH32_ADDR_VAL_PREFIX, BECH32_PUBKEY_ACC_PREFIX, BECH32_PUBKEY_CONS_PREFIX, BECH32_PUBKEY_VAL_PREFIX, DEFAULT_DERIVATION_PATH, GrpcWebFetchTransport, SignTypedDataVersionV4, TypedDataUtilsHashStruct, TypedDataUtilsSanitizeData, TypedMessageV4, addHexPrefix, amountToCosmosSdkDecAmount, base64ToUint8Array, base64ToUtf8, bigIntReplacer, bigIntToNumber, bigIntToString, binaryToBase64, concatUint8Arrays, cosmosSdkDecToBigNumber, decompressPubKey, denomAmountFromChainDenomAmount, denomAmountFromChainDenomAmountToFixed, denomAmountFromGrpcChainDenomAmount, denomAmountToChainDenomAmount, denomAmountToChainDenomAmountToFixed, denomAmountToGrpcChainDenomAmount, derivativeMarginFromChainMargin, derivativeMarginFromChainMarginToFixed, derivativeMarginToChainMargin, derivativeMarginToChainMarginToFixed, derivativePriceFromChainPrice, derivativePriceFromChainPriceToFixed, derivativePriceToChainPrice, derivativePriceToChainPriceToFixed, derivativeQuantityFromChainQuantity, derivativeQuantityFromChainQuantityToFixed, derivativeQuantityToChainQuantity, derivativeQuantityToChainQuantityToFixed, domainHash, fetchAllWithPagination, formatAmountToAllowableAmount, formatAmountToAllowableDecimals, formatNumberToAllowableDecimals, formatNumberToAllowableTensMultiplier, formatPriceToAllowableDecimals, formatPriceToAllowablePrice, fromBase64, fromUtf8, getAddressFromInjectiveAddress, getChecksumAddress, getDefaultSubaccountId, getDerivativeMarketDecimals, getDerivativeMarketTensMultiplier, getErrorMessage, getEthereumAddress, getExactDecimalsFromNumber, getGasPriceBasedOnMessage, getGrpcWebTransport, getInjectiveAddress, getInjectiveAddressFromSubaccountId, getSignificantDecimalsFromNumber, getSpotMarketDecimals, getSpotMarketTensMultiplier, getSubaccountId, getTensMultiplier, grpcCoinToUiCoin, grpcPaginationToPagination, grpcPagingToPaging, grpcPagingToPagingV2, hashToHex, hexToBase64, hexToBuff, hexToNumber, hexToUint8Array, isBrowser, isCw20ContractAddress, isJsonString, isNode, isNumber, isReactNative, isServerSide, makeTimeoutTimestamp, makeTimeoutTimestampInNs, messageHash, numberToCosmosSdkDecString, objectToJson, ofacList, pageRequestToGrpcPageRequestV2, paginationRequestFromPagination, paginationUint8ArrayToString, parseCoins, privateKeyHashToPublicKey, privateKeyHashToPublicKeyBase64, privateKeyToPublicKey, privateKeyToPublicKeyBase64, protoObjectToJson, protobufTimestampToDate, protobufTimestampToUnixMs, protobufTimestampToUnixSeconds, publicKeyToAddress, recoverTypedSignaturePubKey, removeHexPrefix, ripemd160, safeBigIntStringify, sanitizeTypedData, sha256, sortObjectByKeys, sortObjectByKeysWithReduce, spotPriceFromChainPrice, spotPriceFromChainPriceToFixed, spotPriceToChainPrice, spotPriceToChainPriceToFixed, spotQuantityFromChainQuantity, spotQuantityFromChainQuantityToFixed, spotQuantityToChainQuantity, spotQuantityToChainQuantityToFixed, stringToUint8Array, toBase64, toUtf8, uint8ArrayToBase64, uint8ArrayToHex, uint8ArrayToString };
1
+ import "./tx_pb-DhFh6sWY.js";
2
+ import "./index-fqs5eTyD.js";
3
+ import "./light-CrlUMC8c.js";
4
+ import { $d as derivativeQuantityFromChainQuantityToFixed, $f as ofacList, Ad as paginationUint8ArrayToString, Af as isReactNative, Ax as GrpcWebFetchTransport, Bd as denomAmountFromGrpcChainDenomAmount, Bf as TypedMessageV4, Cd as recoverTypedSignaturePubKey, Cf as bigIntToString, Dd as grpcPagingToPagingV2, Df as isBrowser, Ed as grpcPagingToPaging, Ef as hexToNumber, Fd as getSpotMarketTensMultiplier, Ff as sortObjectByKeys, Gd as derivativeMarginFromChainMarginToFixed, Gf as privateKeyHashToPublicKey, Hd as denomAmountToChainDenomAmountToFixed, Hf as domainHash, Id as amountToCosmosSdkDecAmount, If as sortObjectByKeysWithReduce, Jd as derivativePriceFromChainPrice, Jf as privateKeyToPublicKeyBase64, Kd as derivativeMarginToChainMargin, Kf as privateKeyHashToPublicKeyBase64, Ld as cosmosSdkDecToBigNumber, Lf as SignTypedDataVersionV4, Md as getDerivativeMarketDecimals, Mf as objectToJson, Nd as getDerivativeMarketTensMultiplier, Nf as protoObjectToJson, Od as pageRequestToGrpcPageRequestV2, Of as isJsonString, Pd as getSpotMarketDecimals, Pf as safeBigIntStringify, Qd as derivativeQuantityFromChainQuantity, Qf as sha256, Rd as denomAmountFromChainDenomAmount, Rf as TypedDataUtilsHashStruct, Sf as bigIntToNumber, Td as grpcPaginationToPagination, Tf as grpcCoinToUiCoin, Ud as denomAmountToGrpcChainDenomAmount, Uf as hashToHex, Vd as denomAmountToChainDenomAmount, Vf as decompressPubKey, Wd as derivativeMarginFromChainMargin, Wf as messageHash, Xd as derivativePriceToChainPrice, Xf as ripemd160, Yd as derivativePriceFromChainPriceToFixed, Yf as publicKeyToAddress, Zd as derivativePriceToChainPriceToFixed, Zf as sanitizeTypedData, _f as spotQuantityFromChainQuantity, af as formatNumberToAllowableTensMultiplier, ap as protobufTimestampToUnixMs, bf as spotQuantityToChainQuantityToFixed, cf as getExactDecimalsFromNumber, df as isNumber, ef as derivativeQuantityToChainQuantity, ep as getGrpcWebTransport, ff as numberToCosmosSdkDecString, gf as spotPriceToChainPriceToFixed, hf as spotPriceToChainPrice, if as formatNumberToAllowableDecimals, ip as protobufTimestampToDate, jd as getChecksumAddress, jf as isServerSide, kd as paginationRequestFromPagination, kf as isNode, lf as getSignificantDecimalsFromNumber, mf as spotPriceFromChainPriceToFixed, nf as formatAmountToAllowableAmount, np as makeTimeoutTimestamp, of as formatPriceToAllowableDecimals, op as protobufTimestampToUnixSeconds, pf as spotPriceFromChainPrice, qd as derivativeMarginToChainMarginToFixed, qf as privateKeyToPublicKey, rf as formatAmountToAllowableDecimals, rp as makeTimeoutTimestampInNs, sf as formatPriceToAllowablePrice, tf as derivativeQuantityToChainQuantityToFixed, tp as getGasPriceBasedOnMessage, uf as getTensMultiplier, vf as spotQuantityFromChainQuantityToFixed, wd as fetchAllWithPagination, wf as getErrorMessage, xf as bigIntReplacer, yf as spotQuantityToChainQuantity, zd as denomAmountFromChainDenomAmountToFixed, zf as TypedDataUtilsSanitizeData } from "./index-CnGE9D2Q.js";
5
+ import "./BaseGrpcConsumer-B9J3abKI.js";
6
+ import "./index-DIP5sGCK.js";
7
+ import "./index-reHqEgGi.js";
8
+ import { t as parseCoins } from "./coins-ceq0Id0M.js";
9
+ import { a as getEthereumAddress, c as getSubaccountId, d as removeHexPrefix, i as getDefaultSubaccountId, l as hexToBytes, n as bytesToHex, o as getInjectiveAddress, r as getAddressFromInjectiveAddress, s as getInjectiveAddressFromSubaccountId, t as addHexPrefix, u as isCw20ContractAddress } from "./address-light-BcZDS-ks.js";
10
+ import { a as fromBase64, c as hexToBuff, d as toBase64, f as toUtf8, h as uint8ArrayToString, i as concatUint8Arrays, l as hexToUint8Array, m as uint8ArrayToHex, n as base64ToUtf8, o as fromUtf8, p as uint8ArrayToBase64, r as binaryToBase64, s as hexToBase64, t as base64ToUint8Array, u as stringToUint8Array } from "./encoding-light-18k0e_8v.js";
11
+ import { a as BECH32_PUBKEY_CONS_PREFIX, i as BECH32_PUBKEY_ACC_PREFIX, n as BECH32_ADDR_CONS_PREFIX, o as BECH32_PUBKEY_VAL_PREFIX, r as BECH32_ADDR_VAL_PREFIX, s as DEFAULT_DERIVATION_PATH, t as BECH32_ADDR_ACC_PREFIX } from "./constants-BZ28P_pH.js";
12
+ import "./index-BAxR1qDR.js";
13
+ import "./index-lki5l2NS.js";
14
+ import "./index-DPmNu-i9.js";
15
+ export { BECH32_ADDR_ACC_PREFIX, BECH32_ADDR_CONS_PREFIX, BECH32_ADDR_VAL_PREFIX, BECH32_PUBKEY_ACC_PREFIX, BECH32_PUBKEY_CONS_PREFIX, BECH32_PUBKEY_VAL_PREFIX, DEFAULT_DERIVATION_PATH, GrpcWebFetchTransport, SignTypedDataVersionV4, TypedDataUtilsHashStruct, TypedDataUtilsSanitizeData, TypedMessageV4, addHexPrefix, amountToCosmosSdkDecAmount, base64ToUint8Array, base64ToUtf8, bigIntReplacer, bigIntToNumber, bigIntToString, binaryToBase64, bytesToHex, concatUint8Arrays, cosmosSdkDecToBigNumber, decompressPubKey, denomAmountFromChainDenomAmount, denomAmountFromChainDenomAmountToFixed, denomAmountFromGrpcChainDenomAmount, denomAmountToChainDenomAmount, denomAmountToChainDenomAmountToFixed, denomAmountToGrpcChainDenomAmount, derivativeMarginFromChainMargin, derivativeMarginFromChainMarginToFixed, derivativeMarginToChainMargin, derivativeMarginToChainMarginToFixed, derivativePriceFromChainPrice, derivativePriceFromChainPriceToFixed, derivativePriceToChainPrice, derivativePriceToChainPriceToFixed, derivativeQuantityFromChainQuantity, derivativeQuantityFromChainQuantityToFixed, derivativeQuantityToChainQuantity, derivativeQuantityToChainQuantityToFixed, domainHash, fetchAllWithPagination, formatAmountToAllowableAmount, formatAmountToAllowableDecimals, formatNumberToAllowableDecimals, formatNumberToAllowableTensMultiplier, formatPriceToAllowableDecimals, formatPriceToAllowablePrice, fromBase64, fromUtf8, getAddressFromInjectiveAddress, getChecksumAddress, getDefaultSubaccountId, getDerivativeMarketDecimals, getDerivativeMarketTensMultiplier, getErrorMessage, getEthereumAddress, getExactDecimalsFromNumber, getGasPriceBasedOnMessage, getGrpcWebTransport, getInjectiveAddress, getInjectiveAddressFromSubaccountId, getSignificantDecimalsFromNumber, getSpotMarketDecimals, getSpotMarketTensMultiplier, getSubaccountId, getTensMultiplier, grpcCoinToUiCoin, grpcPaginationToPagination, grpcPagingToPaging, grpcPagingToPagingV2, hashToHex, hexToBase64, hexToBuff, hexToBytes, hexToNumber, hexToUint8Array, isBrowser, isCw20ContractAddress, isJsonString, isNode, isNumber, isReactNative, isServerSide, makeTimeoutTimestamp, makeTimeoutTimestampInNs, messageHash, numberToCosmosSdkDecString, objectToJson, ofacList, pageRequestToGrpcPageRequestV2, paginationRequestFromPagination, paginationUint8ArrayToString, parseCoins, privateKeyHashToPublicKey, privateKeyHashToPublicKeyBase64, privateKeyToPublicKey, privateKeyToPublicKeyBase64, protoObjectToJson, protobufTimestampToDate, protobufTimestampToUnixMs, protobufTimestampToUnixSeconds, publicKeyToAddress, recoverTypedSignaturePubKey, removeHexPrefix, ripemd160, safeBigIntStringify, sanitizeTypedData, sha256, sortObjectByKeys, sortObjectByKeysWithReduce, spotPriceFromChainPrice, spotPriceFromChainPriceToFixed, spotPriceToChainPrice, spotPriceToChainPriceToFixed, spotQuantityFromChainQuantity, spotQuantityFromChainQuantityToFixed, spotQuantityToChainQuantity, spotQuantityToChainQuantityToFixed, stringToUint8Array, toBase64, toUtf8, uint8ArrayToBase64, uint8ArrayToHex, uint8ArrayToString };
package/dist/esm/utils.js CHANGED
@@ -1,4 +1,8 @@
1
- import { $ as isNumber, $t as uint8ArrayToString, A as denomAmountToChainDenomAmountToFixed, At as protobufTimestampToUnixMs, B as derivativeQuantityFromChainQuantity, Bt as base64ToUtf8, C as getSpotMarketTensMultiplier, Ct as sha256, D as denomAmountFromChainDenomAmountToFixed, Dt as makeTimeoutTimestamp, E as denomAmountFromChainDenomAmount, Et as getGasPriceBasedOnMessage, F as derivativeMarginToChainMarginToFixed, Ft as BECH32_PUBKEY_ACC_PREFIX, G as formatAmountToAllowableDecimals, Gt as hexToBase64, H as derivativeQuantityToChainQuantity, Ht as concatUint8Arrays, I as derivativePriceFromChainPrice, It as BECH32_PUBKEY_CONS_PREFIX, J as formatPriceToAllowableDecimals, Jt as stringToUint8Array, K as formatNumberToAllowableDecimals, Kt as hexToBuff, L as derivativePriceFromChainPriceToFixed, Lt as BECH32_PUBKEY_VAL_PREFIX, M as derivativeMarginFromChainMargin, Mt as BECH32_ADDR_ACC_PREFIX, N as derivativeMarginFromChainMarginToFixed, Nt as BECH32_ADDR_CONS_PREFIX, O as denomAmountFromGrpcChainDenomAmount, Ot as makeTimeoutTimestampInNs, P as derivativeMarginToChainMargin, Pt as BECH32_ADDR_VAL_PREFIX, Q as getTensMultiplier, Qt as uint8ArrayToHex, R as derivativePriceToChainPrice, Rt as DEFAULT_DERIVATION_PATH, S as getSpotMarketDecimals, St as sanitizeTypedData, T as cosmosSdkDecToBigNumber, Tt as ofacList, U as derivativeQuantityToChainQuantityToFixed, Ut as fromBase64, V as derivativeQuantityFromChainQuantityToFixed, Vt as binaryToBase64, W as formatAmountToAllowableAmount, Wt as fromUtf8, X as getExactDecimalsFromNumber, Xt as toUtf8, Y as formatPriceToAllowablePrice, Yt as toBase64, Z as getSignificantDecimalsFromNumber, Zt as uint8ArrayToBase64, _ as getSubaccountId, _t as privateKeyHashToPublicKeyBase64, a as grpcPagingToPagingV2, an as hexToNumber, at as spotQuantityFromChainQuantity, b as getDerivativeMarketDecimals, bt as publicKeyToAddress, c as paginationUint8ArrayToString, cn as isNode, ct as spotQuantityToChainQuantityToFixed, d as getAddressFromInjectiveAddress, dn as objectToJson, dt as TypedDataUtilsSanitizeData, en as bigIntReplacer, et as numberToCosmosSdkDecString, f as getChecksumAddress, fn as protoObjectToJson, ft as decompressPubKey, g as getInjectiveAddressFromSubaccountId, gt as privateKeyHashToPublicKey, h as getInjectiveAddress, hn as sortObjectByKeysWithReduce, ht as messageHash, i as grpcPagingToPaging, in as grpcCoinToUiCoin, it as spotPriceToChainPriceToFixed, j as denomAmountToGrpcChainDenomAmount, jt as protobufTimestampToUnixSeconds, k as denomAmountToChainDenomAmount, kt as protobufTimestampToDate, ln as isReactNative, lt as SignTypedDataVersionV4, m as getEthereumAddress, mn as sortObjectByKeys, mt as hashToHex, n as fetchAllWithPagination, nn as bigIntToString, nt as spotPriceFromChainPriceToFixed, o as pageRequestToGrpcPageRequestV2, on as isBrowser, ot as spotQuantityFromChainQuantityToFixed, p as getDefaultSubaccountId, pn as safeBigIntStringify, pt as domainHash, q as formatNumberToAllowableTensMultiplier, qt as hexToUint8Array, r as grpcPaginationToPagination, rn as getErrorMessage, rt as spotPriceToChainPrice, s as paginationRequestFromPagination, sn as isJsonString, st as spotQuantityToChainQuantity, t as recoverTypedSignaturePubKey, tn as bigIntToNumber, tt as spotPriceFromChainPrice, u as addHexPrefix, un as isServerSide, ut as TypedDataUtilsHashStruct, v as isCw20ContractAddress, vt as privateKeyToPublicKey, w as amountToCosmosSdkDecAmount, wt as parseCoins, x as getDerivativeMarketTensMultiplier, xt as ripemd160, y as removeHexPrefix, yt as privateKeyToPublicKeyBase64, z as derivativePriceToChainPriceToFixed, zt as base64ToUint8Array } from "./utils-bfl-Zimr.js";
2
- import { n as getGrpcWebTransport, t as GrpcWebFetchTransport } from "./grpc-lYZqzL0k.js";
1
+ import { a as fromBase64, c as hexToBuff, d as toBase64, f as toUtf8, h as uint8ArrayToString, i as concatUint8Arrays, l as hexToUint8Array, m as uint8ArrayToHex, n as base64ToUtf8, o as fromUtf8, p as uint8ArrayToBase64, r as binaryToBase64, s as hexToBase64, t as base64ToUint8Array, u as stringToUint8Array } from "./encoding-light-DHtTGSg1.js";
2
+ import { a as BECH32_PUBKEY_CONS_PREFIX, i as BECH32_PUBKEY_ACC_PREFIX, n as BECH32_ADDR_CONS_PREFIX, o as BECH32_PUBKEY_VAL_PREFIX, r as BECH32_ADDR_VAL_PREFIX, s as DEFAULT_DERIVATION_PATH, t as BECH32_ADDR_ACC_PREFIX } from "./constants-CCVyqUU9.js";
3
+ import { $ as spotQuantityToChainQuantityToFixed, A as derivativePriceToChainPriceToFixed, At as sortObjectByKeysWithReduce, B as formatPriceToAllowablePrice, C as derivativeMarginFromChainMargin, Ct as isNode, D as derivativePriceFromChainPrice, Dt as protoObjectToJson, E as derivativeMarginToChainMarginToFixed, Et as objectToJson, F as formatAmountToAllowableAmount, Ft as protobufTimestampToDate, G as numberToCosmosSdkDecString, H as getSignificantDecimalsFromNumber, I as formatAmountToAllowableDecimals, It as protobufTimestampToUnixMs, J as spotPriceToChainPrice, K as spotPriceFromChainPrice, L as formatNumberToAllowableDecimals, Lt as protobufTimestampToUnixSeconds, M as derivativeQuantityFromChainQuantityToFixed, Mt as getGasPriceBasedOnMessage, N as derivativeQuantityToChainQuantity, Nt as makeTimeoutTimestamp, O as derivativePriceFromChainPriceToFixed, Ot as safeBigIntStringify, P as derivativeQuantityToChainQuantityToFixed, Pt as makeTimeoutTimestampInNs, Q as spotQuantityToChainQuantity, R as formatNumberToAllowableTensMultiplier, S as denomAmountToGrpcChainDenomAmount, St as isJsonString, T as derivativeMarginToChainMargin, Tt as isServerSide, U as getTensMultiplier, V as getExactDecimalsFromNumber, W as isNumber, X as spotQuantityFromChainQuantity, Y as spotPriceToChainPriceToFixed, Z as spotQuantityFromChainQuantityToFixed, _ as denomAmountFromChainDenomAmount, _t as bigIntToString, a as grpcPagingToPagingV2, at as hashToHex, b as denomAmountToChainDenomAmount, bt as hexToNumber, c as paginationUint8ArrayToString, ct as privateKeyHashToPublicKeyBase64, d as getDerivativeMarketDecimals, dt as publicKeyToAddress, et as SignTypedDataVersionV4, f as getDerivativeMarketTensMultiplier, ft as ripemd160, g as cosmosSdkDecToBigNumber, gt as bigIntToNumber, h as amountToCosmosSdkDecAmount, ht as bigIntReplacer, i as grpcPagingToPaging, it as domainHash, j as derivativeQuantityFromChainQuantity, jt as ofacList, k as derivativePriceToChainPrice, kt as sortObjectByKeys, lt as privateKeyToPublicKey, m as getSpotMarketTensMultiplier, mt as sha256, n as fetchAllWithPagination, nt as TypedDataUtilsSanitizeData, o as pageRequestToGrpcPageRequestV2, ot as messageHash, p as getSpotMarketDecimals, pt as sanitizeTypedData, q as spotPriceFromChainPriceToFixed, r as grpcPaginationToPagination, rt as decompressPubKey, s as paginationRequestFromPagination, st as privateKeyHashToPublicKey, t as recoverTypedSignaturePubKey, tt as TypedDataUtilsHashStruct, u as getChecksumAddress, ut as privateKeyToPublicKeyBase64, v as denomAmountFromChainDenomAmountToFixed, vt as getErrorMessage, w as derivativeMarginFromChainMarginToFixed, wt as isReactNative, x as denomAmountToChainDenomAmountToFixed, xt as isBrowser, y as denomAmountFromGrpcChainDenomAmount, yt as grpcCoinToUiCoin, z as formatPriceToAllowableDecimals } from "./utils-B3t50ZnB.js";
4
+ import { n as getGrpcWebTransport, t as GrpcWebFetchTransport } from "./grpc-aI_RLGoG.js";
5
+ import { t as parseCoins } from "./coins-D4vONigS.js";
6
+ import { a as getEthereumAddress, c as getSubaccountId, d as removeHexPrefix, i as getDefaultSubaccountId, l as hexToBytes, n as bytesToHex, o as getInjectiveAddress, r as getAddressFromInjectiveAddress, s as getInjectiveAddressFromSubaccountId, t as addHexPrefix, u as isCw20ContractAddress } from "./address-light-C9skTx0P.js";
3
7
 
4
- export { BECH32_ADDR_ACC_PREFIX, BECH32_ADDR_CONS_PREFIX, BECH32_ADDR_VAL_PREFIX, BECH32_PUBKEY_ACC_PREFIX, BECH32_PUBKEY_CONS_PREFIX, BECH32_PUBKEY_VAL_PREFIX, DEFAULT_DERIVATION_PATH, GrpcWebFetchTransport, SignTypedDataVersionV4, TypedDataUtilsHashStruct, TypedDataUtilsSanitizeData, addHexPrefix, amountToCosmosSdkDecAmount, base64ToUint8Array, base64ToUtf8, bigIntReplacer, bigIntToNumber, bigIntToString, binaryToBase64, concatUint8Arrays, cosmosSdkDecToBigNumber, decompressPubKey, denomAmountFromChainDenomAmount, denomAmountFromChainDenomAmountToFixed, denomAmountFromGrpcChainDenomAmount, denomAmountToChainDenomAmount, denomAmountToChainDenomAmountToFixed, denomAmountToGrpcChainDenomAmount, derivativeMarginFromChainMargin, derivativeMarginFromChainMarginToFixed, derivativeMarginToChainMargin, derivativeMarginToChainMarginToFixed, derivativePriceFromChainPrice, derivativePriceFromChainPriceToFixed, derivativePriceToChainPrice, derivativePriceToChainPriceToFixed, derivativeQuantityFromChainQuantity, derivativeQuantityFromChainQuantityToFixed, derivativeQuantityToChainQuantity, derivativeQuantityToChainQuantityToFixed, domainHash, fetchAllWithPagination, formatAmountToAllowableAmount, formatAmountToAllowableDecimals, formatNumberToAllowableDecimals, formatNumberToAllowableTensMultiplier, formatPriceToAllowableDecimals, formatPriceToAllowablePrice, fromBase64, fromUtf8, getAddressFromInjectiveAddress, getChecksumAddress, getDefaultSubaccountId, getDerivativeMarketDecimals, getDerivativeMarketTensMultiplier, getErrorMessage, getEthereumAddress, getExactDecimalsFromNumber, getGasPriceBasedOnMessage, getGrpcWebTransport, getInjectiveAddress, getInjectiveAddressFromSubaccountId, getSignificantDecimalsFromNumber, getSpotMarketDecimals, getSpotMarketTensMultiplier, getSubaccountId, getTensMultiplier, grpcCoinToUiCoin, grpcPaginationToPagination, grpcPagingToPaging, grpcPagingToPagingV2, hashToHex, hexToBase64, hexToBuff, hexToNumber, hexToUint8Array, isBrowser, isCw20ContractAddress, isJsonString, isNode, isNumber, isReactNative, isServerSide, makeTimeoutTimestamp, makeTimeoutTimestampInNs, messageHash, numberToCosmosSdkDecString, objectToJson, ofacList, pageRequestToGrpcPageRequestV2, paginationRequestFromPagination, paginationUint8ArrayToString, parseCoins, privateKeyHashToPublicKey, privateKeyHashToPublicKeyBase64, privateKeyToPublicKey, privateKeyToPublicKeyBase64, protoObjectToJson, protobufTimestampToDate, protobufTimestampToUnixMs, protobufTimestampToUnixSeconds, publicKeyToAddress, recoverTypedSignaturePubKey, removeHexPrefix, ripemd160, safeBigIntStringify, sanitizeTypedData, sha256, sortObjectByKeys, sortObjectByKeysWithReduce, spotPriceFromChainPrice, spotPriceFromChainPriceToFixed, spotPriceToChainPrice, spotPriceToChainPriceToFixed, spotQuantityFromChainQuantity, spotQuantityFromChainQuantityToFixed, spotQuantityToChainQuantity, spotQuantityToChainQuantityToFixed, stringToUint8Array, toBase64, toUtf8, uint8ArrayToBase64, uint8ArrayToHex, uint8ArrayToString };
8
+ export { BECH32_ADDR_ACC_PREFIX, BECH32_ADDR_CONS_PREFIX, BECH32_ADDR_VAL_PREFIX, BECH32_PUBKEY_ACC_PREFIX, BECH32_PUBKEY_CONS_PREFIX, BECH32_PUBKEY_VAL_PREFIX, DEFAULT_DERIVATION_PATH, GrpcWebFetchTransport, SignTypedDataVersionV4, TypedDataUtilsHashStruct, TypedDataUtilsSanitizeData, addHexPrefix, amountToCosmosSdkDecAmount, base64ToUint8Array, base64ToUtf8, bigIntReplacer, bigIntToNumber, bigIntToString, binaryToBase64, bytesToHex, concatUint8Arrays, cosmosSdkDecToBigNumber, decompressPubKey, denomAmountFromChainDenomAmount, denomAmountFromChainDenomAmountToFixed, denomAmountFromGrpcChainDenomAmount, denomAmountToChainDenomAmount, denomAmountToChainDenomAmountToFixed, denomAmountToGrpcChainDenomAmount, derivativeMarginFromChainMargin, derivativeMarginFromChainMarginToFixed, derivativeMarginToChainMargin, derivativeMarginToChainMarginToFixed, derivativePriceFromChainPrice, derivativePriceFromChainPriceToFixed, derivativePriceToChainPrice, derivativePriceToChainPriceToFixed, derivativeQuantityFromChainQuantity, derivativeQuantityFromChainQuantityToFixed, derivativeQuantityToChainQuantity, derivativeQuantityToChainQuantityToFixed, domainHash, fetchAllWithPagination, formatAmountToAllowableAmount, formatAmountToAllowableDecimals, formatNumberToAllowableDecimals, formatNumberToAllowableTensMultiplier, formatPriceToAllowableDecimals, formatPriceToAllowablePrice, fromBase64, fromUtf8, getAddressFromInjectiveAddress, getChecksumAddress, getDefaultSubaccountId, getDerivativeMarketDecimals, getDerivativeMarketTensMultiplier, getErrorMessage, getEthereumAddress, getExactDecimalsFromNumber, getGasPriceBasedOnMessage, getGrpcWebTransport, getInjectiveAddress, getInjectiveAddressFromSubaccountId, getSignificantDecimalsFromNumber, getSpotMarketDecimals, getSpotMarketTensMultiplier, getSubaccountId, getTensMultiplier, grpcCoinToUiCoin, grpcPaginationToPagination, grpcPagingToPaging, grpcPagingToPagingV2, hashToHex, hexToBase64, hexToBuff, hexToBytes, hexToNumber, hexToUint8Array, isBrowser, isCw20ContractAddress, isJsonString, isNode, isNumber, isReactNative, isServerSide, makeTimeoutTimestamp, makeTimeoutTimestampInNs, messageHash, numberToCosmosSdkDecString, objectToJson, ofacList, pageRequestToGrpcPageRequestV2, paginationRequestFromPagination, paginationUint8ArrayToString, parseCoins, privateKeyHashToPublicKey, privateKeyHashToPublicKeyBase64, privateKeyToPublicKey, privateKeyToPublicKeyBase64, protoObjectToJson, protobufTimestampToDate, protobufTimestampToUnixMs, protobufTimestampToUnixSeconds, publicKeyToAddress, recoverTypedSignaturePubKey, removeHexPrefix, ripemd160, safeBigIntStringify, sanitizeTypedData, sha256, sortObjectByKeys, sortObjectByKeysWithReduce, spotPriceFromChainPrice, spotPriceFromChainPriceToFixed, spotPriceToChainPrice, spotPriceToChainPriceToFixed, spotQuantityFromChainQuantity, spotQuantityFromChainQuantityToFixed, spotQuantityToChainQuantity, spotQuantityToChainQuantityToFixed, stringToUint8Array, toBase64, toUtf8, uint8ArrayToBase64, uint8ArrayToHex, uint8ArrayToString };