ccxt 4.3.69 → 4.3.71

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 (187) hide show
  1. package/README.md +7 -6
  2. package/dist/ccxt.browser.min.js +13 -10
  3. package/dist/cjs/ccxt.js +8 -1
  4. package/dist/cjs/src/abstract/paradex.js +9 -0
  5. package/dist/cjs/src/ascendex.js +1 -1
  6. package/dist/cjs/src/base/Exchange.js +55 -0
  7. package/dist/cjs/src/binance.js +1 -1
  8. package/dist/cjs/src/blofin.js +63 -6
  9. package/dist/cjs/src/bybit.js +1 -1
  10. package/dist/cjs/src/coinbaseinternational.js +168 -2
  11. package/dist/cjs/src/cryptocom.js +9 -1
  12. package/dist/cjs/src/hitbtc.js +1 -1
  13. package/dist/cjs/src/paradex.js +2075 -0
  14. package/dist/cjs/src/poloniex.js +1 -0
  15. package/dist/cjs/src/pro/bequant.js +4 -0
  16. package/dist/cjs/src/pro/blofin.js +665 -0
  17. package/dist/cjs/src/pro/coinbaseinternational.js +154 -9
  18. package/dist/cjs/src/pro/cryptocom.js +3 -1
  19. package/dist/cjs/src/pro/hitbtc.js +26 -8
  20. package/dist/cjs/src/pro/okx.js +7 -0
  21. package/dist/cjs/src/pro/paradex.js +365 -0
  22. package/dist/cjs/src/pro/poloniex.js +37 -12
  23. package/dist/cjs/src/pro/woo.js +5 -4
  24. package/dist/cjs/src/static_dependencies/noble-curves/abstract/poseidon.js +100 -0
  25. package/dist/cjs/src/static_dependencies/noble-curves/abstract/weierstrass.js +1 -0
  26. package/dist/cjs/src/static_dependencies/scure-starknet/index.js +284 -0
  27. package/dist/cjs/src/static_dependencies/starknet/constants.js +60 -0
  28. package/dist/cjs/src/static_dependencies/starknet/types/calldata.js +26 -0
  29. package/dist/cjs/src/static_dependencies/starknet/types/lib/contract/abi.js +8 -0
  30. package/dist/cjs/src/static_dependencies/starknet/types/lib/contract/index.js +13 -0
  31. package/dist/cjs/src/static_dependencies/starknet/types/lib/index.js +56 -0
  32. package/dist/cjs/src/static_dependencies/starknet/types/typedData.js +19 -0
  33. package/dist/cjs/src/static_dependencies/starknet/utils/assert.js +15 -0
  34. package/dist/cjs/src/static_dependencies/starknet/utils/cairoDataTypes/felt.js +44 -0
  35. package/dist/cjs/src/static_dependencies/starknet/utils/cairoDataTypes/uint256.js +122 -0
  36. package/dist/cjs/src/static_dependencies/starknet/utils/cairoDataTypes/uint512.js +137 -0
  37. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/byteArray.js +61 -0
  38. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/cairo.js +218 -0
  39. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/enum/CairoCustomEnum.js +57 -0
  40. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/enum/CairoOption.js +64 -0
  41. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/enum/CairoResult.js +63 -0
  42. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/formatter.js +66 -0
  43. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/index.js +281 -0
  44. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/parser/index.js +33 -0
  45. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/parser/parser-0-1.1.0.js +37 -0
  46. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/parser/parser-2.0.0.js +40 -0
  47. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/propertyOrder.js +156 -0
  48. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/requestParser.js +250 -0
  49. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/responseParser.js +215 -0
  50. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/tuple.js +112 -0
  51. package/dist/cjs/src/static_dependencies/starknet/utils/calldata/validate.js +206 -0
  52. package/dist/cjs/src/static_dependencies/starknet/utils/encode.js +58 -0
  53. package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +57 -0
  54. package/dist/cjs/src/static_dependencies/starknet/utils/merkle.js +76 -0
  55. package/dist/cjs/src/static_dependencies/starknet/utils/num.js +92 -0
  56. package/dist/cjs/src/static_dependencies/starknet/utils/selector.js +48 -0
  57. package/dist/cjs/src/static_dependencies/starknet/utils/shortString.js +101 -0
  58. package/dist/cjs/src/static_dependencies/starknet/utils/typedData.js +334 -0
  59. package/dist/cjs/src/woo.js +4 -2
  60. package/js/ccxt.d.ts +11 -2
  61. package/js/ccxt.js +8 -2
  62. package/js/src/abstract/coinbaseinternational.d.ts +1 -1
  63. package/js/src/abstract/paradex.d.ts +43 -0
  64. package/js/src/abstract/paradex.js +11 -0
  65. package/js/src/ascendex.js +1 -1
  66. package/js/src/base/Exchange.d.ts +8 -0
  67. package/js/src/base/Exchange.js +51 -0
  68. package/js/src/binance.js +1 -1
  69. package/js/src/blofin.d.ts +1 -1
  70. package/js/src/blofin.js +63 -6
  71. package/js/src/bybit.js +1 -1
  72. package/js/src/coinbaseinternational.d.ts +6 -1
  73. package/js/src/coinbaseinternational.js +168 -2
  74. package/js/src/cryptocom.js +10 -2
  75. package/js/src/hitbtc.js +1 -1
  76. package/js/src/paradex.d.ts +76 -0
  77. package/js/src/paradex.js +2075 -0
  78. package/js/src/poloniex.js +1 -0
  79. package/js/src/pro/bequant.js +4 -0
  80. package/js/src/pro/blofin.d.ts +39 -0
  81. package/js/src/pro/blofin.js +668 -0
  82. package/js/src/pro/coinbaseinternational.d.ts +5 -1
  83. package/js/src/pro/coinbaseinternational.js +155 -10
  84. package/js/src/pro/cryptocom.js +4 -2
  85. package/js/src/pro/hitbtc.d.ts +1 -1
  86. package/js/src/pro/hitbtc.js +26 -8
  87. package/js/src/pro/okx.js +7 -0
  88. package/js/src/pro/paradex.d.ts +15 -0
  89. package/js/src/pro/paradex.js +366 -0
  90. package/js/src/pro/poloniex.js +37 -12
  91. package/js/src/pro/woo.js +5 -4
  92. package/js/src/static_dependencies/noble-curves/abstract/weierstrass.d.ts +24 -0
  93. package/js/src/static_dependencies/noble-curves/abstract/weierstrass.js +1 -1
  94. package/js/src/static_dependencies/scure-starknet/index.d.ts +79 -0
  95. package/js/src/static_dependencies/scure-starknet/index.js +323 -0
  96. package/js/src/static_dependencies/starknet/constants.d.ts +61 -0
  97. package/js/src/static_dependencies/starknet/constants.js +67 -0
  98. package/js/src/static_dependencies/starknet/index.d.ts +7 -0
  99. package/js/src/static_dependencies/starknet/index.js +50 -0
  100. package/js/src/static_dependencies/starknet/types/cairoEnum.d.ts +2 -0
  101. package/js/src/static_dependencies/starknet/types/cairoEnum.js +7 -0
  102. package/js/src/static_dependencies/starknet/types/calldata.d.ts +19 -0
  103. package/js/src/static_dependencies/starknet/types/calldata.js +28 -0
  104. package/js/src/static_dependencies/starknet/types/index.d.ts +13 -0
  105. package/js/src/static_dependencies/starknet/types/index.js +16 -0
  106. package/js/src/static_dependencies/starknet/types/lib/contract/abi.d.ts +71 -0
  107. package/js/src/static_dependencies/starknet/types/lib/contract/abi.js +13 -0
  108. package/js/src/static_dependencies/starknet/types/lib/contract/index.d.ts +24 -0
  109. package/js/src/static_dependencies/starknet/types/lib/contract/index.js +16 -0
  110. package/js/src/static_dependencies/starknet/types/lib/contract/legacy.d.ts +33 -0
  111. package/js/src/static_dependencies/starknet/types/lib/contract/legacy.js +7 -0
  112. package/js/src/static_dependencies/starknet/types/lib/contract/sierra.d.ts +52 -0
  113. package/js/src/static_dependencies/starknet/types/lib/contract/sierra.js +7 -0
  114. package/js/src/static_dependencies/starknet/types/lib/index.d.ts +248 -0
  115. package/js/src/static_dependencies/starknet/types/lib/index.js +52 -0
  116. package/js/src/static_dependencies/starknet/types/typedData.d.ts +44 -0
  117. package/js/src/static_dependencies/starknet/types/typedData.js +19 -0
  118. package/js/src/static_dependencies/starknet/utils/address.d.ts +53 -0
  119. package/js/src/static_dependencies/starknet/utils/address.js +89 -0
  120. package/js/src/static_dependencies/starknet/utils/assert.d.ts +7 -0
  121. package/js/src/static_dependencies/starknet/utils/assert.js +17 -0
  122. package/js/src/static_dependencies/starknet/utils/cairoDataTypes/felt.d.ts +6 -0
  123. package/js/src/static_dependencies/starknet/utils/cairoDataTypes/felt.js +43 -0
  124. package/js/src/static_dependencies/starknet/utils/cairoDataTypes/uint256.d.ts +72 -0
  125. package/js/src/static_dependencies/starknet/utils/cairoDataTypes/uint256.js +117 -0
  126. package/js/src/static_dependencies/starknet/utils/cairoDataTypes/uint512.d.ts +76 -0
  127. package/js/src/static_dependencies/starknet/utils/cairoDataTypes/uint512.js +136 -0
  128. package/js/src/static_dependencies/starknet/utils/calldata/byteArray.d.ts +32 -0
  129. package/js/src/static_dependencies/starknet/utils/calldata/byteArray.js +59 -0
  130. package/js/src/static_dependencies/starknet/utils/calldata/cairo.d.ts +183 -0
  131. package/js/src/static_dependencies/starknet/utils/calldata/cairo.js +229 -0
  132. package/js/src/static_dependencies/starknet/utils/calldata/enum/CairoCustomEnum.d.ts +38 -0
  133. package/js/src/static_dependencies/starknet/utils/calldata/enum/CairoCustomEnum.js +57 -0
  134. package/js/src/static_dependencies/starknet/utils/calldata/enum/CairoOption.d.ts +35 -0
  135. package/js/src/static_dependencies/starknet/utils/calldata/enum/CairoOption.js +64 -0
  136. package/js/src/static_dependencies/starknet/utils/calldata/enum/CairoResult.d.ts +34 -0
  137. package/js/src/static_dependencies/starknet/utils/calldata/enum/CairoResult.js +63 -0
  138. package/js/src/static_dependencies/starknet/utils/calldata/enum/index.d.ts +3 -0
  139. package/js/src/static_dependencies/starknet/utils/calldata/enum/index.js +9 -0
  140. package/js/src/static_dependencies/starknet/utils/calldata/formatter.d.ts +9 -0
  141. package/js/src/static_dependencies/starknet/utils/calldata/formatter.js +67 -0
  142. package/js/src/static_dependencies/starknet/utils/calldata/index.d.ts +89 -0
  143. package/js/src/static_dependencies/starknet/utils/calldata/index.js +280 -0
  144. package/js/src/static_dependencies/starknet/utils/calldata/parser/index.d.ts +5 -0
  145. package/js/src/static_dependencies/starknet/utils/calldata/parser/index.js +30 -0
  146. package/js/src/static_dependencies/starknet/utils/calldata/parser/interface.d.ts +20 -0
  147. package/js/src/static_dependencies/starknet/utils/calldata/parser/interface.js +8 -0
  148. package/js/src/static_dependencies/starknet/utils/calldata/parser/parser-0-1.1.0.d.ts +24 -0
  149. package/js/src/static_dependencies/starknet/utils/calldata/parser/parser-0-1.1.0.js +36 -0
  150. package/js/src/static_dependencies/starknet/utils/calldata/parser/parser-2.0.0.d.ts +23 -0
  151. package/js/src/static_dependencies/starknet/utils/calldata/parser/parser-2.0.0.js +40 -0
  152. package/js/src/static_dependencies/starknet/utils/calldata/propertyOrder.d.ts +2 -0
  153. package/js/src/static_dependencies/starknet/utils/calldata/propertyOrder.js +155 -0
  154. package/js/src/static_dependencies/starknet/utils/calldata/requestParser.d.ts +11 -0
  155. package/js/src/static_dependencies/starknet/utils/calldata/requestParser.js +248 -0
  156. package/js/src/static_dependencies/starknet/utils/calldata/responseParser.d.ts +11 -0
  157. package/js/src/static_dependencies/starknet/utils/calldata/responseParser.js +214 -0
  158. package/js/src/static_dependencies/starknet/utils/calldata/tuple.d.ts +6 -0
  159. package/js/src/static_dependencies/starknet/utils/calldata/tuple.js +113 -0
  160. package/js/src/static_dependencies/starknet/utils/calldata/validate.d.ts +6 -0
  161. package/js/src/static_dependencies/starknet/utils/calldata/validate.js +208 -0
  162. package/js/src/static_dependencies/starknet/utils/encode.d.ts +207 -0
  163. package/js/src/static_dependencies/starknet/utils/encode.js +282 -0
  164. package/js/src/static_dependencies/starknet/utils/hash/classHash.d.ts +57 -0
  165. package/js/src/static_dependencies/starknet/utils/hash/classHash.js +224 -0
  166. package/js/src/static_dependencies/starknet/utils/hash/index.d.ts +6 -0
  167. package/js/src/static_dependencies/starknet/utils/hash/index.js +13 -0
  168. package/js/src/static_dependencies/starknet/utils/json.d.ts +24 -0
  169. package/js/src/static_dependencies/starknet/utils/json.js +43 -0
  170. package/js/src/static_dependencies/starknet/utils/merkle.d.ts +35 -0
  171. package/js/src/static_dependencies/starknet/utils/merkle.js +84 -0
  172. package/js/src/static_dependencies/starknet/utils/num.d.ts +182 -0
  173. package/js/src/static_dependencies/starknet/utils/num.js +244 -0
  174. package/js/src/static_dependencies/starknet/utils/selector.d.ts +48 -0
  175. package/js/src/static_dependencies/starknet/utils/selector.js +85 -0
  176. package/js/src/static_dependencies/starknet/utils/shortString.d.ts +57 -0
  177. package/js/src/static_dependencies/starknet/utils/shortString.js +96 -0
  178. package/js/src/static_dependencies/starknet/utils/starknetId.d.ts +113 -0
  179. package/js/src/static_dependencies/starknet/utils/starknetId.js +265 -0
  180. package/js/src/static_dependencies/starknet/utils/typedData.d.ts +54 -0
  181. package/js/src/static_dependencies/starknet/utils/typedData.js +321 -0
  182. package/js/src/static_dependencies/starknet/utils/uint256.d.ts +21 -0
  183. package/js/src/static_dependencies/starknet/utils/uint256.js +32 -0
  184. package/js/src/static_dependencies/starknet/utils/url.d.ts +29 -0
  185. package/js/src/static_dependencies/starknet/utils/url.js +70 -0
  186. package/js/src/woo.js +4 -2
  187. package/package.json +1 -1
@@ -0,0 +1,334 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var constants = require('../constants.js');
6
+ require('../types/calldata.js');
7
+ require('../types/lib/index.js');
8
+ var typedData = require('../types/typedData.js');
9
+ var assert = require('./assert.js');
10
+ var byteArray = require('./calldata/byteArray.js');
11
+ require('../../noble-curves/abstract/modular.js');
12
+ var selector = require('./selector.js');
13
+ var classHash = require('./hash/classHash.js');
14
+ var merkle = require('./merkle.js');
15
+ var num = require('./num.js');
16
+ var shortString = require('./shortString.js');
17
+
18
+ /* eslint-disable no-param-reassign */
19
+ const presetTypes = {
20
+ u256: JSON.parse('[{ "name": "low", "type": "u128" }, { "name": "high", "type": "u128" }]'),
21
+ TokenAmount: JSON.parse('[{ "name": "token_address", "type": "ContractAddress" }, { "name": "amount", "type": "u256" }]'),
22
+ NftId: JSON.parse('[{ "name": "collection_address", "type": "ContractAddress" }, { "name": "token_id", "type": "u256" }]'),
23
+ };
24
+ const revisionConfiguration = {
25
+ [typedData.TypedDataRevision.Active]: {
26
+ domain: 'StarknetDomain',
27
+ hashMethod: classHash.computePoseidonHashOnElements,
28
+ hashMerkleMethod: classHash.computePoseidonHash,
29
+ escapeTypeString: (s) => `"${s}"`,
30
+ presetTypes,
31
+ },
32
+ [typedData.TypedDataRevision.Legacy]: {
33
+ domain: 'StarkNetDomain',
34
+ hashMethod: classHash.computePedersenHashOnElements,
35
+ hashMerkleMethod: classHash.computePedersenHash,
36
+ escapeTypeString: (s) => s,
37
+ presetTypes: {},
38
+ },
39
+ };
40
+ function assertRange(data, type, { min, max }) {
41
+ const value = BigInt(data);
42
+ assert(value >= min && value <= max, `${value} (${type}) is out of bounds [${min}, ${max}]`);
43
+ }
44
+ function identifyRevision({ types, domain }) {
45
+ if (revisionConfiguration[typedData.TypedDataRevision.Active].domain in types && domain.revision === typedData.TypedDataRevision.Active)
46
+ return typedData.TypedDataRevision.Active;
47
+ if (revisionConfiguration[typedData.TypedDataRevision.Legacy].domain in types &&
48
+ (domain.revision ?? typedData.TypedDataRevision.Legacy) === typedData.TypedDataRevision.Legacy)
49
+ return typedData.TypedDataRevision.Legacy;
50
+ return undefined;
51
+ }
52
+ function getHex(value) {
53
+ try {
54
+ return num.toHex(value);
55
+ }
56
+ catch (e) {
57
+ if (shortString.isString(value)) {
58
+ return num.toHex(shortString.encodeShortString(value));
59
+ }
60
+ throw new Error(`Invalid BigNumberish: ${value}`);
61
+ }
62
+ }
63
+ /**
64
+ * Validates that `data` matches the EIP-712 JSON schema.
65
+ */
66
+ function validateTypedData(data) {
67
+ const typedData = data;
68
+ return Boolean(typedData.message && typedData.primaryType && typedData.types && identifyRevision(typedData));
69
+ }
70
+ /**
71
+ * Prepares the selector for use.
72
+ *
73
+ * @param {string} selector - The selector to be prepared.
74
+ * @returns {string} The prepared selector.
75
+ */
76
+ function prepareSelector(selector$1) {
77
+ return num.isHex(selector$1) ? selector$1 : selector.getSelectorFromName(selector$1);
78
+ }
79
+ /**
80
+ * Checks if the given Starknet type is a Merkle tree type.
81
+ *
82
+ * @param {StarknetType} type - The StarkNet type to check.
83
+ *
84
+ * @returns {boolean} - True if the type is a Merkle tree type, false otherwise.
85
+ */
86
+ function isMerkleTreeType(type) {
87
+ return type.type === 'merkletree';
88
+ }
89
+ /**
90
+ * Get the dependencies of a struct type. If a struct has the same dependency multiple times, it's only included once
91
+ * in the resulting array.
92
+ */
93
+ function getDependencies(types, type, dependencies = [], contains = '', revision = typedData.TypedDataRevision.Legacy) {
94
+ // Include pointers (struct arrays)
95
+ if (type[type.length - 1] === '*') {
96
+ type = type.slice(0, -1);
97
+ }
98
+ else if (revision === typedData.TypedDataRevision.Active) {
99
+ // enum base
100
+ if (type === 'enum') {
101
+ type = contains;
102
+ }
103
+ // enum element types
104
+ else if (type.match(/^\(.*\)$/)) {
105
+ type = type.slice(1, -1);
106
+ }
107
+ }
108
+ if (dependencies.includes(type) || !types[type]) {
109
+ return dependencies;
110
+ }
111
+ return [
112
+ type,
113
+ ...types[type].reduce((previous, t) => [
114
+ ...previous,
115
+ ...getDependencies(types, t.type, previous, t.contains, revision).filter((dependency) => !previous.includes(dependency)),
116
+ ], []),
117
+ ];
118
+ }
119
+ function getMerkleTreeType(types, ctx) {
120
+ if (ctx.parent && ctx.key) {
121
+ const parentType = types[ctx.parent];
122
+ const merkleType = parentType.find((t) => t.name === ctx.key);
123
+ const isMerkleTree = isMerkleTreeType(merkleType);
124
+ if (!isMerkleTree) {
125
+ throw new Error(`${ctx.key} is not a merkle tree`);
126
+ }
127
+ if (merkleType.contains.endsWith('*')) {
128
+ throw new Error(`Merkle tree contain property must not be an array but was given ${ctx.key}`);
129
+ }
130
+ return merkleType.contains;
131
+ }
132
+ return 'raw';
133
+ }
134
+ /**
135
+ * Encode a type to a string. All dependent types are alphabetically sorted.
136
+ */
137
+ function encodeType(types, type, revision = typedData.TypedDataRevision.Legacy) {
138
+ const allTypes = revision === typedData.TypedDataRevision.Active
139
+ ? { ...types, ...revisionConfiguration[revision].presetTypes }
140
+ : types;
141
+ const [primary, ...dependencies] = getDependencies(allTypes, type, undefined, undefined, revision);
142
+ const newTypes = !primary ? [] : [primary, ...dependencies.sort()];
143
+ const esc = revisionConfiguration[revision].escapeTypeString;
144
+ return newTypes
145
+ .map((dependency) => {
146
+ const dependencyElements = allTypes[dependency].map((t) => {
147
+ const targetType = t.type === 'enum' && revision === typedData.TypedDataRevision.Active
148
+ ? t.contains
149
+ : t.type;
150
+ // parentheses handling for enum variant types
151
+ const typeString = targetType.match(/^\(.*\)$/)
152
+ ? `(${targetType
153
+ .slice(1, -1)
154
+ .split(',')
155
+ .map((e) => (e ? esc(e) : e))
156
+ .join(',')})`
157
+ : esc(targetType);
158
+ return `${esc(t.name)}:${typeString}`;
159
+ });
160
+ return `${esc(dependency)}(${dependencyElements})`;
161
+ })
162
+ .join('');
163
+ }
164
+ /**
165
+ * Get a type string as hash.
166
+ */
167
+ function getTypeHash(types, type, revision = typedData.TypedDataRevision.Legacy) {
168
+ return selector.getSelectorFromName(encodeType(types, type, revision));
169
+ }
170
+ /**
171
+ * Encodes a single value to an ABI serialisable string, number or Buffer. Returns the data as tuple, which consists of
172
+ * an array of ABI compatible types, and an array of corresponding values.
173
+ */
174
+ function encodeValue(types, type, data, ctx = {}, revision = typedData.TypedDataRevision.Legacy) {
175
+ if (types[type]) {
176
+ return [type, getStructHash(types, type, data, revision)];
177
+ }
178
+ if (revisionConfiguration[revision].presetTypes[type]) {
179
+ return [
180
+ type,
181
+ getStructHash(revisionConfiguration[revision].presetTypes, type, data, revision),
182
+ ];
183
+ }
184
+ if (type.endsWith('*')) {
185
+ const hashes = data.map((entry) => encodeValue(types, type.slice(0, -1), entry, undefined, revision)[1]);
186
+ return [type, revisionConfiguration[revision].hashMethod(hashes)];
187
+ }
188
+ switch (type) {
189
+ case 'enum': {
190
+ if (revision === typedData.TypedDataRevision.Active) {
191
+ const [variantKey, variantData] = Object.entries(data)[0];
192
+ const parentType = types[ctx.parent][0];
193
+ const enumType = types[parentType.contains];
194
+ const variantType = enumType.find((t) => t.name === variantKey);
195
+ const variantIndex = enumType.indexOf(variantType);
196
+ const encodedSubtypes = variantType.type
197
+ .slice(1, -1)
198
+ .split(',')
199
+ .map((subtype, index) => {
200
+ if (!subtype)
201
+ return subtype;
202
+ const subtypeData = variantData[index];
203
+ return encodeValue(types, subtype, subtypeData, undefined, revision)[1];
204
+ });
205
+ return [
206
+ type,
207
+ revisionConfiguration[revision].hashMethod([variantIndex, ...encodedSubtypes]),
208
+ ];
209
+ } // else fall through to default
210
+ return [type, getHex(data)];
211
+ }
212
+ case 'merkletree': {
213
+ const merkleTreeType = getMerkleTreeType(types, ctx);
214
+ const structHashes = data.map((struct) => {
215
+ return encodeValue(types, merkleTreeType, struct, undefined, revision)[1];
216
+ });
217
+ const { root } = new merkle.MerkleTree(structHashes, revisionConfiguration[revision].hashMerkleMethod);
218
+ return ['felt', root];
219
+ }
220
+ case 'selector': {
221
+ return ['felt', prepareSelector(data)];
222
+ }
223
+ case 'string': {
224
+ if (revision === typedData.TypedDataRevision.Active) {
225
+ const byteArray$1 = byteArray.byteArrayFromString(data);
226
+ const elements = [
227
+ byteArray$1.data.length,
228
+ ...byteArray$1.data,
229
+ byteArray$1.pending_word,
230
+ byteArray$1.pending_word_len,
231
+ ];
232
+ return [type, revisionConfiguration[revision].hashMethod(elements)];
233
+ } // else fall through to default
234
+ return [type, getHex(data)];
235
+ }
236
+ case 'i128': {
237
+ if (revision === typedData.TypedDataRevision.Active) {
238
+ const value = BigInt(data);
239
+ assertRange(value, type, constants.RANGE_I128);
240
+ return [type, getHex(value < 0n ? constants.PRIME + value : value)];
241
+ } // else fall through to default
242
+ return [type, getHex(data)];
243
+ }
244
+ case 'timestamp':
245
+ case 'u128': {
246
+ if (revision === typedData.TypedDataRevision.Active) {
247
+ assertRange(data, type, constants.RANGE_U128);
248
+ } // else fall through to default
249
+ return [type, getHex(data)];
250
+ }
251
+ case 'felt':
252
+ case 'shortstring': {
253
+ // TODO: should 'shortstring' diverge into directly using encodeShortString()?
254
+ if (revision === typedData.TypedDataRevision.Active) {
255
+ assertRange(getHex(data), type, constants.RANGE_FELT);
256
+ } // else fall through to default
257
+ return [type, getHex(data)];
258
+ }
259
+ case 'ClassHash':
260
+ case 'ContractAddress': {
261
+ if (revision === typedData.TypedDataRevision.Active) {
262
+ assertRange(data, type, constants.RANGE_FELT);
263
+ } // else fall through to default
264
+ return [type, getHex(data)];
265
+ }
266
+ case 'bool': {
267
+ if (revision === typedData.TypedDataRevision.Active) {
268
+ assert(typeof data === 'boolean', `Type mismatch for ${type} ${data}`);
269
+ } // else fall through to default
270
+ return [type, getHex(data)];
271
+ }
272
+ default: {
273
+ if (revision === typedData.TypedDataRevision.Active) {
274
+ throw new Error(`Unsupported type: ${type}`);
275
+ }
276
+ return [type, getHex(data)];
277
+ }
278
+ }
279
+ }
280
+ /**
281
+ * Encode the data to an ABI encoded Buffer. The data should be a key -> value object with all the required values.
282
+ * All dependent types are automatically encoded.
283
+ */
284
+ function encodeData(types, type, data, revision = typedData.TypedDataRevision.Legacy) {
285
+ const targetType = types[type] ?? revisionConfiguration[revision].presetTypes[type];
286
+ const [returnTypes, values] = targetType.reduce(([ts, vs], field) => {
287
+ if (data[field.name] === undefined ||
288
+ (data[field.name] === null && field.type !== 'enum')) {
289
+ throw new Error(`Cannot encode data: missing data for '${field.name}'`);
290
+ }
291
+ const value = data[field.name];
292
+ const ctx = { parent: type, key: field.name };
293
+ const [t, encodedValue] = encodeValue(types, field.type, value, ctx, revision);
294
+ return [
295
+ [...ts, t],
296
+ [...vs, encodedValue],
297
+ ];
298
+ }, [['felt'], [getTypeHash(types, type, revision)]]);
299
+ return [returnTypes, values];
300
+ }
301
+ /**
302
+ * Get encoded data as a hash. The data should be a key -> value object with all the required values.
303
+ * All dependent types are automatically encoded.
304
+ */
305
+ function getStructHash(types, type, data, revision = typedData.TypedDataRevision.Legacy) {
306
+ return revisionConfiguration[revision].hashMethod(encodeData(types, type, data, revision)[1]);
307
+ }
308
+ /**
309
+ * Get the SNIP-12 encoded message to sign, from the typedData object.
310
+ */
311
+ function getMessageHash(typedData, account) {
312
+ if (!validateTypedData(typedData)) {
313
+ throw new Error('Typed data does not match JSON schema');
314
+ }
315
+ const revision = identifyRevision(typedData);
316
+ const { domain, hashMethod } = revisionConfiguration[revision];
317
+ const message = [
318
+ shortString.encodeShortString('StarkNet Message'),
319
+ getStructHash(typedData.types, domain, typedData.domain, revision),
320
+ account,
321
+ getStructHash(typedData.types, typedData.primaryType, typedData.message, revision),
322
+ ];
323
+ return hashMethod(message);
324
+ }
325
+
326
+ exports.encodeData = encodeData;
327
+ exports.encodeType = encodeType;
328
+ exports.encodeValue = encodeValue;
329
+ exports.getDependencies = getDependencies;
330
+ exports.getMessageHash = getMessageHash;
331
+ exports.getStructHash = getStructHash;
332
+ exports.getTypeHash = getTypeHash;
333
+ exports.isMerkleTreeType = isMerkleTreeType;
334
+ exports.prepareSelector = prepareSelector;
@@ -2654,11 +2654,13 @@ class woo extends woo$1 {
2654
2654
  //
2655
2655
  const marketId = this.safeString(income, 'symbol');
2656
2656
  const symbol = this.safeSymbol(marketId, market);
2657
- const amount = this.safeNumber(income, 'funding_fee');
2657
+ let amount = this.safeString(income, 'funding_fee');
2658
2658
  const code = this.safeCurrencyCode('USD');
2659
2659
  const id = this.safeString(income, 'id');
2660
2660
  const timestamp = this.safeTimestamp(income, 'updated_time');
2661
2661
  const rate = this.safeNumber(income, 'funding_rate');
2662
+ const paymentType = this.safeString(income, 'payment_type');
2663
+ amount = (paymentType === 'Pay') ? Precise["default"].stringNeg(amount) : amount;
2662
2664
  return {
2663
2665
  'info': income,
2664
2666
  'symbol': symbol,
@@ -2666,7 +2668,7 @@ class woo extends woo$1 {
2666
2668
  'timestamp': timestamp,
2667
2669
  'datetime': this.iso8601(timestamp),
2668
2670
  'id': id,
2669
- 'amount': amount,
2671
+ 'amount': this.parseNumber(amount),
2670
2672
  'rate': rate,
2671
2673
  };
2672
2674
  }
package/js/ccxt.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
4
4
  import * as errors from './src/base/errors.js';
5
5
  import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
7
- declare const version = "4.3.68";
7
+ declare const version = "4.3.70";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
@@ -94,6 +94,7 @@ import okx from './src/okx.js';
94
94
  import onetrading from './src/onetrading.js';
95
95
  import oxfun from './src/oxfun.js';
96
96
  import p2b from './src/p2b.js';
97
+ import paradex from './src/paradex.js';
97
98
  import paymium from './src/paymium.js';
98
99
  import phemex from './src/phemex.js';
99
100
  import poloniex from './src/poloniex.js';
@@ -134,6 +135,7 @@ import bitruePro from './src/pro/bitrue.js';
134
135
  import bitstampPro from './src/pro/bitstamp.js';
135
136
  import bitvavoPro from './src/pro/bitvavo.js';
136
137
  import blockchaincomPro from './src/pro/blockchaincom.js';
138
+ import blofinPro from './src/pro/blofin.js';
137
139
  import bybitPro from './src/pro/bybit.js';
138
140
  import cexPro from './src/pro/cex.js';
139
141
  import coinbasePro from './src/pro/coinbase.js';
@@ -170,6 +172,7 @@ import okxPro from './src/pro/okx.js';
170
172
  import onetradingPro from './src/pro/onetrading.js';
171
173
  import oxfunPro from './src/pro/oxfun.js';
172
174
  import p2bPro from './src/pro/p2b.js';
175
+ import paradexPro from './src/pro/paradex.js';
173
176
  import phemexPro from './src/pro/phemex.js';
174
177
  import poloniexPro from './src/pro/poloniex.js';
175
178
  import poloniexfuturesPro from './src/pro/poloniexfutures.js';
@@ -271,6 +274,7 @@ declare const exchanges: {
271
274
  onetrading: typeof onetrading;
272
275
  oxfun: typeof oxfun;
273
276
  p2b: typeof p2b;
277
+ paradex: typeof paradex;
274
278
  paymium: typeof paymium;
275
279
  phemex: typeof phemex;
276
280
  poloniex: typeof poloniex;
@@ -313,6 +317,7 @@ declare const pro: {
313
317
  bitstamp: typeof bitstampPro;
314
318
  bitvavo: typeof bitvavoPro;
315
319
  blockchaincom: typeof blockchaincomPro;
320
+ blofin: typeof blofinPro;
316
321
  bybit: typeof bybitPro;
317
322
  cex: typeof cexPro;
318
323
  coinbase: typeof coinbasePro;
@@ -349,6 +354,7 @@ declare const pro: {
349
354
  onetrading: typeof onetradingPro;
350
355
  oxfun: typeof oxfunPro;
351
356
  p2b: typeof p2bPro;
357
+ paradex: typeof paradexPro;
352
358
  phemex: typeof phemexPro;
353
359
  poloniex: typeof poloniexPro;
354
360
  poloniexfutures: typeof poloniexfuturesPro;
@@ -388,6 +394,7 @@ declare const ccxt: {
388
394
  bitstamp: typeof bitstampPro;
389
395
  bitvavo: typeof bitvavoPro;
390
396
  blockchaincom: typeof blockchaincomPro;
397
+ blofin: typeof blofinPro;
391
398
  bybit: typeof bybitPro;
392
399
  cex: typeof cexPro;
393
400
  coinbase: typeof coinbasePro;
@@ -424,6 +431,7 @@ declare const ccxt: {
424
431
  onetrading: typeof onetradingPro;
425
432
  oxfun: typeof oxfunPro;
426
433
  p2b: typeof p2bPro;
434
+ paradex: typeof paradexPro;
427
435
  phemex: typeof phemexPro;
428
436
  poloniex: typeof poloniexPro;
429
437
  poloniexfutures: typeof poloniexfuturesPro;
@@ -526,6 +534,7 @@ declare const ccxt: {
526
534
  onetrading: typeof onetrading;
527
535
  oxfun: typeof oxfun;
528
536
  p2b: typeof p2b;
537
+ paradex: typeof paradex;
529
538
  paymium: typeof paymium;
530
539
  phemex: typeof phemex;
531
540
  poloniex: typeof poloniex;
@@ -546,5 +555,5 @@ declare const ccxt: {
546
555
  zaif: typeof zaif;
547
556
  zonda: typeof zonda;
548
557
  } & typeof functions & typeof errors;
549
- export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
558
+ export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
550
559
  export default ccxt;
package/js/ccxt.js CHANGED
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
38
38
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.3.69';
41
+ const version = '4.3.71';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -130,6 +130,7 @@ import okx from './src/okx.js';
130
130
  import onetrading from './src/onetrading.js';
131
131
  import oxfun from './src/oxfun.js';
132
132
  import p2b from './src/p2b.js';
133
+ import paradex from './src/paradex.js';
133
134
  import paymium from './src/paymium.js';
134
135
  import phemex from './src/phemex.js';
135
136
  import poloniex from './src/poloniex.js';
@@ -171,6 +172,7 @@ import bitruePro from './src/pro/bitrue.js';
171
172
  import bitstampPro from './src/pro/bitstamp.js';
172
173
  import bitvavoPro from './src/pro/bitvavo.js';
173
174
  import blockchaincomPro from './src/pro/blockchaincom.js';
175
+ import blofinPro from './src/pro/blofin.js';
174
176
  import bybitPro from './src/pro/bybit.js';
175
177
  import cexPro from './src/pro/cex.js';
176
178
  import coinbasePro from './src/pro/coinbase.js';
@@ -207,6 +209,7 @@ import okxPro from './src/pro/okx.js';
207
209
  import onetradingPro from './src/pro/onetrading.js';
208
210
  import oxfunPro from './src/pro/oxfun.js';
209
211
  import p2bPro from './src/pro/p2b.js';
212
+ import paradexPro from './src/pro/paradex.js';
210
213
  import phemexPro from './src/pro/phemex.js';
211
214
  import poloniexPro from './src/pro/poloniex.js';
212
215
  import poloniexfuturesPro from './src/pro/poloniexfutures.js';
@@ -308,6 +311,7 @@ const exchanges = {
308
311
  'onetrading': onetrading,
309
312
  'oxfun': oxfun,
310
313
  'p2b': p2b,
314
+ 'paradex': paradex,
311
315
  'paymium': paymium,
312
316
  'phemex': phemex,
313
317
  'poloniex': poloniex,
@@ -350,6 +354,7 @@ const pro = {
350
354
  'bitstamp': bitstampPro,
351
355
  'bitvavo': bitvavoPro,
352
356
  'blockchaincom': blockchaincomPro,
357
+ 'blofin': blofinPro,
353
358
  'bybit': bybitPro,
354
359
  'cex': cexPro,
355
360
  'coinbase': coinbasePro,
@@ -386,6 +391,7 @@ const pro = {
386
391
  'onetrading': onetradingPro,
387
392
  'oxfun': oxfunPro,
388
393
  'p2b': p2bPro,
394
+ 'paradex': paradexPro,
389
395
  'phemex': phemexPro,
390
396
  'poloniex': poloniexPro,
391
397
  'poloniexfutures': poloniexfuturesPro,
@@ -410,6 +416,6 @@ pro.exchanges = Object.keys(pro);
410
416
  pro['Exchange'] = Exchange; // now the same for rest and ts
411
417
  //-----------------------------------------------------------------------------
412
418
  const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
413
- export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
419
+ export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
414
420
  export default ccxt;
415
421
  //-----------------------------------------------------------------------------
@@ -8,7 +8,7 @@ interface Exchange {
8
8
  v1PublicGetInstrumentsInstrument(params?: {}): Promise<implicitReturnType>;
9
9
  v1PublicGetInstrumentsInstrumentQuote(params?: {}): Promise<implicitReturnType>;
10
10
  v1PublicGetInstrumentsInstrumentFunding(params?: {}): Promise<implicitReturnType>;
11
- v1PublicGet(params?: {}): Promise<implicitReturnType>;
11
+ v1PublicGetInstrumentsInstrumentCandles(params?: {}): Promise<implicitReturnType>;
12
12
  v1PrivateGetOrders(params?: {}): Promise<implicitReturnType>;
13
13
  v1PrivateGetOrdersId(params?: {}): Promise<implicitReturnType>;
14
14
  v1PrivateGetPortfolios(params?: {}): Promise<implicitReturnType>;
@@ -0,0 +1,43 @@
1
+ import { implicitReturnType } from '../base/types.js';
2
+ import { Exchange as _Exchange } from '../base/Exchange.js';
3
+ interface Exchange {
4
+ publicGetBboMarket(params?: {}): Promise<implicitReturnType>;
5
+ publicGetFundingData(params?: {}): Promise<implicitReturnType>;
6
+ publicGetMarkets(params?: {}): Promise<implicitReturnType>;
7
+ publicGetMarketsKlines(params?: {}): Promise<implicitReturnType>;
8
+ publicGetMarketsSummary(params?: {}): Promise<implicitReturnType>;
9
+ publicGetOrderbookMarket(params?: {}): Promise<implicitReturnType>;
10
+ publicGetInsurance(params?: {}): Promise<implicitReturnType>;
11
+ publicGetReferralsConfig(params?: {}): Promise<implicitReturnType>;
12
+ publicGetSystemConfig(params?: {}): Promise<implicitReturnType>;
13
+ publicGetSystemState(params?: {}): Promise<implicitReturnType>;
14
+ publicGetSystemTime(params?: {}): Promise<implicitReturnType>;
15
+ publicGetTrades(params?: {}): Promise<implicitReturnType>;
16
+ privateGetAccount(params?: {}): Promise<implicitReturnType>;
17
+ privateGetAccountProfile(params?: {}): Promise<implicitReturnType>;
18
+ privateGetBalance(params?: {}): Promise<implicitReturnType>;
19
+ privateGetFills(params?: {}): Promise<implicitReturnType>;
20
+ privateGetFundingPayments(params?: {}): Promise<implicitReturnType>;
21
+ privateGetPositions(params?: {}): Promise<implicitReturnType>;
22
+ privateGetTradebusts(params?: {}): Promise<implicitReturnType>;
23
+ privateGetTransactions(params?: {}): Promise<implicitReturnType>;
24
+ privateGetLiquidations(params?: {}): Promise<implicitReturnType>;
25
+ privateGetOrders(params?: {}): Promise<implicitReturnType>;
26
+ privateGetOrdersHistory(params?: {}): Promise<implicitReturnType>;
27
+ privateGetOrdersByClientIdClientId(params?: {}): Promise<implicitReturnType>;
28
+ privateGetOrdersOrderId(params?: {}): Promise<implicitReturnType>;
29
+ privateGetPointsDataMarketProgram(params?: {}): Promise<implicitReturnType>;
30
+ privateGetReferralsSummary(params?: {}): Promise<implicitReturnType>;
31
+ privateGetTransfers(params?: {}): Promise<implicitReturnType>;
32
+ privatePostAccountProfileReferralCode(params?: {}): Promise<implicitReturnType>;
33
+ privatePostAccountProfileUsername(params?: {}): Promise<implicitReturnType>;
34
+ privatePostAuth(params?: {}): Promise<implicitReturnType>;
35
+ privatePostOnboarding(params?: {}): Promise<implicitReturnType>;
36
+ privatePostOrders(params?: {}): Promise<implicitReturnType>;
37
+ privateDeleteOrders(params?: {}): Promise<implicitReturnType>;
38
+ privateDeleteOrdersByClientIdClientId(params?: {}): Promise<implicitReturnType>;
39
+ privateDeleteOrdersOrderId(params?: {}): Promise<implicitReturnType>;
40
+ }
41
+ declare abstract class Exchange extends _Exchange {
42
+ }
43
+ export default Exchange;
@@ -0,0 +1,11 @@
1
+ // ----------------------------------------------------------------------------
2
+
3
+ // PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
+ // https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
+ // EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
+
7
+ // -------------------------------------------------------------------------------
8
+ import { Exchange as _Exchange } from '../base/Exchange.js';
9
+ class Exchange extends _Exchange {
10
+ }
11
+ export default Exchange;
@@ -3299,7 +3299,7 @@ export default class ascendex extends Exchange {
3299
3299
  async fetchMarginModes(symbols = undefined, params = {}) {
3300
3300
  /**
3301
3301
  * @method
3302
- * @name ascendex#fetchMarginMode
3302
+ * @name ascendex#fetchMarginModes
3303
3303
  * @description fetches the set margin mode of the user
3304
3304
  * @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
3305
3305
  * @param {string[]} [symbols] a list of unified market symbols
@@ -369,6 +369,13 @@ export default class Exchange {
369
369
  fixStringifiedJsonMembers(content: string): any;
370
370
  ethAbiEncode(types: any, args: any): Uint8Array;
371
371
  ethEncodeStructuredData(domain: any, messageTypes: any, messageData: any): Uint8Array;
372
+ retrieveStarkAccount(signature: any, accountClassHash: any, accountProxyClassHash: any): {
373
+ privateKey: string;
374
+ publicKey: string;
375
+ address: string;
376
+ };
377
+ starknetEncodeStructuredData(domain: any, messageTypes: any, messageData: any, address: any): string;
378
+ starknetSign(hash: any, pri: any): string;
372
379
  intToBase16(elem: any): string;
373
380
  extendExchangeOptions(newOptions: Dict): void;
374
381
  createSafeDictionary(): {};
@@ -708,6 +715,7 @@ export default class Exchange {
708
715
  safeList(dictionaryOrList: any, key: IndexType, defaultValue?: any[]): any[] | undefined;
709
716
  handleDeltas(orderbook: any, deltas: any): void;
710
717
  handleDelta(bookside: any, delta: any): void;
718
+ handleDeltasWithKeys(bookSide: any, deltas: any, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): void;
711
719
  getCacheIndex(orderbook: any, deltas: any): number;
712
720
  findTimeframe(timeframe: any, timeframes?: any): string;
713
721
  checkProxyUrlSettings(url?: Str, method?: Str, headers?: any, body?: any): any;