@morambacrypto/connect 0.0.3 → 0.0.4
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/README.md +33 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,4 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
## Documentation
|
|
4
4
|
|
|
5
|
-
- [API](https://morambacrypto.readme.io/)
|
|
5
|
+
- [API](https://morambacrypto.readme.io/)
|
|
6
|
+
|
|
7
|
+
npm install @morambacrypto/connect
|
|
8
|
+
|
|
9
|
+
import { MorambaClient } from "@morambacrypto/connect";
|
|
10
|
+
|
|
11
|
+
const client = new MorambaClient({
|
|
12
|
+
baseURL: "https://crypto.moramba.io",
|
|
13
|
+
apiKey: "YOUR_API_KEY",
|
|
14
|
+
partnerId: "YOUR_PARTNER_ID",
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const response = await client.auth.createJwtToken({
|
|
18
|
+
userid: "email@example.com",
|
|
19
|
+
partner_id: "YOUR_PARTNER_ID",
|
|
20
|
+
api_key: "YOUR_API_KEY",
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
console.log("JWT Token:", response.data.token);
|
|
24
|
+
console.log("Issued At:", response.data.iat);
|
|
25
|
+
console.log("Expires At:", response.data.exp);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
🛠 Requirements
|
|
31
|
+
|
|
32
|
+
Node.js 16+
|
|
33
|
+
|
|
34
|
+
Valid api_key and partner_id
|
|
35
|
+
|
|
36
|
+
Stable internet connection
|
|
37
|
+
|