Page MenuHomePhabricator

[standards] Collect eCash-specific variations to BIP21 in a spec
ClosedPublic

Authored by bytesofman on Dec 4 2023, 23:48.

Details

Summary

eCash has used BIP21 URI parameters with some obvious-ish but unspec'ed modifications (for example, using ecash address format, using units of XEC instead of BTC).

Codify these modifications. Add a new opreturn param.

Test Plan

Read and suggest improvements. Sanity check for opreturn spec, to be implemented in Cashtab.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Mengerian added inline comments.
doc/standards/bip21-ecash-additions.md
25 ↗(On Diff #43389)

Actually, for the case of a URI it should always have the "ecash:" in front, so that the other applications know what it is. This is intended to be something that can be included in web pages, or other places where it's not obvious that an eCash address might be expected.

The cashaddress format was actually designed with this in mind, that's why it uses the colon separator.

PiRK added inline comments.
doc/standards/bip21-ecash-additions.md
25 ↗(On Diff #43389)

I confirm that ElectrumABC requires a prefix for a payment URI, but there is some confusion around the fact that it is the BIP21 prefix or the cashaddr prefix..
ElectrumABC even accepts the following abomination: ecash:1NLcNpAaBBMekgBZk7NxwdxwtSUTfTV8Aq because in this context ecash: is a BIP21 prefix more than it is a cashaddr prefix.

And I have heard of issues with some software producing double prefixed addresses (bitcoincash:bitcoincash:....) because of an incorrect interpretation of the spec.

Maybe we should clarify that a single prefix is mandatory.
ecashurn = "ecash:" ecashaddress (without repeated prefix) [" ?" ecashparams ]

Specify requirement of ecash: prefixed cashaddress

bytesofman added inline comments.
doc/standards/bip21-ecash-additions.md
25 ↗(On Diff #43389)

At the spec level, I think best to just specify ecash: prefixed cash address. Some apps may choose to support weird variations like ecash:<legacy> -- but I don't think it's good practice for this to be generalized and expected everywhere.

Updated.

This revision is now accepted and ready to land.Dec 6 2023, 07:46