Re: ASN.1 OER encoding for InterledgerPaymentPacket

Stefan will have to correct me if I'm wrong but my understanding is as
follows:

The InterledgerProtocolPayment is the "data" portion of the
InterledgerPacket and it is encoded as a length-prefixed octet string. In
the JS implementation the "InterledgerPacket" is referred to as the
"envelope" (see here
<https://github.com/interledgerjs/ilp-packet/blob/master/index.ts#L17-L30> --
the naming should be made more consistent). The envelope/generic packet
effectively puts a type and length prefix in front of whatever message
comes afterwards.

I think the answer to your open question is #2

On Mon, Apr 24, 2017 at 5:31 PM David Fuelling <dfuelling@sappenin.com>
wrote:

> 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
>
-- 

Evan Schwartz
Software Engineer
Managing Director of Ripple Luxembourg
<http:> <http:>

Received on Monday, 24 April 2017 20:47:48 UTC