interledgerjs / btp-packet

Packet parser for Bilateral Transfer Protocol
1 stars 3 forks source link

Don't wrap packet data in VarOctetString #10

Closed michielbdejong closed 7 years ago

michielbdejong commented 7 years ago

https://github.com/interledgerjs/clp-packet/blob/master/index.js#L101 should probably just write contents, not a VarOctetString containing it?

See also https://github.com/interledger/rfcs/issues/284#issuecomment-325711734 and https://github.com/interledger/rfcs/pull/291#discussion_r137996186

michielbdejong commented 7 years ago

Adding the length prefix is correct, because it's an ASN.1 Open Type. See https://www.itu.int/rec/T-REC-X.696-201408-S/en section 30:

screen shot 2017-09-12 at 08 44 07