100x-sdk 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.js ADDED
@@ -0,0 +1,50 @@
1
+ /**
2
+ * 100x SDK
3
+ * SDK for Solana Anchor contracts
4
+ * Modular design providing trading, token management and other features
5
+ */
6
+
7
+ // Import main SDK class
8
+ const Fun100xSdk = require('./sdk');
9
+ const idlLocalnet = require('./idl/fun100x_localnet.json');
10
+ const idlMain = require('./idl/fun100x_main.json');
11
+ const { PublicKey } = require('@solana/web3.js');
12
+
13
+ // Import modules (optional, users can also access directly via sdk.trading)
14
+ const TradingModule = require('./modules/trading');
15
+ const TokenModule = require('./modules/token');
16
+
17
+ // Import configuration utilities
18
+ const { getDefaultOptions } = require('./utils/constants');
19
+
20
+ // Import utility classes
21
+ const OrderUtils = require('./utils/orderUtils');
22
+ const CurveAMM = require('./utils/curve_amm');
23
+
24
+ // Program ID constants
25
+ const FUN100X_PROGRAM_ID = new PublicKey(idlMain.address);
26
+
27
+ function getProgramId(network) {
28
+ if (network === 'localnet') return new PublicKey(idlLocalnet.address);
29
+ return new PublicKey(idlMain.address);
30
+ }
31
+
32
+ // Main exports
33
+ module.exports = {
34
+ // Main SDK class
35
+ Fun100xSdk,
36
+
37
+ // Constants
38
+ FUN100X_PROGRAM_ID,
39
+ getProgramId,
40
+
41
+ // Configuration utilities
42
+ getDefaultOptions,
43
+
44
+ // Utility classes
45
+ OrderUtils,
46
+ CurveAMM,
47
+
48
+ // Default export SDK class
49
+ default: Fun100xSdk,
50
+ };