The official Rosen bridge cli, providing helpers for the tasks related to Rosen bridge
npm install @rosen-bridge/cli- Introduction
- Installation
- Usage
@rosen-bridge/cli is the official Rosen bridge cli, providing helpers for the
tasks related to Rosen bridge.
npm:
``sh`
npm i @rosen-bridge/cli
yarn:
`sh`
yarn add @rosen-bridge/cli
The cli can be used through npx.
`sh`
npx @rosen-bridge/cli --help
Downloads Rosen bridge assets (tokens and addresses files) from
contracts repository on GitHub for
a specific chain type (e.g. mainnet, etc.).
`sh`
npx @rosen-bridge/cli download-assets --help
#### Examples
Download assets for mainnet into a rosen directory.
`sh`
npx @rosen-bridge/cli download-assets --chain-type mainnet --out rosen
docker solution:
`shell`
docker run -it --rm -v "$PWD"/rosen:/usr/src/app/rosen -w /usr/src/app node:20.11 npx --yes @rosen-bridge/cli download-assets --chain-type mainnet --out rosen
Download assets for testnet into a rosen directory. If some pre-releases arefoo
available for testnet, download them. Add suffix to all downloaded asset
names.
`sh`
npx @rosen-bridge/cli download-assets -c testnet -o rosen --include-prereleases --suffix foo
Generate Tss publicKey/secret for ecdsa or eddsa.
`sh`
npx @rosen-bridge/cli tss-secret -t ecdsa generate
npx @rosen-bridge/cli tss-secret -t eddsa generate
docker solution for ecdsa:
`shell`
docker run -it --rm node:20.11 npx --yes @rosen-bridge/cli tss-secret -t ecdsa generate
Convert secret to pk:
`sh`
npx @rosen-bridge/cli tss-secret -t ecdsa convert-to-pk YOUR_TSS_SECRET
npx @rosen-bridge/cli tss-secret -t eddsa convert-to-pk YOUR_TSS_SECRET
docker solution for ecdsa:
`shell`
docker run -it --rm node:20.11 npx --yes @rosen-bridge/cli tss-secret -t ecdsa convert-to-pk YOUR_TSS_SECRET
blake2b hash of specified input
`sh`
npx @rosen-bridge/cli blake2b-hash [input]
#### Examples
Get blake2b hash from hello
`sh`
npx @rosen-bridge/cli blake2b-hash hello
docker solution:
`shell``
docker run -it --rm node:20.11 npx --yes @rosen-bridge/cli blake2b-hash hello