pinpet-sdk 0.1.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,43 @@
1
+ /**
2
+ * SpinPet 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 PinPetSdk = require('./sdk');
9
+ const spinpetIdl = require('./idl/pinpet.json');
10
+ const { PublicKey } = require('@solana/web3.js');
11
+
12
+ // Import modules (optional, users can also access directly via sdk.trading)
13
+ const TradingModule = require('./modules/trading');
14
+ const TokenModule = require('./modules/token');
15
+
16
+
17
+
18
+ // Import configuration utilities
19
+ const { getDefaultOptions } = require('./utils/constants');
20
+
21
+ // Import utility classes
22
+ const OrderUtils = require('./utils/orderUtils');
23
+
24
+ // Import constants (if needed)
25
+ const SPINPET_PROGRAM_ID = new PublicKey(spinpetIdl.address); // Replace with actual program ID
26
+
27
+ // Main exports
28
+ module.exports = {
29
+ // Main SDK class
30
+ PinPetSdk,
31
+
32
+ // Constants
33
+ SPINPET_PROGRAM_ID,
34
+
35
+ // Configuration utilities
36
+ getDefaultOptions,
37
+
38
+ // Utility classes
39
+ OrderUtils,
40
+ };
41
+
42
+ // Default export SDK class
43
+ module.exports.default = PinPetSdk;