
What is USDT
Tether’s Omni layer constructed by bitcoin block network. On this overlay network, all parties can issue token, tether company.
Token, codenamed USDT, was issued on Omni layer, anchoring in US$1:1.
Tether’s idea is very simple. You give me the dollar and give me one dollar. I issue 1 USDT. The dollar is deposited in the designated asset account. Everyone can inquire about it. The total amount of USDT issued can also be inquired on the block. When converting, give me 1 USDT and I return 1 dollar.
Tether’s idea is very simple. You give me the dollar and give me one dollar. I issue 1 USDT. The dollar is deposited in the designated asset account. Everyone can inquire about it. The total amount of USDT issued can also be inquired on the block. When converting, give me 1 USDT and I return 1 dollar.
Omni(USDT) Wallet installation
1.Download Omni Layer Wallet
wget https://bintray.com/artifact/download/omni/OmniBinaries/omnicore-0.3.0-x86_64-linux-gnu.tar.gz
ux-gn
2.Decompress & Run
tar-xzvf omnicore-0.3.0-x86_64-linux-gnu.tar.gz
Now, copy Dependent library to Local
sudo CP omnicore-0.3.0/lib/*/lib
Open the wallet directory
cd omnicore-0.3.0/bin
./omnicored
Initial startup generates ~/.bitcoin/folder
3. Writing Configuration Files
vim ~/.bitcoin/bitcoin.conf
Configuration File Description Document
Txindex = 1 # Represents the transaction initial index
Listen = 1 # Listen mode, start by default
Server = 1 # Stands for opening RPC access
Rpcuser = username # RPC username
Rpcpassword = password # RPC password
Rpcport = 8888 # RPC port
Rpcallowip = 127.0.0.1 # Allows RPC to access IP
4. Background Startup Services
nohup ./omnicored --datadir=/data/btcdata --conf=/root/.bitcoin/bitcoin.conf 2>/data/btclog.log &
5. Start-up mode
- connects the test3 test network and synchronizes the block data of the test3 network (about 20G)
./omnicored-testnet
- runs on a stand-alone computer without connecting to other networks, and block data runs locally.
./omnicored-regtest
- connects to the main network of bitcoins and synchronizes real block data (about 250G, 4-5 days).
./omnicored
Commandline- CLI Examples
New Account Address
- (algobasket account name)
An account name can correspond to multiple addresses
./omnicore-cli getaddressesbyaccount algobasket
Get the number of bitcoins in your wallet
./omnicore-cli getinfo
Get the number of USDTs
./omnicore-cli "omni_getbalance" "14Nzwd3SU4eWgiPW68RuvsgsazYEgBXjKQ" 31
Send tokens - transfer
./omnicore-cli "omni_send" "14Nzwd3SU4eWgiPW68s" "1KzU8ATU6bzbC7MDaQw8od2f" 31 "1000"
return: 7ccbf34be07e0de14c63bef01807b3095d4faf05288
(The USDT transfer is actually an OmniCore token transfer code 31. Omnicore provides multiple APIs for token transfer.
Before v0.3.1, omni_send and omni_sendall could be used. This approach must ensure that not only the token balance is required on the sending address,
A certain amount of bitcoin is also needed to pay the handling fee.
Since v0.3.1, Omnicore has provided two new API omni_funded_sendomni_funded_sendall.
The advantage of this method is that the payer can be designated, and all token transactions can use a unified address to pay the Bitcoin handling fee.
It does not require the sender to own Bitcoin. But there is no specific amount of handling fee set here.
The system will be set dynamically according to the configuration file about handling fee in the configuration file. )
Get the details of a single transaction
- (the user created in the wallet can transfer money,)
./omnicore-cli "omni_gettransaction" 7ccbf34be07e0de14c63bef01807b3095d4faf05288
Query the list of local transactions
- (recharge, transfer records)
./omnicore-cli "omni_listtransactions" '*' 10
JSONRPC API
The JSON-RPC API of Omni is exactly the same as bitcoin, which is used only as an extension of the command set of bitcoin. Specific JSON-RPC API can query the JSON-RPC of bitcoin in the secondary development process. API packages are developed.
Comments
Post a Comment