The vast majority of the HASH monorepo contains open-source code variously licensed under either:
- the MIT License and Apache License 2.0 dually (default); or
- the GNU Affero General Public License 3.0.
In the interests of transparency, certain proprietary code is also made available under the source-available HASH License. Per our contributor agreements, all external contributions to this repository are accompanied by grants of any applicable copyright and patent licenses.
The following rules apply on the main branch only. The license for a particular work is defined in accordance with the following prioritized rules (precedence established first-to-last):
- If present: license information directly present in the work file defines its license;
- Else, if: the work exists directly or indirectly inside a directory titled
_h, the file is available under the HASH License only; - Else, if: a
LICENSE,LICENSE.mdorLICENSE.txtfile exists in the same directory as the work, this defines its license; - Else, if: a
LICENSE,LICENSE.mdorLICENSE.txtfile is found when exploring parent directories of the work up to the project top level directory, the first one encountered defines the license applicable to the work; - Otherwise: by default, the work is dually available under both the MIT License and Apache License 2.0, at your option.
No license is granted by HASH to work or files on branches other than main.
As outlined by the license files in the respective directories:
- Within
/blockssource code is (unless otherwise noted) generally available under either the MIT License or Apache License 2.0, at your option. - Within
/apps,/libsand/tests, source code in sub-directories (including those which are nested) named@localor prefixedhashare typically licensed under the GNU Affero General Public License 3.0.
These quick reference guidelines are provided as general heuristics only. In all cases, you should follow the above license determination rules, outlined in section 1 (above), to verify the actual terms under which work is available.
And remember: anything inside a directory titled _h (no matter how deeply nested within) is available under the HASH License only. This applies to code repo-wide (including to code within the aforementioned /apps, /libs and other directories).
If you require an alternative license, or have any other questions, please contact us.