NUT-6: update contact info #117

Merged
gohumble merged 4 commits from nut6_contact into main 2024-06-18 10:11:14 +00:00
gohumble commented 2024-05-04 17:00:55 +00:00 (Migrated from github.com)

This PR updates the contact information structure.

The main change is in the representation of contact information, which is now a structured object instead of an array. This allows for a more explicit and readable representation of contact types and values.

This PR updates the contact information structure. The main change is in the representation of contact information, which is now a structured object instead of an array. This allows for a more explicit and readable representation of contact types and values.
callebtc commented 2024-05-04 17:02:29 +00:00 (Migrated from github.com)

LGTM, people have been complaining about this for a long time.

I would probably change client to code to support both until all mints change their models.

LGTM, people have been complaining about this for a long time. I would probably change client to code to support both until all mints change their models.
callebtc (Migrated from github.com) approved these changes 2024-05-04 17:02:37 +00:00
thesimplekid (Migrated from github.com) approved these changes 2024-05-04 17:04:09 +00:00
thesimplekid (Migrated from github.com) left a comment

ACK 6de3a61

Much prefer the object to the array

ACK [6de3a61](https://github.com/cashubtc/nuts/pull/117/commits/6de3a61f93eaf762142c0957a89596252a11218a) Much prefer the object to the array
Egge21M commented 2024-05-04 17:11:29 +00:00 (Migrated from github.com)

Actually I don't see any benefit to this, but I don't have a strong opinion on it either

Actually I don't see any benefit to this, but I don't have a strong opinion on it either
callebtc commented 2024-05-04 18:17:20 +00:00 (Migrated from github.com)

Actually I don't see any benefit to this

We've had many examples in the spec that started off as an array and turned into an object later because arrays suck. I hope we won't add any arrays anymore just to turn them into objects half a year later.

> Actually I don't see any benefit to this We've had many examples in the spec that started off as an array and turned into an object later because arrays suck. I hope we won't add any arrays anymore just to turn them into objects half a year later.
callebtc commented 2024-05-06 07:56:57 +00:00 (Migrated from github.com)

What about a backwards compatible update? We could add the new contact field as a new key, e.g. contact_info, such that we don't break existing implementations with it.

What about a backwards compatible update? We could add the new contact field as a new key, e.g. `contact_info`, such that we don't break existing implementations with it.
gohumble commented 2024-05-06 10:49:29 +00:00 (Migrated from github.com)

done . Added the contact_info field for backwards compatibility.
I have also added a deprecation hint to the old contact field.

done ✅. Added the `contact_info` field for backwards compatibility. I have also added a deprecation hint to the old `contact` field.
callebtc commented 2024-05-10 16:36:49 +00:00 (Migrated from github.com)

ACK cd9d6ad

ACK [cd9d6ad](https://github.com/cashubtc/nuts/pull/117/commits/cd9d6ad362eb69bfd81326f553764c52acd1ff7b)
callebtc commented 2024-05-10 16:37:13 +00:00 (Migrated from github.com)

I would suggest we implement this in mints and clients before we merge the PR.

I would suggest we implement this in mints and clients before we merge the PR.
thesimplekid commented 2024-05-11 21:02:37 +00:00 (Migrated from github.com)
ACK cd9d6ad362eb69bfd81326f553764c52acd1ff7b Implemented in CDK in https://github.com/cashubtc/cdk/pull/117
thesimplekid (Migrated from github.com) reviewed 2024-06-06 10:25:57 +00:00
@ -30,3 +28,1 @@
["nostr" ,"npub..."]
],
"motd": "Message to display to users.",
{
thesimplekid (Migrated from github.com) commented 2024-06-06 10:25:57 +00:00

Following up on the dev call. I would prefer to remove the old contact and make this a breaking change to avoid having to support the old style going forward. From the call it seemed like many wallets don't currently parse this so it wouldn't break current implementations and would be a simple upgrade to support it.

Following up on the dev call. I would prefer to remove the old `contact` and make this a breaking change to avoid having to support the old style going forward. From the call it seemed like many wallets don't currently parse this so it wouldn't break current implementations and would be a simple upgrade to support it.
callebtc commented 2024-06-18 10:11:08 +00:00 (Migrated from github.com)

Implemented in CDK in cashubtc/cdk#117

Updated, with new field now called "contact" and thus being a breaking change. @thesimplekid we renamed the type field to method now, which fits a bit better.

> Implemented in CDK in [cashubtc/cdk#117](https://github.com/cashubtc/cdk/pull/117) Updated, with new field now called "contact" and thus being a breaking change. @thesimplekid we renamed the `type` field to `method` now, which fits a bit better.
Sign in to join this conversation.
No description provided.