钱包开发 - USDT - 一、Omni本地钱包安装

钱包开发 - USDT - 一、Omni本地钱包安装_第1张图片

1.win

官网下载安装 进入qt目录
命令行:
1.开始客户端

> omnicore-qt.exe -testnet -server  -rpcbind=127.0.0.1 -rpcport=18332 -rpcuser=RPCuser -rpcpassword=RPCpasswd -datadir=“f:xxx”

如果安装了其他节点
需要指定data目录

> -datadir=“f:xxx”

指定钱包文件

> -wallet= “”

2. mac

进入数据库目录:

cd /Users/Mac/Library/Application Support/Bitcoin/
cd ./app/omni。。。

关闭:

在命令行窗口 command+c退出,最好别强退

启动:

./bin/omnicore-qt  -testnet -server -rpcbind=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword

启动2:(其他pc访问)

 ./bin/omnicore-qt  -testnet -server -rpcallowip=192.168.18.35   -rpcport=18332  -rpcuser=omnicorerpc -rpcpassword=Bngj987Ncid9893 -rpcallowip=192.168.16.113

测试:

./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword getinfo

查看私钥:

./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword dumpprivkey n1dnFGMxuxkDf1Ns5G2uYhaqk2ETWPuYQG

查看到账:

./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword getbalance

获取交易信息:

./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword omni_listtransactions

根据发送方获取返回USDT信息:

./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword omni_getbalance n1dnFGMxuxkDf1Ns5G2uYhaqk2ETWPuYQG 1

在omni节点发送给

moneyqMan7uh8FqdCA2BV5yZ8qVrc9ikLP

btc可返还omni

查看入账:

./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword omni_getbalance mhf2ibPWMoeyibR2jS3jPLZQYTJsFSoG5r 1

测试网络进入QT桌面端

./bin/omnicore-qt -testnet -server -rpcbind=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword

获取指定地址交易列表listUnspent

./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword listunspent  0 999999 '["mhf2ibPWMoeyibR2jS3jPLZQYTJsFSoG5r"]'

发送usdt

./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword  omni_sendrawtx "mhf2ibPWMoeyibR2jS3jPLZQYTJsFSoG5r" "000000000000001f000000000000000a" "msis3b45PQriomes1zCAfNJpobggP1yusr"

导入特定地址到节点:

./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword importprivkey cVKMjDVaWevxmRCrNXjTPpz77SSjWvQWp1eCj5zKBpEcaASK7Gib '' false ('': account false:rescan)
如果(btc/usdt)要通过api查询余额,rescan需要设置为true

./bin/omnicore-cli -rpcconnect=192.168.16.11 -rpcport=8332 -rpcuser=RPCuser -rpcpassword=RPCpasswd importprivkey cR8rJpmWAkRPdPFUPjUjstNqf8mkqQMkEDEpDe3Q485JtaXUbu15

查询余额:
./bin/omnicore-cli -rpcconnect=127.0.0.1 -rpcport=18332 -rpcuser=RPCUser -rpcpassword=RPCPassword omni_getbalance mhRPUxrDxL7unBauvgqKkGvsVqnJ3Jx6kU 2

转载于:https://www.cnblogs.com/mapleChain/p/11527645.html

你可能感兴趣的:(钱包开发 - USDT - 一、Omni本地钱包安装)