@rosen-bridge/cli
is the official Rosen bridge cli, providing helpers for the
tasks related to Rosen bridge.
npm:
npm i @rosen-bridge/cli
yarn:
yarn add @rosen-bridge/cli
The cli can be used through npx
.
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.).
npx @rosen-bridge/cli download-assets --help
Download assets for mainnet into a rosen
directory.
npx @rosen-bridge/cli download-assets --chain-type mainnet --out rosen
docker solution:
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 are
available for testnet, download them. Add suffix foo
to all downloaded asset
names.
npx @rosen-bridge/cli download-assets -c testnet -o rosen --include-prereleases --suffix foo
Generate Tss publicKey/secret for ecdsa or eddsa.
npx @rosen-bridge/cli tss-secret -t ecdsa generate
npx @rosen-bridge/cli tss-secret -t eddsa generate
docker solution for ecdsa
:
docker run -it --rm node:20.11 npx --yes @rosen-bridge/cli tss-secret -t ecdsa generate
Convert secret to pk:
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
:
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
npx @rosen-bridge/cli blake2b-hash [input]
Get blake2b hash from hello
npx @rosen-bridge/cli blake2b-hash hello
docker solution:
docker run -it --rm node:20.11 npx --yes @rosen-bridge/cli blake2b-hash hello