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
00010966776006953D5567439E5E39F86A0D273BEED61967F60000000000000000000000If one submits a transaction to rippled without the padding, it gets padded on the left, like
000000000000000000000000010966776006953D5567439E5E39F86A0D273BEED61967F6
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.397The 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