Skip to content

Commit

Permalink
separated prefixes and encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Egge21M committed Nov 28, 2024
1 parent f290644 commit 2c2538c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 00.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ cashuBo2F0gqJhaUgA_9SLj17PgGFwgaNhYQFhc3hAYWNjMTI0MzVlN2I4NDg0YzNjZjE4NTAxNDkyMT

#### Binary Token

V3 and V4 Token can be transmitted in a binary format when applicable. For this a list containing a prefix, a version and the token object is constructed and then serialised using `cbor`.
V3 and V4 Token can be transmitted in a binary format when applicable. For this the serialised token is prepended with a prefix and a version byte.

```
cbor(["craw", <version_unsigned_int>, <token_object>])
utf8('CRAW') <version_uint8> <serialised_token>
```

- Token V3 Version: 1
- Token V4 Version: 2
- Token V3 Version: `utf8('CRAW') 0x01 cbor(token_object)`
- Token V4 Version: `utf8('CRAW') 0x02 cbor(token_object)`

[00]: 00.md
[01]: 01.md
Expand Down

0 comments on commit 2c2538c

Please sign in to comment.