W3C home > Mailing lists > Public > public-interledger@w3.org > April 2017

ASN.1 OER encoding for InterledgerPaymentPacket

From: David Fuelling <dfuelling@sappenin.com>
Date: Mon, 24 Apr 2017 15:29:59 +0000
Message-ID: <CABq1t6707yiD6sxiZ4Q5ab6ni0yzNdSkamhVjshguNY=SeyaGw@mail.gmail.com>
To: Interledger Community Group <public-interledger@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 24 April 2017 15:30:45 UTC