leather-io / extension

Leather browser extension
https://leather.io
MIT License
295 stars 141 forks source link

Support BNS names in recipient field for sends #1840

Closed friedger closed 1 year ago

friedger commented 2 years ago

Currently, bns names are not accepted as recipients

Screenshot from 2021-10-19 10-19-16

Expected behaviour Allow to enter a bns name in preview and show the resolved address + bns name in final screen

xanbots commented 2 years ago

Yes please, big +1

sleepiJoe commented 2 years ago

+1 (we have the demand!)

friedger commented 2 years ago

What should the UI look like? Should the preview just show the address and the name?

markmhendrickson commented 2 years ago

Assigning @landitus to design

pors commented 2 years ago

Interesting comment here: https://twitter.com/axopoa/status/1519572653278908417

I think we will need a autorenewal service for BTC names. Because it can be very dangerous if someone renews a name you own before you do.

markmhendrickson commented 2 years ago

From @kyranjamie:

Would be a great feature, but it isn't entirely trivial. We need to consider homoglyph attacks: I could buy bruffstаr.btc (Cyrillic letter а). We need to show address still in UI and warn against dodgy chars, similar to how vscode does

friedger commented 2 years ago

homoglyph attacks are not possible because names are limited to a-z, 0-9 and - and _

kyranjamie commented 2 years ago

That does indeed limit the scope. We should still use a clear display type, so Oliver.btc is visibly different to OIiver.btc (capital i not L).

aulneau commented 1 year ago

That does indeed limit the scope. We should still use a clear display type, so Oliver.btc is visibly different to OIiver.btc (capital i not L).

only lower case letters are allowed in BNS names

RagnarLifthrasir commented 1 year ago

+1 for BNS names in recipient fields.

friedger commented 1 year ago

A blocker is still https://github.com/hirosystems/stacks-blockchain-api/issues/1333

aulneau commented 1 year ago

A blocker is still hirosystems/stacks-blockchain-api#1333

does not need to be a blocker, you can use the NFT history endpoint (gamma does this)

see https://discord.com/channels/621759717756370964/909867922971820102/1033008587804520459

yes, you can use the NFT history endpoint but you'll have to provide the name Clarity encoded. This is an example for eliherf.stacksparrot: https://stacks-node-api.mainnet.stacks.co/extended/v1/tokens/nft/history?asset_identifier=SP000000000000000000002Q6VF78.bns::names&value=0x0c00000002046e616d650200000007656c6968657266096e616d657370616365020000000c737461636b73706172726f74

friedger commented 1 year ago

does not need to be a blocker, you can use the NFT history endpoint (gamma does this)

How do we reach all developers to switch from one api endpoint to the other? Seems not an option