Return-Path: <peter@coinkite.com>
Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 6C025C000E
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed,  1 Sep 2021 13:46:57 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp3.osuosl.org (Postfix) with ESMTP id 4993C6060C
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed,  1 Sep 2021 13:46:57 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level: 
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001,
 RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
 autolearn=ham autolearn_force=no
Received: from smtp3.osuosl.org ([127.0.0.1])
 by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id XxJhB7AOxFfX
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed,  1 Sep 2021 13:46:53 +0000 (UTC)
X-Greylist: delayed 00:07:20 by SQLgrey-1.8.0
Received: from smtp94.ord1c.emailsrvr.com (smtp94.ord1c.emailsrvr.com
 [108.166.43.94])
 by smtp3.osuosl.org (Postfix) with ESMTPS id DBBE860594
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed,  1 Sep 2021 13:46:52 +0000 (UTC)
X-Auth-ID: peter@coinkite.com
Received: by smtp12.relay.ord1c.emailsrvr.com (Authenticated sender:
 peter-AT-coinkite.com) with ESMTPSA id 26635C027E; 
 Wed,  1 Sep 2021 09:39:21 -0400 (EDT)
Date: Wed, 1 Sep 2021 09:39:30 -0400
From: "Peter D. Gray" <peter@coinkite.com>
To: Andrew Chow <achow101-lists@achow101.com>
Message-ID: <20210901133930.GB91472@coinkite.com>
Reply-To: Peter Gray <peter@coinkite.com>
References: <mailman.9346.1630015566.1160.bitcoin-dev@lists.linuxfoundation.org>
 <20210831182741.GV91472@coinkite.com>
 <775f2a59-7cd7-6234-23d2-1780e2c4da58@achow101.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="7UIJfHqpdi+oBJdT"
Content-Disposition: inline
In-Reply-To: <775f2a59-7cd7-6234-23d2-1780e2c4da58@achow101.com>
Organization: Coinkite Inc. (www.coinkite.com)
X-Classification-ID: 1744c7de-7ec5-4ac8-9e00-f0d603dcd02a-1-1
X-Mailman-Approved-At: Wed, 01 Sep 2021 13:48:07 +0000
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Proposal for a few IANA mime-types related to
 Bitcoin
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Sep 2021 13:46:57 -0000


--7UIJfHqpdi+oBJdT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> ... I tried doing this with "application/bitcoin-psbt" back in
> 2019 but it was not accepted...

Thanks for this background.

Based on your experience, we should probably ignore the IANA then,
and just declare a few useful "mime types" (note the quotes) in a
new BIP. We can then agree inside the Bitcoin community on their
usage and meaning.

Anyone want to write that BIP and shepherd it? I can support you
but I'd rather write code.

---
@DocHEX  ||  Coinkite  ||  PGP: A3A31BAD 5A2A5B10

On Tue, Aug 31, 2021 at 07:46:55PM +0000, Andrew Chow wrote:
> Hi Peter,
>=20
> It would be nice to have mime types registered for Bitcoin things, but
> I'm not sure that it will be possible, at least not in the way that we
> would like. I tried doing this with "application/bitcoin-psbt" back in
> 2019 but it was not accepted. From that attempt, here is what I have
> learned:
>=20
> There are only a few accepted top level types, so we would not be able
> to use "bitcoin" as the top level (unless you want to submit an RFC to
> add a "bitcoin" top level). Of the available top level types,
> "application" is the most appropriate for Bitcoin.
>=20
> Next is the tree that the mime type should be in. The best would be the
> Standards tree, but it has some requirements that Bitcoin doesn't really
> meet. In order to be in the standards tree, the registration must be
> either associated with an IETF specification (so a RFC) or registered by
> a recognized standards related organization. Unfortunately the closest
> thing to a standards organization that Bitcoin has is the BIPs process,
> and that is not a really a standards organization nor is it recognized
> by IANA. So in order to register the mimetypes as Standards tree types,
> we would need to write an RFC, but this could be an independent
> submission (https://www.rfc-editor.org/about/independent/) rather than
> IETF-stream submission. I did not continue to pursue this because I
> didn't have the time.
>=20
> Another alternative would be to use the Vendor tree, but that would
> prefix the mimetype with "vnd." so it would end up being something like
> "application/vnd.bitcoin.psbt". I did not think this was an reasonable
> so I did not continue to pursue this avenue.
>=20
>=20
> Andrew Chow
>=20
> On 8/31/21 2:27 PM, Peter D. Gray via bitcoin-dev wrote:
> > Hi list!
> >
> > I am proposing to register the following MIME (RFC 2046) media types wi=
th the IANA:
> >
> >
> > bitcoin/psbt
> >
> >      - aka. a BIP-174 file, in binary
> >      - does not make any claims about signed/unsigned status; lets leav=
e that to the file
> >
> > bitcoin/txn
> >
> >      - aka. wire-ready fully-signed transaction in binary
> >
> > bitcoin/uri
> >
> >      - aka [BIP-21](https://github.com/bitcoin/bips/blob/master/bip-002=
1.mediawiki)
> >      - could be just a bare bech32 or base58 payment address
> >      - but can also encode amount, comments in URL args
> >      - potentially interesting as a response to 402 - Payment required
> >
> >
> > Other thoughts
> >
> > - some mime-types are proposed in BIP-71 but those are unrelated to abo=
ve, and never
> >    seem to have been registered
> >
> > - for those who like to encode their binary as base64 or hex, that can =
be indicated
> >    as "encoding=3Dhex" or "encoding=3Dbase64" in the optional parameter=
s, just like
> >    "text/plain; encoding=3Dutf-8" does. However, the default must be bi=
nary.
> >
> > - although the above are useful for web servers, they are also useful e=
lsewhere and I
> >    intend to use them in NFC (NDEF records) where a shorter length is c=
ritical.
> >
> > - I have no idea how easily IANA will accept these proposals.
> >
> > - current approved mime types: https://www.iana.org/assignments/media-t=
ypes/media-types.xhtml
> >
> > Thoughts?
> >
> > ---
> > @DocHEX  ||  Coinkite  ||  PGP: A3A31BAD 5A2A5B10
> >
> > _______________________________________________
> > bitcoin-dev mailing list
> > bitcoin-dev@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>=20
>=20

--7UIJfHqpdi+oBJdT
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEERYl3mt/BTzMnU06oo6MbrVoqWxAFAmEvgo0ACgkQo6MbrVoq
WxAs3wf+ILiwhQKoASk96w5NcBnxD9jSlEpgtVJDBtF7mU8g3stbfq6E2X87jJ3I
hiwv1TFf6Op1jtJSk2IDvNxrNiXel1BAC7YXCRNR7DUEWU3OA4f1PWvQ/B1kpMdW
0FETB/g5UsLwYJA8pe821W56tf2YerYIeYUJr+NPpwVNEDhrJ0ZJmvrelpsamJu/
1HkwpLXuzroBph7FtdfUGOuxalDq/8v46TwYkhih6NetuH5HC/2+xrE+FlZO3eVN
62TNKXLVqYHljIMCPUb9+79y/L8Lp3pNzC+uC8Vii+q2boKDumJVI5BFs2QSw8S6
PgUzwMZJ9ptGliWqMGLquPHNNSMynA==
=8kAl
-----END PGP SIGNATURE-----

--7UIJfHqpdi+oBJdT--