This gist outlines how to encode an InterledgerProtocolPayment in binary using ASN.1 OER encoding according to the rules defined in the document Overview of OER, published by OSS Nokalva. This gist outlines two different examples of InterledgerProtocolPayment encoding.
For the formal ASN.1 OER definitions for all Interledger packets, please reference the Interledger ASN1 RFCs.
Example 1 is an InterledgerProtocolPayment with the following data, represented as a JSON payload for readability:
{
"type": 1,