What is the standard InvoiceID for a Ripple Bitcoin bridge?

1

In Ripple, bridges often encode a Bitcoin address as an InvoiceID in a transaction. According to Services API wiki page, InvoiceID is represented as UInt256, so it should be padded. Which is the standard way of padding the InvoiceID?

For example, having an address in hex form - 00010966776006953D5567439E5E39F86A0D273BEED61967F6

  • According to this code, the address should be padded on the right, like 00010966776006953D5567439E5E39F86A0D273BEED61967F60000000000000000000000

  • If one submits a transaction to rippled without the padding, it gets padded on the left, like 000000000000000000000000010966776006953D5567439E5E39F86A0D273BEED61967F6

ThePiachu

Posted 2013-11-06T09:09:34.340

Reputation: 41 594

Question was closed 2019-07-17T21:15:30.907

Note that although the wiki (probably outdated) says that the InvoiceID is an encoded Bitcoin address, a more recent post by the an RL employee states that the InvoiceID is whatever the bridge provider sets it to. I.e. they can use whatever encoding or internal identifier they wish.

dchapes 2013-11-06T14:34:03.397

The standard implementation is available on github and this is what Bitstamp currently uses, but in principle a bridge can use any scheme they wish.

David Schwartz 2013-11-07T01:36:49.810

No answers