XRPL-Labs / Xaman-Issue-Tracker

Bugs, improvements, suggestions & release progress (Project boards)
https://xumm.app
14 stars 9 forks source link

[Improvement] Using XUMM backend to store off-ledger metadata for associating TXs with xApps #353

Open flyfoxuk opened 3 years ago

flyfoxuk commented 3 years ago

Suggestion: instead of (or complementary to) the existing ability to use memo data xumm/xapp to flag a transaction as belonging to a particular xApp and thus launching the xApp upon selecting it from the list.

Use the XUMM backend to store the same details off ledger, for privacy reasons, so that such transactions cannot be "linked" or otherwise investigated for comparison publicly. Use case: keeping tipbot tips private on ledger (no-one knows a particular transaction is a tipbot xApp transaction) but within the XUMM ecosystem, XUMM does know it belongs to the tipbot xApp and can logo up the entry in the Events tab with the appropriate xApp marker and open the xApp with backend-stored metadata for that transaction when user clicks the entry.

Benefits:

Example:

        "txjson": {
            "TransactionType": "Payment",
            "Destination": "rXXXXXXXXXXX",
            "Account": "rAAAAAAAAAAA"
        },
        custom_meta: {
            "instruction": "This is a test payment",
            "blob": {
                ...
            },
            "backend_metadata": {
                // this data would be stored in XUMM backend specific to this request
                // for use when launching the xApp from the Events tab list
                "my_xapp_ref": "12345",
                "my_xapp_param": "doThisAndThat",
            }
        }
WietseWind commented 3 years ago

Great idea (!)

WietseWind commented 3 years ago

Hey @flyfoxuk ,

I just read your issue again and I think I missed something: this is already possible. This is where blob can be used for. That stays private, and can be retrieved by simply fetching the payload. It does exactly what your example describes. See the docs:

image

Does this help? Can I close this issue?

flyfoxuk commented 3 years ago

Hi @WietseWind - yes, I thought I saw that somewhere too! However, would the labelling of the event in the Events list be possible using this private json blob (as opposed to the xumm/xapp Memo data which does the labelling currently)? For tip use case: no public memo, private blob data, but labelled in the Events list with tipbot logo and custom string eg. "Tip Received from xyz". Perhaps something like:

  custom_meta: {
    blob: {
      events_list_description: "Tip Received from xyz",  // if specified, used in Events list as explainer string with xApp logo
      ...other private data here available on xApp opening
    }
  }
}

Tapping such an Event item would then launch the xApp for such items, rather than the "Transaction Details" screen.

EventsItemIdea

flyfoxuk commented 3 years ago

From https://xumm.readme.io/docs/what-are-xapps

Even more exciting... xApps can be triggered as well using:

By attaching an xApp memo to an XRPL TX (so the Event list will show there's an xApp attached to the TX)

In addition to the memo functionality to identify the TX as an xApp tx, use the custom_meta to permit the same?

WietseWind commented 3 years ago

Makes sense. Added, for pushed xApp events: https://xumm.app/api/v1/platform/xapp/event https://xumm.readme.io/reference/xapp-event

subtitle prop: image

image