Skip to content

Commit a61d256

Browse files
committed
refactor: Add CONTRIBUTING.md and update README.md
This commit adds a CONTRIBUTING.md file to provide guidelines for contributing to the MTS SDK project. It also updates the README.md file with usage examples and information about the Assets service in the MyTonSwap client. [Issue #123]
1 parent 7a4f1ce commit a61d256

File tree

2 files changed

+83
-6
lines changed

2 files changed

+83
-6
lines changed

CONTRIBUTING.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Contributing to MTS SDK
2+
3+
Thank you for considering contributing to the MTS SDK project! We welcome contributions from the community and are grateful for your support.
4+
5+
## How to Contribute
6+
7+
### Reporting Bugs
8+
9+
If you find a bug, please report it by opening an issue on our [GitHub Issues](https://github.com/your-repo/mts-sdk/issues) page. Provide as much detail as possible, including steps to reproduce the issue and any relevant logs or screenshots.
10+
11+
### Feature Requests
12+
13+
We are always looking to improve the MTS SDK. If you have a feature request, please open an issue on our [GitHub Issues](https://github.com/your-repo/mts-sdk/issues) page and describe the feature in detail.
14+
15+
### Submitting Changes
16+
17+
1. **Fork the Repository**: Fork the project on GitHub and clone your fork locally.
18+
2. **Create a Branch**: Create a new branch for your changes (`git checkout -b my-feature-branch`).
19+
3. **Make Changes**: Make your changes to the codebase.
20+
4. **Commit Changes**: Commit your changes with a clear and concise commit message (`git commit -m "Add new feature"`).
21+
5. **Push Changes**: Push your changes to your fork (`git push origin my-feature-branch`).
22+
6. **Open a Pull Request**: Open a pull request on the main repository and provide a detailed description of your changes.
23+
24+
### Code Style
25+
26+
Please ensure your code adheres to the project's coding standards. We use [Prettier](https://prettier.io/) for code formatting. Run `npm run format` before committing your changes.
27+
28+
### Testing
29+
30+
Ensure that your changes do not break existing tests and add new tests for any new functionality. Run the test suite using `npm test`.
31+
32+
### Documentation
33+
34+
Update the documentation to reflect any changes or new features. This includes updating the README.md and any other relevant documentation files.
35+
36+
## Code of Conduct
37+
38+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project, you agree to abide by its terms.
39+
40+
## Getting Help
41+
42+
If you need help or have any questions, feel free to reach out by opening an issue or contacting the maintainers.
43+
44+
Thank you for your contributions!

README.md

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,48 @@
55
<p align="center">SDK for MyTonSwap DEX aggregator</p>
66

77

8-
### ⚠️ Active Development Notice ⚠️
9-
This project is currently under active development and is not yet ready for public use.
10-
11-
We recommend you DO NOT use this project in production environments until a stable release is announced. Expect frequent changes, updates, and possible breaking changes during this phase.
12-
13-
148
Installation:
159

1610
```bash
1711
npm install @mytonswap/sdk
1812
```
1913

14+
## Usage
15+
16+
Here's a basic example of how to use the MyTonSwap SDK:
17+
18+
```ts
19+
import { MyTonSwapClient } from '@mytonswap/sdk';
20+
21+
const client = new MyTonSwapClient();
22+
23+
async function performSwap() {
24+
const userWallet = 'your-wallet-address';
25+
const TON = await client.assets.getExactAsset('TON');
26+
const NOT = await client.assets.getExactAsset('NOT');
27+
const bestRoute = await client.router.findBestRoute(
28+
TON!.address,
29+
NOT!.address,
30+
toNano(1),
31+
1,
32+
);
33+
34+
const swap = await client.swap.createSwap(userWallet, bestRoute);
35+
console.log(swap);
36+
}
37+
38+
performSwap();
39+
```
40+
41+
42+
## Contributing
43+
44+
We welcome contributions! Please read our [contributing guidelines](CONTRIBUTING.md) before submitting a pull request.
45+
46+
## License
47+
48+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
49+
50+
## Support
51+
52+
If you have any questions or need help, feel free to open an issue on our [GitHub repository](https://github.com/MyTonSwap/sdk/issues).

0 commit comments

Comments
 (0)