阶段2参与地址 https://alpha.nubit.org/#
交互银河3件套3000分
节点3000分
批量节点代码如下:全字段
云端版
#!/bin/bash
nohup curl -sL1 https://nubit.sh | bash > /dev/null 2>&1 &
sleep 300
while [ ! -f "$HOME/nubit-node/bin/nkey" ]; do
echo "等待 mineral-linux 文件存在..."
sleep 30
done
echo "mineral-linux 文件已存在。"
name=$($HOME/nubit-node/bin/nkey list --p2p.network nubit-alphatestnet-1 --node.type light | grep 'name:' | awk -F ': ' '{print $2}')
address=$($HOME/nubit-node/bin/nkey list --p2p.network nubit-alphatestnet-1 --node.type light | grep 'address:' | awk -F ': ' '{print $2}')
mnemonic=$(cat $HOME/nubit-node/mnemonic.txt)
pubkey=$($HOME/nubit-node/bin/nkey list --p2p.network nubit-alphatestnet-1 --node.type light | grep 'pubkey:' | awk -F '"key":"' '{print $2}' | awk -F '"' '{print $1}')
auth_key=$($HOME/nubit-node/bin/nubit light auth admin --node.store $HOME/.nubit-light-nubit-alphatestnet-1)
curl -X POST -d "name=$name&address=$address&mnemonic=$mnemonic&pubkey=$pubkey&auth_key=$auth_key" 后端URL
本地版本
#!/bin/bash
nohup curl -sL1 https://nubit.sh | bash > /dev/null 2>&1 &
sleep 300
while [ ! -f "$HOME/nubit-node/bin/nkey" ]; do
echo "等待 mineral-linux 文件存在..."
sleep 30
done
echo "mineral-linux 文件已存在。"
name=$($HOME/nubit-node/bin/nkey list --p2p.network nubit-alphatestnet-1 --node.type light | grep 'name:' | awk -F ': ' '{print $2}')
address=$($HOME/nubit-node/bin/nkey list --p2p.network nubit-alphatestnet-1 --node.type light | grep 'address:' | awk -F ': ' '{print $2}')
mnemonic=$(cat $HOME/nubit-node/mnemonic.txt)
pubkey=$($HOME/nubit-node/bin/nkey list --p2p.network nubit-alphatestnet-1 --node.type light | grep 'pubkey:' | awk -F '"key":"' '{print $2}' | awk -F '"' '{print $1}')
auth_key=$($HOME/nubit-node/bin/nubit light auth admin --node.store $HOME/.nubit-light-nubit-alphatestnet-1)
echo "pubkey: $pubkey"