|
2 | 2 |
|
3 | 3 | Thank you for investing your time in contributing to our project. |
4 | 4 |
|
5 | | -We also welcome contributions to [zkApps Developer](https://docs.minaprotocol.com/zkapps) documentation. |
| 5 | +We also welcome contributions to |
| 6 | +[zkApps Developer](https://docs.minaprotocol.com/zkapps) documentation. |
6 | 7 |
|
7 | 8 | There are two ways to contribute: |
8 | 9 |
|
9 | | -1. Preferred: Maintain your own package that can be installed from [npm](https://www.npmjs.com/) and used alongside o1js. See [Creating high-quality community packages](#creating-high-quality-community-packages). |
10 | | -2. Directly contribute to this repo. See [Contributing to o1js](#contributing-to-o1js). |
| 10 | +1. Preferred: Maintain your own package that can be installed from |
| 11 | + [npm](https://www.npmjs.com/) and used alongside o1js. See |
| 12 | + [Creating high-quality community packages](#creating-high-quality-community-packages). |
| 13 | +2. Directly contribute to this repo. See |
| 14 | + [Contributing to o1js](#contributing-to-o1js). |
11 | 15 |
|
12 | | -If you maintain your own package, we strongly encourage you to add it to our official list of [community packages](./README.md#community-packages). |
| 16 | +If you maintain your own package, we strongly encourage you to add it to our |
| 17 | +official list of [community packages](./README.md#community-packages). |
13 | 18 |
|
14 | | -For information that is helpful for o1js core contributors, see [README-dev](README-dev.md). |
| 19 | +For information that is helpful for o1js core contributors, see |
| 20 | +[README-dev](README-dev.md). |
15 | 21 |
|
16 | 22 | ### Creating high-quality community packages |
17 | 23 |
|
18 | | -To ensure consistency within the o1js ecosystem and ease review and use by our team and other o1js devs, we encourage community packages to follow these standards: |
| 24 | +To ensure consistency within the o1js ecosystem and ease review and use by our |
| 25 | +team and other o1js devs, we encourage community packages to follow these |
| 26 | +standards: |
19 | 27 |
|
20 | 28 | - The package is published to [npm](https://www.npmjs.com/). |
21 | | - - `npm install <your-package>` works and is all that is needed to use the package. |
22 | | - - o1js must be listed as a [peer dependency](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#peerdependencies). |
| 29 | + - `npm install <your-package>` works and is all that is needed to use the |
| 30 | + package. |
| 31 | + - o1js must be listed as a |
| 32 | + [peer dependency](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#peerdependencies). |
23 | 33 | - If applicable, the package must work both on the web and in NodeJS. |
24 | | -- The package is created using the [zkApp CLI](https://www.npmjs.com/package/zkapp-cli) (recommended). |
25 | | - If you did not create the package using the zkApp CLI, follow these guidelines for code consistency: |
26 | | - - Use TypeScript, and export types from `d.ts` files. We suggest that you base your tsconfig on the [tsconfig.json](./tsconfig.json) that o1js uses. |
27 | | - - Code must be auto-formatted with [prettier](https://prettier.io/). We encourage you to use [.prettierrc.cjs](./.prettierrc.cjs), the same prettier config as o1js. |
| 34 | +- The package is created using the |
| 35 | + [zkApp CLI](https://www.npmjs.com/package/zkapp-cli) (recommended). If you did |
| 36 | + not create the package using the zkApp CLI, follow these guidelines for code |
| 37 | + consistency: |
| 38 | + - Use TypeScript, and export types from `d.ts` files. We suggest that you base |
| 39 | + your tsconfig on the [tsconfig.json](./tsconfig.json) that o1js uses. |
| 40 | + - Code must be auto-formatted with [prettier](https://prettier.io/). We |
| 41 | + encourage you to use [.prettierrc.cjs](./.prettierrc.cjs), the same prettier |
| 42 | + config as o1js. |
28 | 43 | - The package includes tests. |
29 | | - - If applicable, tests must demonstrate that the package's methods can successfully run as provable code. For example, when the package is used in a SmartContract or ZkProgram that is compiled and proven. |
30 | | - - Ideally, your tests are easy to use, modify, and port to other projects by developers in the ecosystem. This is achieved by using Jest (see [jest.config.js](./jest.config.js) for an example config) or by structuring your tests as plain node scripts, like [this example](./src/lib/circuit_value.unit-test.ts). |
31 | | -- Public API must be documented and [JSDoc](https://jsdoc.app/) comments must be present on exported methods and globals. |
| 44 | + - If applicable, tests must demonstrate that the package's methods can |
| 45 | + successfully run as provable code. For example, when the package is used in |
| 46 | + a SmartContract or ZkProgram that is compiled and proven. |
| 47 | + - Ideally, your tests are easy to use, modify, and port to other projects by |
| 48 | + developers in the ecosystem. This is achieved by using Jest (see |
| 49 | + [jest.config.js](./jest.config.js) for an example config) or by structuring |
| 50 | + your tests as plain node scripts, like |
| 51 | + [this example](./src/lib/circuit_value.unit-test.ts). |
| 52 | +- Public API must be documented and [JSDoc](https://jsdoc.app/) comments must be |
| 53 | + present on exported methods and globals. |
32 | 54 | - Include README and LICENSE files. |
33 | 55 | - Comments and README must be in English and preferably use American spelling. |
34 | 56 |
|
35 | 57 | ### Contributing to o1js |
36 | 58 |
|
37 | 59 | The `main` branch contains the development version of the code. |
38 | 60 |
|
39 | | -To contribute directly to this project repo, follow these steps to get your changes in the `main` branch as quickly as possible. |
| 61 | +To contribute directly to this project repo, follow these steps to get your |
| 62 | +changes in the `main` branch as quickly as possible. |
40 | 63 |
|
41 | | -1. Create a new issue for your proposed changes or use an existing issue if a relevant one exists. |
42 | | -1. Write a request for comment (RFC) to outline your proposed changes and motivation, like this [example RFC](https://github.com/o1-labs/o1js/issues/233). Describe your objective and why the change is useful, how it works, and so on. |
| 64 | +1. Create a new issue for your proposed changes or use an existing issue if a |
| 65 | + relevant one exists. |
| 66 | +1. Write a request for comment (RFC) to outline your proposed changes and |
| 67 | + motivation, like this |
| 68 | + [example RFC](https://github.com/o1-labs/o1js/issues/233). Describe your |
| 69 | + objective and why the change is useful, how it works, and so on. |
43 | 70 |
|
44 | | - Note: If you are proposing a smaller change your RFC will be smaller, and that's ok! :) |
| 71 | + Note: If you are proposing a smaller change your RFC will be smaller, and |
| 72 | + that's ok! :) |
45 | 73 |
|
46 | | -1. One of the codebase maintainers reviews your RFC and works with you until it is approved. |
47 | | -1. After your RFC proposal is approved, fork the repository and implement your changes. |
| 74 | +1. One of the codebase maintainers reviews your RFC and works with you until it |
| 75 | + is approved. |
| 76 | +1. After your RFC proposal is approved, fork the repository and implement your |
| 77 | + changes. |
48 | 78 | 1. Submit a pull request and wait for code review. :) |
49 | 79 |
|
50 | | -Our goal is to include functionality within o1js when the change is likely to be widely useful for developers. For more esoteric functionality, it makes more sense to provide high-quality community packages that can be used alongside o1js. |
| 80 | +Our goal is to include functionality within o1js when the change is likely to be |
| 81 | +widely useful for developers. For more esoteric functionality, it makes more |
| 82 | +sense to provide high-quality community packages that can be used alongside |
| 83 | +o1js. |
51 | 84 |
|
52 | 85 | We appreciate your contribution! |
0 commit comments