Skip to content

回复:比特币 URI 方案 ​

原始发布页

打开来源页面
查看 1 个交叉存档

引用 Karmicads 于 2010年5月1日 06:06:53 AM 的发言

Freenet URI 是这样的:

http://127.0.0.1:8888/USK@oshw3DxmJUt7q4ThF4dCez5IXbc9hCGcv0VuwLRCmeQ,ckeXv20F1gBzkqssB4RXHZ2nB1YRT8Pb8KYZk8wj-bs,AQACAAE/occamsrazor/6/f.pdf

就是这样,我们完全可以用同样的方式轻松实现,比如: http://127.0.0.1:8330/?to=<bitcoinaddress>;amount=<amount>

比特币可以像在 8332 端口处理 JSON-RPC 一样,在本地回环地址的 8330 端口响应。它会给出一个 HTTP 响应。

引用 DataWraith 于 2010年5月2日 11:13:09 AM 的发言

在我看来,比特币链接应该更像 mailto:,而不是 magnet:。

我认为我们可以这样做。

尽管比特币可以在 HTTP 响应中向用户呈现 HTML 界面来处理事务,但作为用户,我会怀疑是不是某个网站想骗我,或者我是否真的在与自己的比特币服务器通信。

HTTP 响应可以只是包含等同于后退按钮功能的 JavaScript 的 HTML,把它送回原页面。然后比特币弹出“发送比特币”对话框,目标比特币地址和金额都已经填好。它的工作方式就像 mailto: 链接,会弹出一封已经填好地址的新邮件。

机器上的任何用户都可以访问 127.0.0.1 回环地址,它没有按用户隔离,但这没关系,因为它只提供在对话框中预填字段的便利功能。你仍然必须按下“发送”。我们必须确保“发送”按钮没有被选中,以免你正在输入空格或回车时,它突然跳到前台。

英文原文 ​

展开英文原文

Quote from: Karmicads on May 01, 2010, 06:06:53 AM

A freenet URI is like this:

http://127.0.0.1:8888/USK@oshw3DxmJUt7q4ThF4dCez5IXbc9hCGcv0VuwLRCmeQ,ckeXv20F1gBzkqssB4RXHZ2nB1YRT8Pb8KYZk8wj-bs,AQACAAE/occamsrazor/6/f.pdf

There you go, we could easily do it the same way, like: http://127.0.0.1:8330/?to=<bitcoinaddress>;amount=<amount>

Bitcoin can answer port 8330 on local loopback just as it does for JSON-RPC on 8332. It would give an HTTP answer.

Quote from: DataWraith on May 02, 2010, 11:13:09 AM

A bitcoin-link should be more like mailto: than magnet: IMHO.

I think we can do that.

Although it would be possible for Bitcoin to take care of business in the HTTP response by presenting HTML UI to the user, as a user I would wonder if some website is trying to trick me or if I'm really talking to my own Bitcoin server.

The HTTP response could simply be HTML with the JavaScript equivalent of the back button, sending it back to the page. Bitcoin then pops up the Send Bitcoins dialog with the destination bitcoin address and amount already filled in. It would work just like a mailto: link that pops up a new email with the address filled in.

127.0.0.1 loopback is accessible by any user on the machine, it doesn't have per-user separation, but it's OK because it would only serve the convenience function of pre-filling the fields in a dialog. You'd still have to press Send. We'd have to make sure the Send button is not selected so it couldn't jump into the foreground while you're typing a space or enter.

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。