Skip to content

Commit

Permalink
specify rigorous structure for the Memo field (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckeshava authored Sep 16, 2024
1 parent 39d8277 commit 108bcf6
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions shared/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,18 @@ components:
Memos:
type: array
items:
type: object
description: Additional arbitrary information used to identify this transaction.
$ref: '#/components/schemas/Memo'
description: The Memos field includes arbitrary messaging data with the transaction. It is presented as an array of objects. Each object has only one field, Memo, which in turn contains another object. The Memos field is limited to no more than 1 KB in size (when serialized in binary format). The MemoType and MemoFormat fields should only consist of the following characters - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=%
example:
TransactionType: Payment
Account: rMmTCjGFRWPz8S2zAUUoNVSQHxtRQD4eCx
Destination: r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV
Memos:
- Memo:
MemoType: 687474703a2f2f6578616d706c652e636f6d2f6d656d6f2f67656e65726963
MemoData: 72656e74
Amount: '1'

NetworkID:
type: integer
format: uint32
Expand All @@ -169,6 +179,19 @@ components:
type: string
description: The signature that verifies this transaction as originating from the account it says it is from.

Memo:
type: object
properties:
MemoData:
type: string
description: Arbitrary hex value, conventionally containing the content of the memo.
MemoFormat:
type: string
description: Hex value representing characters allowed in URLs. Conventionally containing information on how the memo is encoded, for example as a [MIME type](https://www.iana.org/assignments/media-types/media-types.xhtml).
MemoType:
type: string
description: Hex value representing characters allowed in URLs. Conventionally, a unique relation (according to [RFC 5988](https://datatracker.ietf.org/doc/html/rfc5988#section-4)) that defines the format of this memo.

CurrencyAmount:
$id: CurrencyAmount
oneOf:
Expand Down

0 comments on commit 108bcf6

Please sign in to comment.