Skip to content

Next-DAO/atomicals-image

Repository files navigation

atomicals-js image

中文说明

This repository contains all source codes for the official repository atomicals-js.

Aim to provide a simple and easy way to use atomicals's cli. For whom struggled with the installation of nodejs and npm.

NOTE: Only tested on macOS/Linux.

Usage

1. Install Docker first. (Recommend to use Orbstack if you are using macOS.)

2a. Run the following command to build the image:

Jump to step 2b if you don't want to build it yourself.

git clone https://github.com/lucky2077/atomicals-image
cd atomicals-image
docker build -t atomicals .

2b. Or you can pull the image from docker hub:

docker pull lucky2077/atomicals
docker tag lucky2077/atomicals atomicals

3. Run the following command to check your balance; You'll see two addresses and two qr-code images if succeed.

crete an empty file named local-wallet.json first.

touch local-wallet.json
docker run -it --rm -v `pwd`/local-wallet.json:/wallet.json atomicals yarn cli balances
  • The container will execute yarn cli wallet-init automatically if the local-wallet.json is empty. And save wallet info into local-wallet.json.
  • The :/wallet.json is used by the image, DO NOT CHANGE IT.
  • replace yarn cli balances with other commands from official docs. https://docs.atomicals.xyz/

NOTE: You should save the local-wallet.json to a SAFE place.

4. (Optional) You can use alias to make it easier to use:

add this to your .bashrc or .zshrc

alias atom-cli='f() { if [ -f "$1" ]; then docker run -it --rm -v "$1":/wallet.json atomicals yarn cli "${@:2}"; else echo "wallet file $1 not exit"; fi; unset -f f; }; f'

then you can use it like this

atom-cli `pwd`/local-wallet.json balances

5. (Optional) You can use the following command to create many wallets:

mkdir wallets

# create 10 empty wallet.json file in wallets folder
# e.g. wallets/wallet1.json, wallets/wallet2.json, ...
touch wallets/wallet{1..10}.json

# open 10 terminals or use tmux/screen
# run the following command in each terminal
docker run -it --rm -v `pwd`/wallets/wallet1.json:/wallet.json atomicals yarn cli mint-dft pepe
docker run -it --rm -v `pwd`/wallets/wallet2.json:/wallet.json atomicals yarn cli mint-dft pepe
...
docker run -it --rm -v `pwd`/wallets/wallet10.json:/wallet.json atomicals yarn cli mint-dft pepe

# or use alias
atom-cli `pwd`/wallets/wallet1.json mint-dft pepe
atom-cli `pwd`/wallets/wallet2.json mint-dft pepe
...
atom-cli `pwd`/wallets/wallet10.json mint-dft pepe

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published