@morambacrypto/connect 0.0.3 → 0.0.5

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