You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CNGnManager is a Python library for interacting with a CNGN API. It provides a simple interface for various operations such as checking balance, swapping between chains, depositing for redemption, creating virtual accounts, and more.
4
+
5
+
## Table of Contents
6
+
7
+
-[Installation](#installation)
8
+
-[Usage](#usage)
9
+
-[Available Methods](#available-methods)
10
+
-[Testing](#testing)
11
+
-[Error Handling](#error-handling)
12
+
-[Types](#types)
13
+
-[Security](#security)
14
+
-[Contributing](#contributing)
15
+
-[Support](#support)
16
+
-[License](#license)
17
+
18
+
## Installation
19
+
20
+
To install CNGnManager and its dependencies, run:
21
+
22
+
```bash
23
+
pip install cngn-manager
24
+
```
25
+
26
+
## Usage
27
+
28
+
First, import the `CNGnManager` class using it namespace WrappedCBDC\CNGNManager: and all necessary constants.
29
+
30
+
```python
31
+
from cngn_manager import CNGnManager, Network, ProviderType
32
+
```
33
+
34
+
Then, create an instance of `CNGnManager` with your secrets:
This project uses Jest for testing. To run the tests, follow these steps:
128
+
129
+
1. Run the test command:
130
+
131
+
```bash
132
+
python3 -m unittest discover tests
133
+
```
134
+
135
+
This will run all tests in the `tests` directory.
136
+
137
+
### Test Structure
138
+
139
+
The tests are located in the `tests` directory. They cover various aspects of the CNGnManager class, including:
140
+
141
+
- API calls for different endpoints (GET and POST requests)
142
+
- Encryption and decryption of data
143
+
- Error handling for various scenarios
144
+
145
+
146
+
## Error Handling
147
+
148
+
The library uses a custom error handling mechanism. All API errors are caught and thrown as `Error` objects with descriptive messages.
149
+
150
+
## Types
151
+
152
+
The library includes python definitions for all parameters and return types. Please refer to the type definitions in the source code for more details.
153
+
154
+
## Security
155
+
156
+
This library uses AES encryption for request payloads and Ed25519 decryption for response data. Ensure that your `encryptionKey` and `privateKey` are kept secure.
157
+
158
+
## Contributing
159
+
160
+
Contributions, issues, and feature requests are welcome. Feel free to check [issues page](https://github.com/wrappedcbdc/cngn-python-library/issues) if you want to contribute.
161
+
162
+
## Support
163
+
164
+
If you have any questions or need help using the library, please open an issue in the GitHub repository.
0 commit comments