<p>The only omni-specific thing in Omni/Tether txs is the OP RETURN, and a small dust output to the address you are sending the funds to. Both of these seem to check out in your tx (I'm assuming you're sending to <code>1KH34S5mAmgAzu3mJAqrS3wjP15qYKZQXx</code>).</p>

<p>You should be able to just use the regular Bitcoind signing functionality (or whatever library you are using's wrapper of it). They don't require any special signatures.</p>

CC BY-SA 4.0
2018-07-22T00:16:36.620Z
https://omniexplorer.info/search/57af554e02ed572f49493c7c5a1cce7621c981e1f9a52cc1ec808fb229d002d5
Marcelo
CC BY-SA 4.0
2018-07-22T00:16:50.947Z
I was trying that, but in a different way, thanks.
Marcelo
CC BY-SA 4.0
2018-07-22T00:17:20.587Z
I'll put the code later on, in the question.
Marcelo
CC BY-SA 4.0
2018-07-21T23:46:40.510Z
2018-07-21T23:46:40.510Z
Raghav Sood
<p>I'm not using omnicore by RPC calls, I dont want to put a server up and make those RPC calls, I want to make a simple transaction on the TetherUS(USDT) network, this is my code:</p>

<pre>
const getUnsignedTransaction = async (data) => {
  let { pubKey, fromAddr, toAddr, amount, fee, testnet } = data;
  let params = new URLSearchParams;
  params.append('transaction_version',1);
  params.append('currency_identifier',31);
  params.append('fee',fee);
  params.append('testnet',testnet);
  params.append('pubkey',pubKey);
  params.append('amount_to_transfer',amount);
  params.append('transaction_from',fromAddr);
  params.append('transaction_to',toAddr);
  return await Axios.post('/v1/transaction/getunsigned/0', params);
}
</pre>

<p>When I call this function above</p>

<pre>
  let a = await getUnsignedTransaction({
    amount:    '0.00001',
    fee:       '0.00005',
    testnet:   false,
    toAddr:    '1KH34S5mAmgAzu3mJAqrS3wjP15qYKZQXx',
    fromAddr:  '17UrxYAAF5WkjtFKeuZ2S7ojDWoJY2LunF',
 pubKey:'03f26647f3bbf4566318d00e2438036be0f1a68ee5deea604be6fa6cad68349888',
  }).then(e => e.data);
  console.log(a);
</pre>

<p>I got this response:</p>

<pre>
{ sourceScript:
   'OP_DUP OP_HASH160 4715b028de4327f5f87915d89d1d074db3f03992 OP_EQUALVERIFY OP_CHECKSIG',
  status: 200,
  unsignedhex:
   '0100000001131184d4a10bbf1acef3cb137d37ecc8f36cb3da208c9ebe86fb988821d532b40100000000ffffffff034d160000000000001976a9144715b028de4327f5f87915d89d1d074db3f0399288ac22020000000000001976a914c87aa36f1402052ef87ea433c2fa252ae9a9794988ac0000000000000000166a146f6d6e69000000000000001f00000000000003e800000000' }
</pre>

<p>Now here is the question: How can I make this <strong>unsigned raw transaction</strong> an valid transaction to the Tether network and so, broadcast this <strong>signed raw transaction</strong></p>

<p>This is the blockexplorer I'm using: <a href="https://api.omniexplorer.info/#request-v1-transaction-pushtx" rel="nofollow noreferrer">https://api.omniexplorer.info/#request-v1-transaction-pushtx</a></p>

<hr>

<h1>Code solution</h1>

<p>As the @Raghav_Sood chosen answer, I had to use <code>bitconjs-lib</code> to wrap this transaction and to sign it.</p>

<p>For those who wanna see in the future how I made the transaction, was kinda this:</p>

<pre>
let tx  = bitcoinjs.Transaction.fromHex(raw);
let txb = bitcoinjs.TransactionBuilder.fromTransaction(tx);
txb.sign(0, keyPair)
let raw = txb.build().toHex();

let d = await pushtx(raw).then(e => e.data);
</pre>

<p>function <code>pushtx</code></p>

<pre>
async function pushtx(raw) {
  let params = new URLSearchParams;
  params.append('signedTransaction',raw);
  return await Axios.post('/v1/transaction/pushtx/',params);
}
</pre>

<transactions><raw-transaction><tether>
Tether USDT raw transaction unsigned
Marcelo
# Tether USDT raw transaction unsigned

(Asked by: username_0 on 2018-07-21)

I'm not using omnicore by RPC calls, I dont want to put a server up and make those RPC calls, I want to make a simple transaction on the TetherUS(USDT) network, this is my code:

const getUnsignedTransaction = async (data) => {
  let { pubKey, fromAddr, toAddr, amount, fee, testnet } = data;
  let params = new URLSearchParams;
  params.append('transaction_version',1);
  params.append('currency_identifier',31);
  params.append('fee',fee);
  params.append('testnet',testnet);
  params.append('pubkey',pubKey);
  params.append('amount_to_transfer',amount);
  params.append('transaction_from',fromAddr);
  params.append('transaction_to',toAddr);
  return await Axios.post('/v1/transaction/getunsigned/0', params);
}

When I call this function above

  let a = await getUnsignedTransaction({
    amount:    '0.00001',
    fee:       '0.00005',
    testnet:   false,
    toAddr:    '1KH34S5mAmgAzu3mJAqrS3wjP15qYKZQXx',
    fromAddr:  '17UrxYAAF5WkjtFKeuZ2S7ojDWoJY2LunF',
 pubKey:'03f26647f3bbf4566318d00e2438036be0f1a68ee5deea604be6fa6cad68349888',
  }).then(e => e.data);
  console.log(a);

I got this response:

{ sourceScript:
   'OP_DUP OP_HASH160 4715b028de4327f5f87915d89d1d074db3f03992 OP_EQUALVERIFY OP_CHECKSIG',
  status: 200,
  unsignedhex:
   '0100000001131184d4a10bbf1acef3cb137d37ecc8f36cb3da208c9ebe86fb988821d532b40100000000ffffffff034d160000000000001976a9144715b028de4327f5f87915d89d1d074db3f0399288ac22020000000000001976a914c87aa36f1402052ef87ea433c2fa252ae9a9794988ac0000000000000000166a146f6d6e69000000000000001f00000000000003e800000000' }

Now here is the question: How can I make this unsigned raw transaction an valid transaction to the Tether network and so, broadcast this signed raw transaction
This is the blockexplorer I'm using: https://api.omniexplorer.info/#request-v1-transaction-pushtx

Code solution
As the @Raghav_Sood chosen answer, I had to use bitconjs-lib to wrap this transaction and to sign it.
For those who wanna see in the future how I made the transaction, was kinda this:

let tx  = bitcoinjs.Transaction.fromHex(raw);
let txb = bitcoinjs.TransactionBuilder.fromTransaction(tx);
txb.sign(0, keyPair)
let raw = txb.build().toHex();

let d = await pushtx(raw).then(e => e.data);

function pushtx

async function pushtx(raw) {
  let params = new URLSearchParams;
  params.append('signedTransaction',raw);
  return await Axios.post('/v1/transaction/pushtx/',params);
}

**Tags:** transactions, raw-transaction, tether


---

## 1 answers

### Answer by username_1 on 2018-07-21. Score: 1 | Accepted answer

The only omni-specific thing in Omni/Tether txs is the OP RETURN, and a small dust output to the address you are sending the funds to. Both of these seem to check out in your tx (I'm assuming you're sending to `1KH34S5mAmgAzu3mJAqrS3wjP15qYKZQXx`).

You should be able to just use the regular Bitcoind signing functionality (or whatever library you are using's wrapper of it). They don't require any special signatures.

> **Comments:**
> **username_0**: https://omniexplorer.info/search/57af554e02ed572f49493c7c5a1cce7621c981e1f9a52cc1ec808fb229d002d5  
> **username_0**: I was trying that, but in a different way, thanks.  
> **username_0**: I'll put the code later on, in the question.  

---

