Page MenuHomePhabricator

[Cashtab] Update tx history to parse eCashChat authentication txs
ClosedPublic

Authored by emack on Aug 11 2024, 12:19.

Details

Summary

v1.5.2 of eCashChat will utilize onchain authentication transactions to verify ownership of addresses on mobile devices. This is done by passing a BIP21 querystring to Cashtab.com on mobile devices with a pre-populated dust send tx.

It's done this way because the use of signature verification is very laborious and Cashtab Extensions is not available on Android/iOS.

This diff updates Cashtab to recognize these transactions.

image.png (164×621 px, 19 KB)

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
parseAuthTx
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29932
Build 59399: Build Diffcashtab-tests · ecash-lib-tests
Build 59398: arc lint + arc unit

Event Timeline

emack edited the summary of this revision. (Show Details)
emack edited the summary of this revision. (Show Details)
emack published this revision for review.Aug 11 2024, 12:26
bytesofman added inline comments.
cashtab/src/chronik/index.js
204

this file isn't being changed at all by this diff...can you back out these formatting changes?

cashtab/src/components/Home/Tx/index.js
450

would be nice to include a brief spec of what such a tx is expected to look like in the parsing

is there no case for "invalid auth tx" ? Just any app tx with the prefix and then anything else is an auth tx? if so, worth mentioning in a comment.

Do you have a spec for the many types of ecash chat txs now possible somewhere? could add this to the monorepo doc? or mb a dev section on ecash chat?

This revision now requires changes to proceed.Aug 11 2024, 14:06
emack marked 2 inline comments as done.

Updated comments

cashtab/src/components/Home/Tx/index.js
450

Added comment to indicate authentication tx opreturns are basically authPrefixHex + a random string. A websocket listens for a tx with an opreturn that contains that random string and if so, authenticates the sending address.

Latest spec is available here: https://github.com/ethanmackie/ecash-chat/blob/uat/README.md

I will update the monorepo prefix doc separately.

Going forward, diffs like this should also add support to the herald. Otherwise we will keep getting more divergence.

...potentially the explorer as well.

This revision is now accepted and ready to land.Aug 12 2024, 03:33
cashtab/src/chronik/index.js
279 ↗(On Diff #49141)

what is your output for prettier -v ?

is this change coming from your IDE?

emack marked an inline comment as done.Aug 12 2024, 03:59
emack added inline comments.
cashtab/src/chronik/index.js
279 ↗(On Diff #49141)

3.2.5

this change is coming from arc lint

emack marked an inline comment as done.

version bump