Is there a way to use Stellar, combining multiple transactions and their memo fields, to store simple data like a binary image or a qrcode?

1 Answer 1


Stellar allows you to store data on the blockchain in two ways:

  1. Attach data to an account: you can attach key/value pairs to an account. Each key/value pair you attach to an account raises the minimum account balance by 0.5 XLM. This is in place to disincentivize people from storing large amounts of data on the blockchain.

  2. Attach data to a transaction: you can include data in a transaction via the memo field. There are four types of memos you can include:

a) MEMO_TEXT : A string encoded using either ASCII or UTF-8, up to 28-bytes long.
b) MEMO_ID : A 64 bit unsigned integer.
c) MEMO_HASH : A 32 byte hash.
d) MEMO_RETURN : A 32 byte hash intended to be interpreted as the hash of the transaction the sender is refunding.

The easiest way to attach a binary image or a qr code to a transaction would be to store it in a distributed database such as IPFS and take this hash and attach it to the transaction via a MEMO_HASH.

  • Also, here is a similar question to checkout: stellar.stackexchange.com/questions/282/…
    – Rob
    Mar 11, 2018 at 17:20
  • Thanks for your answer ! I'm exploring the possibility to use 2 custom assets and a pixel-grid creator to build QR/Aztec codes on Stellar and store them with IPFS (experimental derivative of Colorglyph.io concept).
    – Dr.D
    Mar 13, 2018 at 13:51
  • @Rob How much data can be attached to each Key in the Account? I don't see this documented anywhere...
    – Symmetric
    Apr 18, 2018 at 16:49
  • What do you mean by how much data? Do you mean how big can a key be for these key/value pairs?
    – Rob
    Apr 18, 2018 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.