<p>You need to either convert data.recipient from RS format to numeric format or convert transaction.recipient from numeric format to RS format using NRS.convertNumericToRSAccountFormat(id)</p>

CC BY-SA 4.0
2018-10-06T19:46:34.460Z
So transaction.recipient should be the numeric format of the recipient addresses?
MrV
CC BY-SA 4.0
2018-10-06T20:42:38.153Z
Right, you can convert the public key to numeric account then convert it to RS format using NRS.convertNumericToRSAccountFormat(id)
lyaffe
CC BY-SA 4.0
2018-10-06T21:36:16.697Z
I found my error.  My `byteArrayToBigInteger` function was incorrect.  Your answer helped me though, as I new what outcome I should expect with the numeric address.  Thank you!
MrV
CC BY-SA 4.0
2018-10-06T17:21:46.037Z
2018-10-06T17:21:46.037Z
lyaffe
<p>I'm trying to add <code>verifyTransactionBytes</code> to my app.  I am currently stuck because of <code>transaction.recipient !== data.recipient</code>.  I don't understand how <code>transaction.recipient</code> will ever equal <code>data.recipient</code>.</p>

<p><code>data.recipient</code> equals <code>ARDOR-64L4-C4H9-Z9PU-9YKDT</code></p>

<p>However,  <code>transaction.recipient</code> equals <code>12686039152117651770352583052021228896653772998482022211948610002430512793010043372255281183988421160450227631016638876582933743874739812608892576232835541561180017189881475915550182092483428449468438018195304514943626747005224233901130236596723251118266281272406204049816147466250586545776300564249483796886483621200942491492199171631589798205980673</code></p>

<p>This doesn't really surprise me, because I don't see how an ARDOR address gets generated from <code>transaction.recipient = String(helpers.byteArrayToBigInteger(byteArray, pos));</code></p>

<p>Which looks like it should return a number, not a string.  What am I missing</p>

<ardor>
Recipient calculation in verifyTransactionBytes for Ardor
MrV
# Recipient calculation in verifyTransactionBytes for Ardor

(Asked by: username_0 on 2018-10-06)

I'm trying to add `verifyTransactionBytes` to my app. I am currently stuck because of `transaction.recipient !== data.recipient`. I don't understand how `transaction.recipient` will ever equal `data.recipient`.

`data.recipient` equals `ARDOR-64L4-C4H9-Z9PU-9YKDT`

However, `transaction.recipient` equals `12686039152117651770352583052021228896653772998482022211948610002430512793010043372255281183988421160450227631016638876582933743874739812608892576232835541561180017189881475915550182092483428449468438018195304514943626747005224233901130236596723251118266281272406204049816147466250586545776300564249483796886483621200942491492199171631589798205980673`

This doesn't really surprise me, because I don't see how an ARDOR address gets generated from `transaction.recipient = String(helpers.byteArrayToBigInteger(byteArray, pos));`

Which looks like it should return a number, not a string. What am I missing

**Tags:** ardor


---

## 1 answers

### Answer by username_1 on 2018-10-06. Score: 2 | Accepted answer

You need to either convert data.recipient from RS format to numeric format or convert transaction.recipient from numeric format to RS format using NRS.convertNumericToRSAccountFormat(id)

> **Comments:**
> **username_0**: So transaction.recipient should be the numeric format of the recipient addresses?  
> **username_1**: Right, you can convert the public key to numeric account then convert it to RS format using NRS.convertNumericToRSAccountFormat(id)  
> **username_0**: I found my error.  My `byteArrayToBigInteger` function was incorrect.  Your answer helped me though, as I new what outcome I should expect with the numeric address.  Thank you!  

---

