omnicore归集、充值记录、异常排查、原生模式交易、使用心得
yum -y install nodejs git wget vim goaccess gcc gcc-c++ autoconf automake make pcre pcre-devel zlib zlib-devel libxml2 libxml2-devel openssl openssl-devel gd libjpeg libjpeg-devel libpng libpng-devel libaio libtool boost boost-devel libevent-devel
mkdir /home/libdb4
cd libdb4/
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-devel-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-devel-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-cxx-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm
git clone https://github.com/OmniLayer/omnicore.git
cd omnicore/
./autogen.sh
./configure
make
make install
5、创建配置问题:bitcoin.conf---放在.bitcoin文件夹中
server=1
txindex=1
rpcuser=你的rpc用户名
rpcpassword=你的rpc密码
rpcallowip=127.0.0.1
rpcallowip=192.168.2.0
rpcallowip=0.0.0.0/0 #不受ip限制
rpcport=8332
paytxfee=0.00001
minrelaytxfee=0.00001
datacarriersize=80
logtimestamps=1
omnidebug=tally
omnidebug=packets
omnidebug=pending
介绍:
· server=1代表开启RPC访问
· txindex=1代表事务初始索引
· recuser和rpcpassword 代表rpc访问的身份验证,
· rpcallowip 和rpcport代表允许访问钱包的ip地址及端口。
· paytxfee和minrelattxfee控制bitcoin交易的手续费,Omni交易也属于一种特殊的比特币交易,打包与广播也需要向矿工支付费用
omnicore/src
目录,开始启动钱包· ./omnicored -testnet 连接test3测试网络,会同步test3网络的区块数据(约20G)
· ./omnicored -regtest 单机运行,不需要连接其他网络,区块数据在本地运行。
· ./omnicored连接比特币主网网络,会同步真实区块数据(约180G)。
启动命令:omnicored -testnet -conf=/root/.bitcoin/bitcoin.conf -datadir=/root/usdt/
后台启动命令:nohup omnicored -testnet -conf=/root/.bitcoin/bitcoin.conf -datadir=/root/usdt/ &
https://bitcoinfaucet.uo1.net/send.php
https://kuttler.eu/en/bitcoin/btc/faucet/
// 查询
https://chain.so/address/BTCTEST/n2LzsZHGgwMyXTiEkhhmtHowBEKkF5xv7g
https://www.blockchain.com/btctest/address/n2LzsZHGgwMyXTiEkhhmtHowBEKkF5xv7g
https://www.jianshu.com/p/bd573e2df746
https://www.jianshu.com/p/3aa3ab01b296
https://www.jianshu.com/p/71812f2d10ff
// 操作
https://www.jianshu.com/p/417c280b8f9f
// 归集
https://github.com/OmniLayer/omnicore/wiki/Use-the-raw-transaction-API-to-create-a-Simple-Send-transaction
https://github.com/OmniLayer/omnicore/blob/master/src/omnicore/doc/rpc-api.md
https://blog.csdn.net/wm609972715/article/details/82891064
9、开发(备用)
https://blog.csdn.net/jiang_xinxing/article/details/88090866
10、接口
usdt区块浏览器:
https://api.omniexplorer.info/#doc-general-notes
https://www.omniexplorer.info/
RPC-API:
https://github.com/OmniLayer/omnicore/blob/master/src/omnicore/doc/rpc-api.md
[
{
"address": "musbek3hDYu3wiKc8RSWCFjXAMWChLHJf8",
"account": "",
"amount": 10.00000000,
"confirmations": 1,
"label": "",
"txids": [
"321b4a4342b0f28e74cf8c10b016a4973a8f83a66f20e9357215a364f51ada4e"
]
}
]
omnicore-cli "omni_setautocommit" true
omnicore-cli -testnet "omni_send" "mqn2FFboeSKRHRWYcdMe7LupDX1QRzbHZp" "moURpc7XBZKYkXFRkyJxzvdwg3nisnW757" 2 "1.0"