ASN.1 OER encoding for InterledgerPaymentPacket

Hey All,

Would anyone be able to assist in helping me understand how to properly
encode an InterledgerProtocolPayment
<https://github.com/interledger/rfcs/blob/master/asn1/InterledgerProtocol.asn>
using
ASN.1 OER encoding?

I've published a gist that I think is "mostly there", but am unclear how
this packet interacts with its parent definition found in InterledgerPacket
<https://github.com/interledger/rfcs/blob/master/asn1/GenericPacket.asn>.

Here's the gist:
https://gist.github.com/sappenin/100a475fc7175a164a949985b05fa696

My two questions are:

   1. Is InterledgerProtocolPayment simply the "data" portion of an
   InterledgerPacket (i.e., InterledgerProtocolPayment is encoded inside of an
   InterledgerPacket)?  If so, is this "data" encoded as a length-prefixed
   octet string?  Or as a Sequence?  Or, is there really just a single
   "thing" called InterledgerProtocolPayment, and InterledgerPacket is just a
   typing mechanism?  See the end of my gist in the "questions" section for
   some concrete examples of this (though perhaps neither is correct).

   2. Does the encoding put forward in my gist seem correct otherwise?

Thanks for any assistance!
David

Received on Monday, 24 April 2017 15:30:44 UTC