The official Javascript SDK for interacting with RenVM.
yarn add @renproject/ren @renproject/chains
See Ren Client Docs
RenJS v3 is currently available as an alpha release:
yarn add @renproject/ren @renproject/chains
RenJS v3 Docs (WIP)
See the Releases page.
ren
- Javascript SDK for interacting with RenVM.provider
- JSON-RPC provider.utils
- Helper functions used by the other packages.mock-provider
- For testing locally with Ganache/Hardhat- chains, for enabling support for blockchains and assets:
-
chains-bitcoin
- Bitcoin and Bitcoin forks
-
chains-ethereum
- Ethereum and other EVM chains
-
chains-terra
- Terra/LUNA
-
chains-filecoin
- Filecoin
-
chains-solana
- Solana
-
chains
- Combines all of the above chains into one package
Developer docs - click to expand
# Clone repository
git clone git@github.com:renproject/ren-js.git && cd ren-js
# Install dependencies
yarn
# Build every package
yarn run build
If you want to use your local version of RenJS in another repository, run
# In the ren-js repository
yarn run link:all
You can now link it to any other local repository by running:
# In other local repositories
yarn link @renproject/ren @renproject/chains @renproject/utils @renproject/provider
You'll need to:
- Generate a mnemonic and send ETH (goerli for testnet) (path:
m/44'/60'/0'/0/
).let w = require("ethers").Wallet.createRandom(); console.debug(w.address, w.mnemonic.phrase);
- Generate a private key and send testnet crypto funds.
require("send-crypto").newPrivateKey();
- Optionally generate an Infura API key.
Create a .env
file which contains the following exported variables:
export MNEMONIC="your mnemonic here"
export TESTNET_PRIVATE_KEY="your bitcoin private key"
# Optional
export INFURA_KEY="your infura key"
To run the tests:
yarn run test