diff --git a/README.md b/README.md index 5900f9b..e7c2e4c 100644 --- a/README.md +++ b/README.md @@ -98,13 +98,9 @@ To initialize state/keys for both parties, call the ``bidirectional::init_mercha // initialize the merchant state and initialize with balance let (mut channel_token, mut merch_state, mut channel_state) = bidirectional::init_merchant(rng, &mut channel_state, "Bob"); - - // initialize the balance for merch_state - merch_state.init_balance(b0_merch); - + // generate the customer state using the channel token from the merchant let mut cust_state = bidirectional::init_customer(rng, // rng - &mut channel_state, // channel state &mut channel_token, // channel token b0_cust, // init customer balance b0_merch, // init merchant balance diff --git a/go/libbolt.go b/go/libbolt.go index c9ff0e6..3a78922 100644 --- a/go/libbolt.go +++ b/go/libbolt.go @@ -59,7 +59,7 @@ type CustState struct { Wpk string `json:"wpk"` Wsk string `json:"wsk"` OldKP *KP `json:"old_kp,omitempty"` - T []uint64 `json:"t"` + T []string `json:"t"` Wallet Wallet `json:"wallet"` WCom Commitment `json:"w_com"` Index int `json:"index"` @@ -77,11 +77,11 @@ type Commitment struct { } type Wallet struct { - Pkc []uint64 `json:"pkc"` - Wpk []uint64 `json:"wpk"` + Pkc []string `json:"pkc"` + Wpk []string `json:"wpk"` Bc int `json:"bc"` Bm int `json:"bm"` - Close []uint64 `json:"close"` + Close []string `json:"close"` } type KeyPair struct { @@ -90,8 +90,8 @@ type KeyPair struct { } type SecretKey struct { - X []uint64 `json:"x"` - Y [][]uint64 `json:"y"` + X []string `json:"x"` + Y [][]string `json:"y"` } type PublicKey struct { @@ -140,10 +140,10 @@ type Message struct { type CommitmentProof struct { T string `json:"T"` - Z [][]uint64 `json:"z"` - Ts [][]uint64 `json:"t"` + Z [][]string `json:"z"` + Ts [][]string `json:"t"` Index []int `json:"index"` - Reveal [][]uint64 `json:"reveal"` + Reveal [][]string `json:"reveal"` } type CustClose struct {