@morambacrypto/connect 0.0.4 → 0.0.6

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 (2) hide show
  1. package/README.md +76 -10
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,37 +1,103 @@
1
1
  # Moramba Crypto: Connect
2
2
 
3
- ## Documentation
3
+ A Node.js client library for interacting with the Moramba Crypto API to create and manage JWT tokens for authentication and moramba-crypto feature.
4
4
 
5
- - [API](https://morambacrypto.readme.io/)
5
+ ## Installation
6
6
 
7
+ ```bash
7
8
  npm install @morambacrypto/connect
9
+ ```
10
+
11
+ ## Requirements
12
+
13
+ - Node.js 16+
14
+ - Valid API key and Partner ID
15
+ - Stable internet connection
16
+
17
+ ## Usage
8
18
 
19
+ ### Basic Setup
20
+
21
+ ```javascript
9
22
  import { MorambaClient } from "@morambacrypto/connect";
10
23
 
11
24
  const client = new MorambaClient({
12
25
  baseURL: "https://crypto.moramba.io",
13
26
  apiKey: "YOUR_API_KEY",
14
- partnerId: "YOUR_PARTNER_ID",
27
+ partnerId: "YOUR_PARTNER_ID"
15
28
  });
29
+ ```
30
+
31
+ ### Creating a JWT Token
16
32
 
33
+ ```javascript
17
34
  const response = await client.auth.createJwtToken({
18
35
  userid: "email@example.com",
19
36
  partner_id: "YOUR_PARTNER_ID",
20
- api_key: "YOUR_API_KEY",
37
+ api_key: "YOUR_API_KEY"
21
38
  });
22
39
 
23
40
  console.log("JWT Token:", response.data.token);
24
- console.log("Issued At:", response.data.iat);
25
- console.log("Expires At:", response.data.exp);
41
+ ```
42
+
43
+ ## API Reference
44
+
45
+ ### MorambaClient
46
+
47
+ The main client class for interacting with the Moramba Crypto API.
48
+
49
+ #### Constructor Options
50
+
51
+ - `baseURL` (string): The base URL for the API (default: "https://crypto.moramba.io")
52
+ - `apiKey` (string): Your API key
53
+ - `partnerId` (string): Your partner ID
54
+
55
+ #### Methods
56
+
57
+ ##### `client.auth.createJwtToken(options)`
58
+
59
+ Creates a JWT token for authentication.
26
60
 
61
+ **Parameters:**
62
+ - `options.userid` (string): User identifier (email)
63
+ - `options.partner_id` (string): Your partner ID
64
+ - `options.api_key` (string): Your API key
27
65
 
28
66
 
29
67
 
30
- 🛠 Requirements
68
+ ## Configuration
69
+
70
+ Make sure to keep your API credentials secure. Consider using environment variables:
71
+
72
+ ```javascript
73
+ const client = new MorambaClient({
74
+ baseURL: "https://crypto.moramba.io",
75
+ apiKey: process.env.MORAMBA_API_KEY,
76
+ partnerId: process.env.MORAMBA_PARTNER_ID
77
+ });
78
+ ```
79
+
80
+ ## Package Information
81
+
82
+ - **Version:** 0.0.4
83
+ - **License:** MIT
84
+ - **Package Size:** 3.56 kB
85
+ - **Total Files:** 18
86
+
87
+
88
+
89
+ ## Support
90
+
91
+ For issues and questions, please visit the [npm package page](https://npmjs.com/package/@morambacrypto/connect).
92
+
93
+ ## Documentation
94
+
95
+ For complete API documentation, visit [API Documentation](https://npmjs.com/package/@morambacrypto/connect).
31
96
 
32
- Node.js 16+
97
+ ## License
33
98
 
34
- Valid api_key and partner_id
99
+ MIT
35
100
 
36
- Stable internet connection
101
+ ---
37
102
 
103
+ Made with ❤️ by Moramba Crypto
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morambacrypto/connect",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "This library use for interact with moramba-crypto project",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",