First off, thank you for considering contributing to OrangeKit! It's people like you that make OrangeKit such a great tool. This document provides guidelines for contributing to the project to ensure a smooth process for both contributors and maintainers.
- Ensure the bug was not already reported by searching on GitHub under Issues.
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
- Ensure the enhancement was not already suggested by searching on GitHub under Issues.
- Open a new issue and provide the relevant information about the enhancement, including a clear and detailed explanation of the problem you're aiming to solve.
- Ensure the wallet was not already integrated by checking the lib/integrations
- Create a new branch:
git checkout -b NEW_WALLET_"EXAMPLE_WALLET_NAME" - Create a new file under lib/integrations with the name exampleWalletName.ts (name your wallet according to camelCase)
- Implement required functions and write your wallet's metadata according to given interface below. see unisat.ts as example
type WalletMetaData = {
name: string
logoPath: string
dowloadLink: string
description?: string
}
interface Wallet = {
sign: (message: string) => Promise<string>
requestAccounts: () => Promise<string[]>
isInjected: () => boolean
metaData: WalletMetaData
subscribeAccountsChanged?: (callback: (accounts: string[]) => void) => void
unsubscribeAccountsChanged?: (callback: (accounts: string[]) => void) => void
}- Export your wallet from lib/integrations/index.ts
- Create a pull request by following the Pull Requests guideline below
- Ensure any install or build dependencies are removed before the end of the layer when doing a build.
- Update the README.md with details of changes, including new dependencies, architecture changes, etc.
- Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent.
- Ensure your code adheres to the existing style to maintain consistency.
- Submit a pull request to the
mainbranch. Be sure to reference any relevant issues in your PR description.
- Fork the repo on GitHub.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/OrangeKit.git - Install dependencies:
npm install - Create a branch for your feature or bugfix:
git checkout -b FEATURE_OR_BUGFIX - Make your changes.
- Test your changes locally.
- Commit your changes:
git commit -m 'Add some feature or fix some bug' - Push to your fork:
git push origin FEATURE_OR_BUGFIX - Create a new pull request from your forked repository to the main OrangeKit repo.
- Use semicolons.
- 2-space indentation.
- Stick to the existing style as much as possible.
- Always comment your code where necessary.
Your contributions are always welcome and appreciated. Following the guidelines above helps to communicate that you respect the time of the developers managing and developing this open-source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping finalize your pull requests.