From d9794147f6fd3e06ab166909fe1b4375ba62f8b4 Mon Sep 17 00:00:00 2001 From: Egge Date: Wed, 18 Dec 2024 15:54:15 +0100 Subject: [PATCH 1/3] removed v3 binary token --- 00.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/00.md b/00.md index caf6c23..bc7299e 100644 --- a/00.md +++ b/00.md @@ -308,15 +308,14 @@ cashuBo2F0gqJhaUgA_9SLj17PgGFwgaNhYQFhc3hAYWNjMTI0MzVlN2I4NDg0YzNjZjE4NTAxNDkyMT #### Binary Token -V3 and V4 Token can be transmitted in a binary format when applicable (for example when transmitting via NFC). +Token can be transmitted in a binary format when applicable (for example when transmitting via NFC). For this the serialised token is prepended with a prefix and a version byte. ``` utf8("craw") || utf8() || ``` -- Token V3 Version: `utf8("craw") || utf8("A") || cbor(token_object)` -- Token V4 Version: `utf8("craw") || utf8("B") || cbor(token_object)` +- Binary Encoding V1: `utf8("craw") || utf8("B") || cbor(token_v4_object)` [00]: 00.md [01]: 01.md From b1149e5e68c01df2fd503502a742be3d63c53863 Mon Sep 17 00:00:00 2001 From: Egge Date: Wed, 18 Dec 2024 15:58:29 +0100 Subject: [PATCH 2/3] removed test --- tests/00-tests.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/tests/00-tests.md b/tests/00-tests.md index 06d8ac8..b1bfc34 100644 --- a/tests/00-tests.md +++ b/tests/00-tests.md @@ -193,42 +193,6 @@ cashuBo2F0gqJhaUgA_9SLj17PgGFwgaNhYQFhc3hAYWNjMTI0MzVlN2I4NDg0YzNjZjE4NTAxNDkyMT ## Raw Token Serialization -### TokenV3 - -What follows is a TokenV3 Token serialized in its raw binary form. `h''` values are bytes in hex notation. - -Token: - -```json -{ - "token": [ - { - "mint": "https://8333.space:3338", - "proofs": [ - { - "amount": 2, - "id": "009a1f293253e41e", - "secret": "407915bc212be61a77e3e6d2aeb4c727980bda51cd06a6afc29e2861768a7837", - "C": "02bc9097997d81afb2cc7346b5e4345a9346bd2a506eb7958598a72f0cf85163ea" - }, - { - "amount": 8, - "id": "009a1f293253e41e", - "secret": "fe15109314e61d7756b0f8ee0f23a624acaa3f4e042f61433c728c7057b931be", - "C": "029e8e5050b890a7d6c0968db16bc1d5d5fa040ea1de284f6ec69d61299f671059" - } - ] - } - ], - "unit": "sat", - "memo": "Thank you." -} -``` - -Serialized to raw binary: - -`h'6372617741a365746f6b656e81a2646d696e747768747470733a2f2f383333332e73706163653a333333386670726f6f667382a466616d6f756e740262696470303039613166323933323533653431656673656372657478403430373931356263323132626536316137376533653664326165623463373237393830626461353163643036613661666332396532383631373638613738333761437842303262633930393739393764383161666232636337333436623565343334356139333436626432613530366562373935383539386137326630636638353136336561a466616d6f756e74086269647030303961316632393332353365343165667365637265747840666531353130393331346536316437373536623066386565306632336136323461636161336634653034326636313433336337323863373035376239333162656143784230323965386535303530623839306137643663303936386462313662633164356435666130343065613164653238346636656336396436313239396636373130353964756e697463736174646d656d6f6a5468616e6b20796f752e'` - ### TokenV4 What follows is a TokenV4 Token serialized in its raw binary form. `h''` values are bytes in hex notation. From d16fcb03e612f0a0aa247f1ae355ed6fd6a09820 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 25 Dec 2024 21:37:36 +0100 Subject: [PATCH 3/3] nut-00: binary encoding v1 -> v2 --- 00.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/00.md b/00.md index bc7299e..76ee2fa 100644 --- a/00.md +++ b/00.md @@ -315,7 +315,7 @@ For this the serialised token is prepended with a prefix and a version byte. utf8("craw") || utf8() || ``` -- Binary Encoding V1: `utf8("craw") || utf8("B") || cbor(token_v4_object)` +- Binary Encoding V4: `utf8("craw") || utf8("B") || cbor(token_v4_object)` [00]: 00.md [01]: 01.md