From 2ba0ab8c18affdd181296cd127535a7c6c73c08b Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Thu, 24 Feb 2022 14:57:09 +0100 Subject: [PATCH 01/16] Add new HIP: Standard for TXT records --- HIP-xxxx.md | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 HIP-xxxx.md diff --git a/HIP-xxxx.md b/HIP-xxxx.md new file mode 100644 index 0000000..9cf97b1 --- /dev/null +++ b/HIP-xxxx.md @@ -0,0 +1,163 @@ +# HIP-xxxx : Standard for TXT records + +``` +Number: HIP-xxxx +Title: Standard for TXT records +Type: Standards +Status: Draft +Authors: 0xStefan +Created: 2022-02-22 +``` + +## Abstract + +A proposal for TXT record standards to provide on-chain data for a domain. + +## Motivation + +#### Domain Parking + +There's currently no way to know if a domain is for sale by the owner or not. +A domain seller has no reliable way to provide that information. + +#### Identity / Web3 Profile + +Websites using Sign in with Handshake can use and render the TXT record data, e.g. as profile information. The domain owner is still in control of the data. + +## TXT Standards Definition + +For the above to work we need standards so any website can properly render the TXT records. The records should be flexible, short and easy to understand. Since it's impossible to validate the data via HSD. Therefore TXT records should be provided mostly without any prefix like "mailto:", "tel:" or "https://www.twitter.com/". + +The goal is to let the app or website decide how to render the information. It also decreases the data saved on-chain. + +#### Domain Parking + +The parking TXT entry indicates that the domain is for sale. + +``` +TXT parking=[String] +``` + +#### Contact or Profile Information + +``` +TXT email=[Email] +TXT phone=[Tel] +``` + +``` +TXT discord=[String] +TXT facebook=[String] +TXT github=[String] +TXT instagram=[String] +TXT linkedin=[String] +TXT telegram=[String] +TXT tiktok=[String] +TXT twitter=[String] +TXT weixin=[String] +TXT whatsapp=[Tel] +TXT youtube=[String] +``` + +#### Avatar + +``` +TXT avatar=[ URL | skylink | ipfsLink ] +``` + +#### Domain Caption + +A caption is especially useful for identities or as a sales pitch. It can also be used to add more context to a domain (e.g. NFT's). + +``` +TXT caption=[String] +``` + +#### Payment / Wallet Alias + +Although [HIP-0002](https://github.com/handshake-org/HIPs/blob/master/HIP-0002.md) is a much better approach, TXT entries could also be used to provide static wallet information. + +``` +TXT wallet=[Chain]:[Address] +``` + +## Valid TXT Standard Examples + +#### Parking Examples + +``` +TXT parking +TXT parking=10000 HNS +TXT parking=USD 1000 +TXT parking=USD 999.99 +TXT parking=999,99 EUR +TXT parking=$199 (Old price $329) +TXT parking=Please send an offer via email +``` + +Every string is valid, but usually a price is provided. Data providers should be aware that prices could be devided by a dot or a comma and can have decimal points. + +No matter what data is provided, as long as the parking TXT entry is added, the domain will be seen as "For Sale". It's up to the site owner or app to make sense of the data. Remember: It's impossible to validate the data via HSD. + +#### Contact Information Examples + +``` +TXT email=hello@handshake.org +TXT phone=+1(310)3015800 +``` + +The phone number should be prefixed with a plus sign and country code. Hyphens, dots and empty spaces are allowed. + +``` +TXT discord=handshake#1234 +TXT facebook=handshake +TXT github=handshake +TXT instagram=handshake +TXT linkedin=handshake +TXT telegram=handshake +TXT tiktok=handshake +TXT twitter=handshake +TXT weixin=DDvRyffEabcdefGh123e +TXT whatsapp=907123987234 +TXT youtube=handshake +``` + +For most social media profiles it's enough to provide the handle. WeChat (weixin) needs a chat ID. WhatsApp links will only work without a prefix, therefore it's best to omit them. We can always add or remove networks if needed. + +#### Avatar Examples + +``` +TXT avatar=https://handshake.org/images/landing/logo-dark.svg +TXT avatar=sia:CABAB_1Dt0FJsxqsu_J4TodNCbCGvtFf1Uys_3EgzOlTcg +TXT avatar=ipfs:bafybeidd2gyhagleh47qeg77xqndy2qy3yzn4vkxmk775bg2t5lpuy7pcu +``` + +#### Domain Caption Example + +``` +TXT caption=The Wheel of Fortune represents the end of one cycle and the beginning of the next +``` + +#### Payment / Wallet Alias Examples + +``` +TXT wallet=hns:hs1qnkr3cwf9ldp7qpq2csuuyxf0znj0lwhmawhlal +TXT wallet=btc:12dRagNcdxK39288NjcDV4GX7rMsKCGn6B +TXT wallet=eth:0x28346f1ec065eea239152213373bb58b1c9fc93b +``` + +## Security Concerns + +There is a slight chance of Cross Site Scripting (XSS). Therefore a site owner should always verify the provided data before adding it to the DOM. + +#### Example + +`Execute JavaScript` + +## References + +[Linking Phone numbers in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#linking_to_telephone_numbers) + +[Bob Wallet Parking on GitHub](https://github.com/kyokan/bob-wallet/issues/183) + +[Profile Information on Niami](https://niami/domain/0xstefan) From 18bed187abbbcf2846f4fea78df1f7f8f1348608 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Thu, 10 Mar 2022 16:31:52 +0100 Subject: [PATCH 02/16] Updated proposal for Domain Listings via TXT records This is my updated proposal for the TXT Record Naming Standard for Domain Listings. I will create one more for Identity and one for NFT's. This will make it easier for discussions and to maintain the proposals. --- HIP-xxxx.md | 142 +++++++++++----------------------------------------- 1 file changed, 30 insertions(+), 112 deletions(-) diff --git a/HIP-xxxx.md b/HIP-xxxx.md index 9cf97b1..999e408 100644 --- a/HIP-xxxx.md +++ b/HIP-xxxx.md @@ -1,8 +1,8 @@ -# HIP-xxxx : Standard for TXT records +# HIP-xxxx : TXT Record Naming Standard for Domain Listings ``` Number: HIP-xxxx -Title: Standard for TXT records +Title: TXT Record Naming Standard for Domain Listings Type: Standards Status: Draft Authors: 0xStefan @@ -11,153 +11,71 @@ Created: 2022-02-22 ## Abstract -A proposal for TXT record standards to provide on-chain data for a domain. +A proposal to create a standard for the labels of string attributes in TXT records for domain listings — following the [RFC 1464](https://datatracker.ietf.org/doc/html/rfc1464) standard. ## Motivation -#### Domain Parking +If a domain is not listet on an open marketplace like Namebase or Shakedex, it's hard to know if a domain is for sale by the owner or not. Furthermore a domain seller has no reliable way to provide that information. -There's currently no way to know if a domain is for sale by the owner or not. -A domain seller has no reliable way to provide that information. +## TXT Record Standard: Domain Listing -#### Identity / Web3 Profile +For the above to work we need standards so any website or app can properly render the TXT records. The records should be flexible, short and easy to understand. It is important to note, that it's impossible to validate the data via HSD. Therefore TXT records must be validated by the site or app that is rendering the TXT records. -Websites using Sign in with Handshake can use and render the TXT record data, e.g. as profile information. The domain owner is still in control of the data. +The general syntax for domain listings is: -## TXT Standards Definition +**TXT** `listing =` -For the above to work we need standards so any website can properly render the TXT records. The records should be flexible, short and easy to understand. Since it's impossible to validate the data via HSD. Therefore TXT records should be provided mostly without any prefix like "mailto:", "tel:" or "https://www.twitter.com/". +There are currently two supported attributes: **price** and **url**. -The goal is to let the app or website decide how to render the information. It also decreases the data saved on-chain. +### (1) Listing Attribute: Price (mandatory) -#### Domain Parking - -The parking TXT entry indicates that the domain is for sale. - -``` -TXT parking=[String] -``` - -#### Contact or Profile Information - -``` -TXT email=[Email] -TXT phone=[Tel] -``` - -``` -TXT discord=[String] -TXT facebook=[String] -TXT github=[String] -TXT instagram=[String] -TXT linkedin=[String] -TXT telegram=[String] -TXT tiktok=[String] -TXT twitter=[String] -TXT weixin=[String] -TXT whatsapp=[Tel] -TXT youtube=[String] -``` - -#### Avatar - -``` -TXT avatar=[ URL | skylink | ipfsLink ] -``` - -#### Domain Caption - -A caption is especially useful for identities or as a sales pitch. It can also be used to add more context to a domain (e.g. NFT's). +The listing price attribute is mandatory to create a domain listing. It enables a domain owner to provide a listing price for the domain. The expected value is the unit as a string, followed by the amount as a number. If the number contains decimals, a dot must be used as a seperator. ``` -TXT caption=[String] +TXT listing price= ``` -#### Payment / Wallet Alias - -Although [HIP-0002](https://github.com/handshake-org/HIPs/blob/master/HIP-0002.md) is a much better approach, TXT entries could also be used to provide static wallet information. +#### Valid Listing Price Examples ``` -TXT wallet=[Chain]:[Address] +TXT listing price=HNS 1000 +TXT listing price=USD 50 +TXT listing price=EUR 999.99 +TXT listing price=BTC 0.000224 ``` -## Valid TXT Standard Examples - -#### Parking Examples +The value can also be 0 or null: ``` -TXT parking -TXT parking=10000 HNS -TXT parking=USD 1000 -TXT parking=USD 999.99 -TXT parking=999,99 EUR -TXT parking=$199 (Old price $329) -TXT parking=Please send an offer via email +TXT listing price=0 +TXT listing price= ``` -Every string is valid, but usually a price is provided. Data providers should be aware that prices could be devided by a dot or a comma and can have decimal points. +Which means the domain is for sale and offers are accepted. -No matter what data is provided, as long as the parking TXT entry is added, the domain will be seen as "For Sale". It's up to the site owner or app to make sense of the data. Remember: It's impossible to validate the data via HSD. +### (2) Listing Attribute: URL (optional) -#### Contact Information Examples +The listing url attribute is optional. It enables a domain owner to provide a url, where visitors can find more information about the domain. It can also be used to point visitors to a parking website or a private marketplace. The expected value is a fully qualified URL that must start with http:// or https://. ``` -TXT email=hello@handshake.org -TXT phone=+1(310)3015800 +TXT listing url= ``` -The phone number should be prefixed with a plus sign and country code. Hyphens, dots and empty spaces are allowed. +#### Valid Listing Url Examples ``` -TXT discord=handshake#1234 -TXT facebook=handshake -TXT github=handshake -TXT instagram=handshake -TXT linkedin=handshake -TXT telegram=handshake -TXT tiktok=handshake -TXT twitter=handshake -TXT weixin=DDvRyffEabcdefGh123e -TXT whatsapp=907123987234 -TXT youtube=handshake -``` - -For most social media profiles it's enough to provide the handle. WeChat (weixin) needs a chat ID. WhatsApp links will only work without a prefix, therefore it's best to omit them. We can always add or remove networks if needed. - -#### Avatar Examples - -``` -TXT avatar=https://handshake.org/images/landing/logo-dark.svg -TXT avatar=sia:CABAB_1Dt0FJsxqsu_J4TodNCbCGvtFf1Uys_3EgzOlTcg -TXT avatar=ipfs:bafybeidd2gyhagleh47qeg77xqndy2qy3yzn4vkxmk775bg2t5lpuy7pcu -``` - -#### Domain Caption Example - -``` -TXT caption=The Wheel of Fortune represents the end of one cycle and the beginning of the next -``` - -#### Payment / Wallet Alias Examples - -``` -TXT wallet=hns:hs1qnkr3cwf9ldp7qpq2csuuyxf0znj0lwhmawhlal -TXT wallet=btc:12dRagNcdxK39288NjcDV4GX7rMsKCGn6B -TXT wallet=eth:0x28346f1ec065eea239152213373bb58b1c9fc93b +TXT listing url=https://www.learnmore.com/about/my/domain +TXT listing url=https://learnmoreaboutmydomain/ ``` ## Security Concerns -There is a slight chance of Cross Site Scripting (XSS). Therefore a site owner should always verify the provided data before adding it to the DOM. +There is a slight chance of Cross Site Scripting (XSS). Therefore a site owner should always verify the provided URL data before adding it to the DOM. -#### Example +### Example `Execute JavaScript` ## References -[Linking Phone numbers in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#linking_to_telephone_numbers) - -[Bob Wallet Parking on GitHub](https://github.com/kyokan/bob-wallet/issues/183) - -[Profile Information on Niami](https://niami/domain/0xstefan) +[RFC 1464 Standards](<[https://niami/domain/0xstefan](https://datatracker.ietf.org/doc/html/rfc1464)>) From a54f11b4e5ce1e6795eeb4a7dbcb448929b54abf Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Fri, 11 Mar 2022 09:20:44 +0100 Subject: [PATCH 03/16] Create HIP: TXT Record Naming Standard for Profile Data --- HIP-xxx | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 HIP-xxx diff --git a/HIP-xxx b/HIP-xxx new file mode 100644 index 0000000..5acfee9 --- /dev/null +++ b/HIP-xxx @@ -0,0 +1,134 @@ +# HIP-xxx : TXT Record Naming Standard for Profile Data + +``` +Number: HIP-xxx +Title: TXT Record Naming Standard for Profile Data +Type: Standards +Status: Draft +Authors: 0xStefan +Created: 2022-02-22 +``` + +## Abstract + +A proposal to create a standard for the labels of string attributes in TXT records for profile data — following the [RFC 1464](https://datatracker.ietf.org/doc/html/rfc1464) standard. + +## Motivation + +Handshake domains can also be used as usernames. Domains are used to sign in to websites and to identify users in the Handshake ecosystem. Therefore it's useful to be able to attach profile information like an email, phone, avatar, social profiles or wallet information to a Domain. + +This Standard can also be used to provide contact information for domain listings according to [HIP-XXXX](https://github.com/handshake-org/HIPs/pull/46/files/18bed187abbbcf2846f4fea78df1f7f8f1348608?short_path=1d2937e#diff-1d2937eacaeeb0fe53fcad8e70f406714fb6359c5fef0f47b1aef97e1cdfcbed). + +## TXT Record Standard: Profile Data + +For the above to work we need standards so any website or app can properly render the TXT records. The records should be flexible, short and easy to understand. It is important to note, that it's impossible to validate the data via HSD. Therefore TXT records must be validated by the site owner or app that is rendering the TXT records. + +The general syntax for profile data is: + +**TXT** `profile =` + +There are currently five supported attributes: **email**, **phone**, **avatar**, **social** and **wallet**. All attributes are optional but at least one attribute needs to be present, for a Domain to count as a profile. + +### (1) Profile Attribute: Email + +The email attribute is optional. It enables a domain owner to provide an email for the domain. The expected value is an email address. + +``` +TXT profile email= +``` + +#### Valid Email Examples + +``` +TXT profile email=hello@niami.io +TXT profile email=hello@niami +``` + +### (2) Profile Attribute: Phone + +The phone attribute is optional. It enables a domain owner to provide a phone number for the domain. The expected value is a phone number. + +Ideally the phone number is provided with a plus icon (+) and the country code. + +``` +TXT profile phone= +``` + +#### Valid Phone Examples + +``` +TXT profile phone=+1(536)8886253 +TXT profile phone=+15368886253 +TXT profile phone=+1536-888-6253 +TXT profile phone=1536-888-6253 +``` + +### (3) Profile Attribute: Avatar + +The avatar attribute is optional. It enables a domain owner to provide an avatar for the domain. The expected value is a fully qualified URL that must start with http:// or https:// that points to an image file. + +Allowed image formats are: APNG, AVIF, GIF, JPEG, PNG, SVG, WebP according to [Common image file types](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types). + +``` +TXT profile avatar= +``` + +#### Valid Avatar Examples + +``` +TXT profile avatar=https://mywebsite.com/avatar.png +TXT profile avatar=https://siasky.net/MABn4I5M6yPT0aCjIMU2OjlTWmKysaqoCeP0gSJw5moVrg +``` + +### (4) Profile Attribute: Social + +The social attribute is optional. It enables a domain owner to provide social media usernames for the domain. The expected value is the name of the social platform followed by a username. + +The name of the social platform can be gathered by taking the hostname (e.g. www.twitter.com), then removing the www. and the TLD (.com). If the social platform is hosted on a handshake Domain, the handshake Domain is used as the name for the social platform. + +Site owners and apps using that data can decide which social platforms they want to support and how to display them. + +``` +TXT profile social= +``` + +#### Valid Social Username Examples + +``` +TXT profile social=twitter 0xstefan +TXT profile social=github 0xstefan +TXT profile social=discord 0xstefan#4697 +TXT profile social=hnschat 0xstefan +``` + +### (5) Profile Attribute: Wallet + +The wallet attribute is optional. It enables a domain owner to provide one or more wallet addresses for the domain. The expected value is the token followed by a wallet address. + +``` +TXT profile wallet= +``` + +#### Valid Wallet Examples + +``` +TXT profile wallet=HNS hs1qnkr3cwf9ldp7qpq2csuuyxf0znj0lwhmawhlal +TXT profile wallet=BTC 12dRagNcdxK39288NjcDV4GX7rMsKCGn6B +TXT profile wallet=ETH 0x28346f1ec065eea239152213373bb58b1c9fc93b +``` + +If more than one wallet with the same token is provided, site owners or apps can use a random one to provide their services. + +## Security Concerns + +There is a slight chance of Cross Site Scripting (XSS) when using URL's in attributes. Therefore a site owner should always verify the provided URL data before adding it to the DOM. + +### Example + +`Execute JavaScript` + +## References + +[RFC 1464 Standards](<[https://niami/domain/0xstefan](https://datatracker.ietf.org/doc/html/rfc1464)>) + +[Common image file types by mozilla](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types) From e62749fe6ac8fd0d1023bee1a9f66fc75e709f44 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Fri, 11 Mar 2022 09:21:07 +0100 Subject: [PATCH 04/16] Rename file --- HIP-xxx => HIP-xxx.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename HIP-xxx => HIP-xxx.md (100%) diff --git a/HIP-xxx b/HIP-xxx.md similarity index 100% rename from HIP-xxx rename to HIP-xxx.md From daf7d3d6fc3b9d747e63ccdd31bd12a97dac0071 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Fri, 11 Mar 2022 09:21:56 +0100 Subject: [PATCH 05/16] Fix link --- HIP-xxx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HIP-xxx.md b/HIP-xxx.md index 5acfee9..029cc6b 100644 --- a/HIP-xxx.md +++ b/HIP-xxx.md @@ -129,6 +129,6 @@ There is a slight chance of Cross Site Scripting (XSS) when using URL's in attri ## References -[RFC 1464 Standards](<[https://niami/domain/0xstefan](https://datatracker.ietf.org/doc/html/rfc1464)>) +[RFC 1464 Standards](https://datatracker.ietf.org/doc/html/rfc1464) [Common image file types by mozilla](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types) From 7d8e6adea20bd43e2517d62583e0e6a7236716b2 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Fri, 11 Mar 2022 09:29:45 +0100 Subject: [PATCH 06/16] Add anchor links to the attributes --- HIP-xxx.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HIP-xxx.md b/HIP-xxx.md index 029cc6b..5e1e623 100644 --- a/HIP-xxx.md +++ b/HIP-xxx.md @@ -27,9 +27,9 @@ The general syntax for profile data is: **TXT** `profile =` -There are currently five supported attributes: **email**, **phone**, **avatar**, **social** and **wallet**. All attributes are optional but at least one attribute needs to be present, for a Domain to count as a profile. +There are currently five supported attributes: **[email](#email)**, **[phone](#phone)**, **[avatar](#avatar)**, **[social](#social)** and **[wallet](#wallet)**. All attributes are optional but at least one attribute needs to be present, for a Domain to count as a profile. -### (1) Profile Attribute: Email +### (1) Profile Attribute: Email The email attribute is optional. It enables a domain owner to provide an email for the domain. The expected value is an email address. @@ -44,7 +44,7 @@ TXT profile email=hello@niami.io TXT profile email=hello@niami ``` -### (2) Profile Attribute: Phone +### (2) Profile Attribute: Phone The phone attribute is optional. It enables a domain owner to provide a phone number for the domain. The expected value is a phone number. @@ -63,7 +63,7 @@ TXT profile phone=+1536-888-6253 TXT profile phone=1536-888-6253 ``` -### (3) Profile Attribute: Avatar +### (3) Profile Attribute: Avatar The avatar attribute is optional. It enables a domain owner to provide an avatar for the domain. The expected value is a fully qualified URL that must start with http:// or https:// that points to an image file. @@ -80,7 +80,7 @@ TXT profile avatar=https://mywebsite.com/avatar.png TXT profile avatar=https://siasky.net/MABn4I5M6yPT0aCjIMU2OjlTWmKysaqoCeP0gSJw5moVrg ``` -### (4) Profile Attribute: Social +### (4) Profile Attribute: Social The social attribute is optional. It enables a domain owner to provide social media usernames for the domain. The expected value is the name of the social platform followed by a username. @@ -101,7 +101,7 @@ TXT profile social=discord 0xstefan#4697 TXT profile social=hnschat 0xstefan ``` -### (5) Profile Attribute: Wallet +### (5) Profile Attribute: Wallet The wallet attribute is optional. It enables a domain owner to provide one or more wallet addresses for the domain. The expected value is the token followed by a wallet address. From 74acfd520b4b0b3ba1549ad7e21498472df19da8 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Fri, 11 Mar 2022 09:35:49 +0100 Subject: [PATCH 07/16] Update HIP-xxxx.md --- HIP-xxxx.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/HIP-xxxx.md b/HIP-xxxx.md index 999e408..28a205a 100644 --- a/HIP-xxxx.md +++ b/HIP-xxxx.md @@ -25,9 +25,9 @@ The general syntax for domain listings is: **TXT** `listing =` -There are currently two supported attributes: **price** and **url**. +There are currently two supported attributes: **[price](#price)** and **[url](#url)**. -### (1) Listing Attribute: Price (mandatory) +### (1) Listing Attribute: Price (mandatory) The listing price attribute is mandatory to create a domain listing. It enables a domain owner to provide a listing price for the domain. The expected value is the unit as a string, followed by the amount as a number. If the number contains decimals, a dot must be used as a seperator. @@ -53,7 +53,7 @@ TXT listing price= Which means the domain is for sale and offers are accepted. -### (2) Listing Attribute: URL (optional) +### (2) Listing Attribute: URL (optional) The listing url attribute is optional. It enables a domain owner to provide a url, where visitors can find more information about the domain. It can also be used to point visitors to a parking website or a private marketplace. The expected value is a fully qualified URL that must start with http:// or https://. From 9a8ac0a232eedc6ce606460a1030f1e7a245b38f Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Fri, 11 Mar 2022 09:36:56 +0100 Subject: [PATCH 08/16] Fix reference --- HIP-xxxx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HIP-xxxx.md b/HIP-xxxx.md index 28a205a..bb612bf 100644 --- a/HIP-xxxx.md +++ b/HIP-xxxx.md @@ -78,4 +78,4 @@ There is a slight chance of Cross Site Scripting (XSS). Therefore a site owner s ## References -[RFC 1464 Standards](<[https://niami/domain/0xstefan](https://datatracker.ietf.org/doc/html/rfc1464)>) +[RFC 1464 Standards](https://datatracker.ietf.org/doc/html/rfc1464) From 0bb89d8d18cb86d0a7e98c3efd4b41d8376e8adf Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Mon, 14 Mar 2022 20:37:41 +0100 Subject: [PATCH 09/16] Fix typo Co-authored-by: Sirawit Thaya <25237131+Noxturnix@users.noreply.github.com> --- HIP-xxxx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HIP-xxxx.md b/HIP-xxxx.md index bb612bf..901c076 100644 --- a/HIP-xxxx.md +++ b/HIP-xxxx.md @@ -15,7 +15,7 @@ A proposal to create a standard for the labels of string attributes in TXT recor ## Motivation -If a domain is not listet on an open marketplace like Namebase or Shakedex, it's hard to know if a domain is for sale by the owner or not. Furthermore a domain seller has no reliable way to provide that information. +If a domain is not listed on an open marketplace like Namebase or Shakedex, it's hard to know if a domain is for sale by the owner or not. Furthermore a domain seller has no reliable way to provide that information. ## TXT Record Standard: Domain Listing From 47240e0734cce04c364e3a0e60fd54a72ba3cc7d Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Fri, 25 Mar 2022 15:33:13 +0100 Subject: [PATCH 10/16] Remove wallet standard It just doesn't make sense. TL;DR Wallet TXT records are easier for the everyday user, but much harder for devs to implement. HIP-002 is easier for devs to implement but harder to set up for everyday users. See discussion here: https://discord.com/channels/822591034202521641/822591754477371443/956843184376401930 --- HIP-xxx.md | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/HIP-xxx.md b/HIP-xxx.md index 5e1e623..0285d44 100644 --- a/HIP-xxx.md +++ b/HIP-xxx.md @@ -101,24 +101,6 @@ TXT profile social=discord 0xstefan#4697 TXT profile social=hnschat 0xstefan ``` -### (5) Profile Attribute: Wallet - -The wallet attribute is optional. It enables a domain owner to provide one or more wallet addresses for the domain. The expected value is the token followed by a wallet address. - -``` -TXT profile wallet= -``` - -#### Valid Wallet Examples - -``` -TXT profile wallet=HNS hs1qnkr3cwf9ldp7qpq2csuuyxf0znj0lwhmawhlal -TXT profile wallet=BTC 12dRagNcdxK39288NjcDV4GX7rMsKCGn6B -TXT profile wallet=ETH 0x28346f1ec065eea239152213373bb58b1c9fc93b -``` - -If more than one wallet with the same token is provided, site owners or apps can use a random one to provide their services. - ## Security Concerns There is a slight chance of Cross Site Scripting (XSS) when using URL's in attributes. Therefore a site owner should always verify the provided URL data before adding it to the DOM. From 78f59bb205d00e3054a95a2137a9932a1cd42852 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Fri, 25 Mar 2022 15:34:15 +0100 Subject: [PATCH 11/16] Remove wallet references --- HIP-xxx.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HIP-xxx.md b/HIP-xxx.md index 0285d44..af67c13 100644 --- a/HIP-xxx.md +++ b/HIP-xxx.md @@ -15,7 +15,7 @@ A proposal to create a standard for the labels of string attributes in TXT recor ## Motivation -Handshake domains can also be used as usernames. Domains are used to sign in to websites and to identify users in the Handshake ecosystem. Therefore it's useful to be able to attach profile information like an email, phone, avatar, social profiles or wallet information to a Domain. +Handshake domains can also be used as usernames. Domains are used to sign in to websites and to identify users in the Handshake ecosystem. Therefore it's useful to be able to attach profile information like an email, phone, avatar or social profiles information to a Domain. This Standard can also be used to provide contact information for domain listings according to [HIP-XXXX](https://github.com/handshake-org/HIPs/pull/46/files/18bed187abbbcf2846f4fea78df1f7f8f1348608?short_path=1d2937e#diff-1d2937eacaeeb0fe53fcad8e70f406714fb6359c5fef0f47b1aef97e1cdfcbed). @@ -27,7 +27,7 @@ The general syntax for profile data is: **TXT** `profile =` -There are currently five supported attributes: **[email](#email)**, **[phone](#phone)**, **[avatar](#avatar)**, **[social](#social)** and **[wallet](#wallet)**. All attributes are optional but at least one attribute needs to be present, for a Domain to count as a profile. +There are currently five supported attributes: **[email](#email)**, **[phone](#phone)**, **[avatar](#avatar)** and **[social](#social)**. All attributes are optional but at least one attribute needs to be present, for a Domain to count as a profile. ### (1) Profile Attribute: Email From 16ed2d21b8465f0254bc36a9e46e40246c88d0f8 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Tue, 31 May 2022 09:22:35 +0200 Subject: [PATCH 12/16] Update and rename HIP-xxxx.md to HIP-0010.md - HIP number added - New title to better distinguish HIP-10 and HIP-13 - Added optional symbol => for minimum price offer --- HIP-xxxx.md => HIP-0010.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) rename HIP-xxxx.md => HIP-0010.md (85%) diff --git a/HIP-xxxx.md b/HIP-0010.md similarity index 85% rename from HIP-xxxx.md rename to HIP-0010.md index 901c076..b4326e3 100644 --- a/HIP-xxxx.md +++ b/HIP-0010.md @@ -1,8 +1,8 @@ -# HIP-xxxx : TXT Record Naming Standard for Domain Listings +# HIP-0010 : Standard for Domain Listings via TXT Records ``` -Number: HIP-xxxx -Title: TXT Record Naming Standard for Domain Listings +Number: HIP-0010 +Title: Standard for Domain Listings via TXT Records Type: Standards Status: Draft Authors: 0xStefan @@ -19,7 +19,7 @@ If a domain is not listed on an open marketplace like Namebase or Shakedex, it's ## TXT Record Standard: Domain Listing -For the above to work we need standards so any website or app can properly render the TXT records. The records should be flexible, short and easy to understand. It is important to note, that it's impossible to validate the data via HSD. Therefore TXT records must be validated by the site or app that is rendering the TXT records. +For the above to work we need standards so any website or app can properly render the TXT records. The records should be flexible, short and easy to understand. It's important to note, that all values should be checked by the application before serving them to the user. The general syntax for domain listings is: @@ -44,6 +44,13 @@ TXT listing price=EUR 999.99 TXT listing price=BTC 0.000224 ``` +The value can be prefixed with a greater-than symbol (>) to indicate it's a minimum price offer. + +``` +TXT listing price=>HNS 1000 +TXT listing price=>USD 50 +``` + The value can also be 0 or null: ``` From cc8307495b8eeb5c8caf5d71e7023a5adc30111d Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Tue, 31 May 2022 09:27:30 +0200 Subject: [PATCH 13/16] Update and rename HIP-xxx.md to HIP-0013.md - New title to better distinguish between HIP10 and HIP13 - Add HIP number --- HIP-xxx.md => HIP-0013.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename HIP-xxx.md => HIP-0013.md (87%) diff --git a/HIP-xxx.md b/HIP-0013.md similarity index 87% rename from HIP-xxx.md rename to HIP-0013.md index af67c13..3019b13 100644 --- a/HIP-xxx.md +++ b/HIP-0013.md @@ -1,8 +1,8 @@ -# HIP-xxx : TXT Record Naming Standard for Profile Data +# HIP-0013 : Standard for Profile Data via TXT Records ``` -Number: HIP-xxx -Title: TXT Record Naming Standard for Profile Data +Number: HIP-0013 +Title: Standard for Profile Data via TXT Records Type: Standards Status: Draft Authors: 0xStefan @@ -17,11 +17,11 @@ A proposal to create a standard for the labels of string attributes in TXT recor Handshake domains can also be used as usernames. Domains are used to sign in to websites and to identify users in the Handshake ecosystem. Therefore it's useful to be able to attach profile information like an email, phone, avatar or social profiles information to a Domain. -This Standard can also be used to provide contact information for domain listings according to [HIP-XXXX](https://github.com/handshake-org/HIPs/pull/46/files/18bed187abbbcf2846f4fea78df1f7f8f1348608?short_path=1d2937e#diff-1d2937eacaeeb0fe53fcad8e70f406714fb6359c5fef0f47b1aef97e1cdfcbed). +This Standard can also be used to provide contact information for domain listings according to [HIP-0010](https://github.com/handshake-org/HIPs/blob/master/HIP-0010.md). ## TXT Record Standard: Profile Data -For the above to work we need standards so any website or app can properly render the TXT records. The records should be flexible, short and easy to understand. It is important to note, that it's impossible to validate the data via HSD. Therefore TXT records must be validated by the site owner or app that is rendering the TXT records. +For the above to work we need standards so any website or app can properly render the TXT records. The records should be flexible, short and easy to understand. It's important to note, that all values should be checked by the application before serving them to the user. The general syntax for profile data is: From c4efb90143c4f0611341c7ce7532dc2001bab775 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Tue, 31 May 2022 11:28:15 +0200 Subject: [PATCH 14/16] Add implementation with semicolon delimiter --- HIP-0010.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/HIP-0010.md b/HIP-0010.md index b4326e3..eaf228a 100644 --- a/HIP-0010.md +++ b/HIP-0010.md @@ -27,6 +27,8 @@ The general syntax for domain listings is: There are currently two supported attributes: **[price](#price)** and **[url](#url)**. +Although each `=` pair can be provided as individual records, please consider using the **[recommended implementation](#alt)**. + ### (1) Listing Attribute: Price (mandatory) The listing price attribute is mandatory to create a domain listing. It enables a domain owner to provide a listing price for the domain. The expected value is the unit as a string, followed by the amount as a number. If the number contains decimals, a dot must be used as a seperator. @@ -75,6 +77,20 @@ TXT listing url=https://www.learnmore.com/about/my/domain TXT listing url=https://learnmoreaboutmydomain/ ``` +### Recommended Implementation + +To save blockchain / urkel tree space it's encouraged to use only one TXT record for the listing. A semicolon is then used to seperate each `=` pair. + +``` +TXT listing price=;url= +``` + +#### Valid Listing Example with the semicolon delimiter + +``` +TXT listing price=>HNS 1000;url=https://www.learnmore.com/about/my/domain +``` + ## Security Concerns There is a slight chance of Cross Site Scripting (XSS). Therefore a site owner should always verify the provided URL data before adding it to the DOM. From 6f458152d5412414a524124be678ea19b1b0b666 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Tue, 31 May 2022 16:17:12 +0200 Subject: [PATCH 15/16] Update HIP-0013.md - Renamed 'social' to 'service' as recommended by [EIP-634](https://eips.ethereum.org/EIPS/eip-634) - Used the reverse dot notation as the service key for better compatibility and flexibility - Added recommended implementation via semicolon delimiter - Changed phone format to [E.164](https://www.twilio.com/docs/glossary/what-e164) --- HIP-0013.md | 52 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/HIP-0013.md b/HIP-0013.md index 3019b13..6c3ab5e 100644 --- a/HIP-0013.md +++ b/HIP-0013.md @@ -11,11 +11,11 @@ Created: 2022-02-22 ## Abstract -A proposal to create a standard for the labels of string attributes in TXT records for profile data — following the [RFC 1464](https://datatracker.ietf.org/doc/html/rfc1464) standard. +A proposal to create a standard for the labels of string attributes in TXT records for profile data — following the [RFC 1464](https://datatracker.ietf.org/doc/html/rfc1464) standard. Parts of this standard where inspired by [EIP-634](https://eips.ethereum.org/EIPS/eip-634). ## Motivation -Handshake domains can also be used as usernames. Domains are used to sign in to websites and to identify users in the Handshake ecosystem. Therefore it's useful to be able to attach profile information like an email, phone, avatar or social profiles information to a Domain. +Handshake domains can also be used as usernames. Domains are used to sign in to websites and to identify users in the Handshake ecosystem. Therefore it's useful to be able to attach profile information like an email, phone, avatar or service to a Domain. This Standard can also be used to provide contact information for domain listings according to [HIP-0010](https://github.com/handshake-org/HIPs/blob/master/HIP-0010.md). @@ -27,7 +27,9 @@ The general syntax for profile data is: **TXT** `profile =` -There are currently five supported attributes: **[email](#email)**, **[phone](#phone)**, **[avatar](#avatar)** and **[social](#social)**. All attributes are optional but at least one attribute needs to be present, for a Domain to count as a profile. +There are currently five supported attributes: **[email](#email)**, **[phone](#phone)**, **[avatar](#avatar)** and **[service](#service)**. All attributes are optional but at least one attribute needs to be present, for a Domain to count as a profile. + +Although each `=` pair can be provided as individual records, please consider using the **[recommended implementation](#alt)**. ### (1) Profile Attribute: Email @@ -46,9 +48,7 @@ TXT profile email=hello@niami ### (2) Profile Attribute: Phone -The phone attribute is optional. It enables a domain owner to provide a phone number for the domain. The expected value is a phone number. - -Ideally the phone number is provided with a plus icon (+) and the country code. +The phone attribute is optional. It enables a domain owner to provide a phone number for the domain. The expected value is a phone number as an E.164 string (a number up to fifteen digits in length starting with a '+'). Regex: `^\+[1-9]\d{1,14}$` ``` TXT profile phone= @@ -57,10 +57,8 @@ TXT profile phone= #### Valid Phone Examples ``` -TXT profile phone=+1(536)8886253 TXT profile phone=+15368886253 -TXT profile phone=+1536-888-6253 -TXT profile phone=1536-888-6253 +TXT profile phone=+47538886253 ``` ### (3) Profile Attribute: Avatar @@ -80,25 +78,37 @@ TXT profile avatar=https://mywebsite.com/avatar.png TXT profile avatar=https://siasky.net/MABn4I5M6yPT0aCjIMU2OjlTWmKysaqoCeP0gSJw5moVrg ``` -### (4) Profile Attribute: Social +### (4) Profile Attribute: Service + +The service attribute is optional. It enables a domain owner to provide a username to a service. The expected value is a service key followed by a username. + +``` +TXT profile service= +``` + +The service key is made up of a reverse dot notation for a namespace the service owns, ex: com.twitter, com.namebase, io.github. Service keys must contain at least one dot. So if a service is hosted on a Handshake TLD, the service key has to end with a dot. + +#### Valid Service Examples -The social attribute is optional. It enables a domain owner to provide social media usernames for the domain. The expected value is the name of the social platform followed by a username. +``` +TXT profile service=com.twitter niami +TXT profile service=com.github 0xstefan +TXT profile service=io.keybase pinheadmz +TXT profile service=hnschat. skmo +``` -The name of the social platform can be gathered by taking the hostname (e.g. www.twitter.com), then removing the www. and the TLD (.com). If the social platform is hosted on a handshake Domain, the handshake Domain is used as the name for the social platform. +## Recommended Implementation -Site owners and apps using that data can decide which social platforms they want to support and how to display them. +To save blockchain / urkel tree space it's encouraged to use only one TXT record for the profile. A semicolon is then used to seperate each `=` pair. ``` -TXT profile social= +TXT profile mail=;phone=;avatar=;service= ``` -#### Valid Social Username Examples +### Valid Profile Example with the semicolon delimiter ``` -TXT profile social=twitter 0xstefan -TXT profile social=github 0xstefan -TXT profile social=discord 0xstefan#4697 -TXT profile social=hnschat 0xstefan +TXT profile email=hello@example.com;phone=+15368886253;avatar=https://mywebsite.com/avatar.png;service=com.github 0xstefan ``` ## Security Concerns @@ -114,3 +124,7 @@ There is a slight chance of Cross Site Scripting (XSS) when using URL's in attri [RFC 1464 Standards](https://datatracker.ietf.org/doc/html/rfc1464) [Common image file types by mozilla](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types) + +[EIP-634: Storage of text records in ENS](https://eips.ethereum.org/EIPS/eip-634) + +[Official ITU E.164 recommendation](https://www.itu.int/rec/T-REC-E.164/en) From 0826f40e8caea27e4abc595d7593128db0e3d853 Mon Sep 17 00:00:00 2001 From: 0xStefan <61558712+0xStefan@users.noreply.github.com> Date: Tue, 31 May 2022 16:19:56 +0200 Subject: [PATCH 16/16] Minor Styling --- HIP-0010.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HIP-0010.md b/HIP-0010.md index eaf228a..987c8f0 100644 --- a/HIP-0010.md +++ b/HIP-0010.md @@ -77,7 +77,7 @@ TXT listing url=https://www.learnmore.com/about/my/domain TXT listing url=https://learnmoreaboutmydomain/ ``` -### Recommended Implementation +## Recommended Implementation To save blockchain / urkel tree space it's encouraged to use only one TXT record for the listing. A semicolon is then used to seperate each `=` pair. @@ -85,7 +85,7 @@ To save blockchain / urkel tree space it's encouraged to use only one TXT record TXT listing price=;url= ``` -#### Valid Listing Example with the semicolon delimiter +### Valid Listing Example with the semicolon delimiter ``` TXT listing price=>HNS 1000;url=https://www.learnmore.com/about/my/domain