Kadena was founded on the idea that blockchain could revolutionize how the world interacts and transacts. But to get to mass adoption, chain technology and the ecosystem connecting it to the world needed to be reimagined from the ground up. Our founders built a proprietary chain architecture and created the tools to make blockchain work for everyone. – at speed, scale, and energy efficiency previously thought unachievable.
Our ecosystem powers real-world use cases for enterprises and entrepreneurs, providing the security of Bitcoin, virtually free gas (transaction fees), unparalleled throughput, as well as Pact - a secure smart contract language with built-in bug detection.
With such a revolutionary blockchain the community also needs the tools to create products on this chain. Therefore, we started with Kadena.js. Kadena.js is a Monorepo (mono repository) where we will store all our JavaScript/TypeScript solutions for our blockchain (libs, tooling, dApps, and so forth).
Kadena.js is the source for several packages, tooling, and dapps that have any affiliation with Front-end development.
At this moment Kadena.js will be the home of these packages (see also Definition of libraries in kadena.js):
@kadena/cryptography-utils
contains hash/sign utils@kadena/chainweb-node-client
typed js wrapper with fetch to call chainweb-node API endpoints (amongst others https://api.chainweb.com/openapi/pact.html). This will probably have some breakdownapi
one-to-one mapping of rest endpoints to typed js clientutils
functions like that use theapi
functions to get information
@kadena/chainweb-data-client
typed js wrapper with fetch to call chainweb-data API endpoints@kadena/pactjs-client
wrapper around chainweb-node-client with ability to switch environments etc.@kadena/wallet-client
client for wallet to sign, connect, retrieve account info, etc@kadena/marmalade-client
specific client for marmalade/NFTs@kadena/types
common used typescript definitions. Preferably this will all move to the low-level libraries. Whenever you build something on top of those, you can use those types.- =====
@kadena/pactjs
runtime for generating pact expressions@kadena/pactjs-cli
cli to generate pact contract type definitions and interface to pact client. deployment of contracts, etc@kadena/pactjs-generator
library that creates typescript definition from contract, template, etc.kadena/pactjs-generated
library that does not exist on npm. It is generated by@kadena/pactjs-cli
and@kadena/pactjs-generator
and is a dependency of@kadena/pactjs
@kadena/transaction-templates
a supportive library for transactions. As there is no way to determine from pact alone which caps are needed for a given transaction, and in turn which signatures are needed, we want to provide the community a way to "publish" templates. These templates can be used by@kadena/pactjs-cli
to generate the necessary typescript definitions
As our ecosystem will grow so will the packages and dapps we will release under Kadena.js.
See CONTRIBUTING.md on how to contribute.
See requirements to get started. After that come back here
- run
rush install
when you've cloned the project - adding dependencies is done
- with
rush add -p <package>
(add--dev
if needed) - by adding it to the
package.json
and runningrush update
afterwards
- with
If any issues occur, you can run rush update --purge
Read more about Rush "New developer"
Run rush test
to run all the available tests. To run the tests for a specific
project, run rushx test
in the folder of the chosen project. You can also
watch the tests by running rushx test -w
.
- node 16
- rushjs
several options, here used n
. Can also use asdf
(generic version manager),
nvm
, or installation with brew
(discouraged)
# `n` node version manager
brew install n
n 16
pnpm install --global @microsoft/rush
Now go to getting started
- You need to be added to the
@kadena
and@kadena-dev
NPM organizations (depending on what you want to publish) - You need to have push rights on master, as the version bump needs to be done against master (because of tags) (TODO: fix that this isn't necessary)
- PRs need to be merged to master with the appropriate changelogs and version policy (when using a sub 1.0.0 version, there cannot be any breaking changes in the changelog)
- On master
- make sure to checkout master
- stash all changes including untracked ones
- run a build + test for the full monorepo
- run the version bump command, this will be pushed to master (hence the
push rights on master)
rush version --bump -b master --ignore-git-hooks; rush publish --apply --publish --add-commit-details --set-access-level public --target-branch master
- run the publish command. This will require you to fill in 2FA tokens for
every push for npm
rush publish --apply --publish --include-all --add-commit-details --set-access-level public --target-branch master
- run the version bump command, this will be pushed to master (hence the
push rights on master)
Thanks goes to these wonderful people (emoji key):
Randy 📖 💻 |
eileenmguo 💻 |
Ashwin van Dijk 💻 |
Steven 💻 |
Albert G 👀 |
Andy Tang 👀 |
Kate Hee Kyun Yun 💻 |
Lars Kuhtz 💻 |
de-nial-lo 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!