You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm new to omni USDT. I didn't find any sample for sending omni usdt.
I used bitcoinj 0.15 send with output as below
NetworkParameters parameters = to.getParameters();
Transaction tran = new Transaction(parameters);
SendRequest req = SendRequest.forTx(tran);
//req.aesKey = kit.wallet().getKeyCrypter().deriveKey(walletKey);
req.feePerKb = Coin.valueOf(5000);
//This is the limited minimum transfer amount of bitcoin, so many usdt transfers will receive a btc of 0.00000546
tran.addOutput(Coin.valueOf(546L), Address.fromString(params, adddress));
//Build the output script of usdt. Note that the amount here is multiplied by 8 times 10
String usdtHex = "6a146f6d6e69" + String.format("%016x", 31) + String.format("%016x", usdtAmount.longValue()); //omni protocol is 31
tran.addOutput(Coin.valueOf(0L), new Script(Utils.HEX.decode(usdtHex)));
Then used bitcoinj to send tx.
Wallet.SendResult result = kit.wallet().sendCoins(req);
Actually I don't understand how Omni layer validates if the sender has usdt balance or not ?
I want test omni USDT on testnet but don't see any testnet explorer. @msgilligan Please help
The text was updated successfully, but these errors were encountered:
Hi,
I'm new to omni USDT. I didn't find any sample for sending omni usdt.
I used bitcoinj 0.15 send with output as below
Then used bitcoinj to send tx.
Actually I don't understand how Omni layer validates if the sender has usdt balance or not ?
I want test omni USDT on testnet but don't see any testnet explorer.
@msgilligan Please help
The text was updated successfully, but these errors were encountered: