From 7cd485d807c5973c6178aba6fe7bf18c4eb46e8e Mon Sep 17 00:00:00 2001 From: rlack Date: Fri, 23 Dec 2022 17:41:16 +0100 Subject: [PATCH] Update cashu_client_spec.md 1101 Binary = 13 decimal --- docs/specs/cashu_client_spec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/specs/cashu_client_spec.md b/docs/specs/cashu_client_spec.md index bf537b2..73bb92d 100644 --- a/docs/specs/cashu_client_spec.md +++ b/docs/specs/cashu_client_spec.md @@ -38,7 +38,7 @@ Mint: `Bob` - `Alice` pays bolt11 invoice `payment_request` using a Bitcoin Lightning wallet. ### Step 2: Request tokens -- To request tokens of value `amount : int`, `Alice` decomposes `amount` into a sum of values of `2^n`, e.g. `13` is `amounts : List[int] = [1, 4, 8]`. This can be easily done by representing `amount` as binary and using each binary digit that is `1` as part of the sum, e.g. `8` would be `1101` wich is `2^0 + 2^2 + 2^3`. In this example, `Alice` will request `N = len(amounts) = 3` tokens. +- To request tokens of value `amount : int`, `Alice` decomposes `amount` into a sum of values of `2^n`, e.g. `13` is `amounts : List[int] = [1, 4, 8]`. This can be easily done by representing `amount` as binary and using each binary digit that is `1` as part of the sum, e.g. `13` would be `1101` wich is `2^0 + 2^2 + 2^3`. In this example, `Alice` will request `N = len(amounts) = 3` tokens. - `Alice` generates a random secret string `x_i` of `128` random bits with `i \in [0,..,N-1]`for each of the `N` requested tokens and encodes them in `base64`. [*TODO: remove index i*] - `Alice` remembers `x` for the construction of the proof in Step 5. @@ -122,4 +122,4 @@ Here we describe how `Alice` can request from `Bob` to make a Lightning payment # Todo: - Call subsections 1. and 1.2 etc so they can be referenced - Define objets like `MintRequest` and `SplitRequests` once when they appear and reuse them. -- Clarify whether a `TOKEN` is a single Proof or a list of Proofs \ No newline at end of file +- Clarify whether a `TOKEN` is a single Proof or a list of Proofs