diff --git a/bindings/authenticatedConnection.go b/bindings/authenticatedConnection.go index ce33daf0e645dbda42badddcb6829712aa533413..5f41453a5c7345e9cf461d6e7da5464b386761a2 100644 --- a/bindings/authenticatedConnection.go +++ b/bindings/authenticatedConnection.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( diff --git a/bindings/cmix.go b/bindings/cmix.go index 5c1790738b07c8ca143ee34e24b16b083be88836..e22bb936422c46bd07ad5577aef14d7cd2443f3b 100644 --- a/bindings/cmix.go +++ b/bindings/cmix.go @@ -1,7 +1,15 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "fmt" + "sync" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" @@ -50,9 +58,14 @@ func NewKeystore(network, storageDir string, password []byte, regCode string) er // Login does not block on network connection, and instead loads and // starts subprocesses to perform network operations. // TODO: add in custom parameters instead of the default -func Login(storageDir string, password []byte) (*Cmix, error) { - paramsJSON := GetDefaultCMixParams() - params, err := parseCMixParams(paramsJSON) +func Login(storageDir string, password []byte, cmixParamsJSON []byte) (*Cmix, + error) { + if len(cmixParamsJSON) == 0 { + jww.WARN.Printf("cmix params not specified, using defaults...") + cmixParamsJSON = GetDefaultCMixParams() + } + + params, err := parseCMixParams(cmixParamsJSON) if err != nil { return nil, err } @@ -68,3 +81,50 @@ func Login(storageDir string, password []byte) (*Cmix, error) { func (c *Cmix) GetID() int { return c.id } + +// cmixTracker is a singleton used to keep track of extant Cmix objects, +// preventing race conditions created by passing it over the bindings +type cmixTracker struct { + clients map[int]*Cmix + count int + mux sync.RWMutex +} + +// make a Cmix from an xxdk.Cmix, assigns it a unique ID, +// and adds it to the cmixTracker +func (ct *cmixTracker) make(c *xxdk.Cmix) *Cmix { + ct.mux.Lock() + defer ct.mux.Unlock() + + id := ct.count + ct.count++ + + ct.clients[id] = &Cmix{ + api: c, + id: id, + } + + return ct.clients[id] +} + +// get a Cmix from the cmixTracker given its ID +func (ct *cmixTracker) get(id int) (*Cmix, error) { + ct.mux.RLock() + defer ct.mux.RUnlock() + + c, exist := ct.clients[id] + if !exist { + return nil, errors.Errorf("Cannot get client for id %d, client "+ + "does not exist", id) + } + + return c, nil +} + +// delete a Cmix if it exists in the cmixTracker +func (ct *cmixTracker) delete(id int) { + ct.mux.Lock() + defer ct.mux.Unlock() + + delete(ct.clients, id) +} diff --git a/bindings/cmixTracker.go b/bindings/cmixTracker.go deleted file mode 100644 index cb7d215a0613c780cc228998c381efec8b9ad36a..0000000000000000000000000000000000000000 --- a/bindings/cmixTracker.go +++ /dev/null @@ -1,54 +0,0 @@ -package bindings - -import ( - "github.com/pkg/errors" - "gitlab.com/elixxir/client/xxdk" - "sync" -) - -// cmixTracker is a singleton used to keep track of extant Cmix objects, -// preventing race conditions created by passing it over the bindings -type cmixTracker struct { - clients map[int]*Cmix - count int - mux sync.RWMutex -} - -// make a Cmix from an xxdk.Cmix, assigns it a unique ID, -// and adds it to the cmixTracker -func (ct *cmixTracker) make(c *xxdk.Cmix) *Cmix { - ct.mux.Lock() - defer ct.mux.Unlock() - - id := ct.count - ct.count++ - - ct.clients[id] = &Cmix{ - api: c, - id: id, - } - - return ct.clients[id] -} - -// get a Cmix from the cmixTracker given its ID -func (ct *cmixTracker) get(id int) (*Cmix, error) { - ct.mux.RLock() - defer ct.mux.RUnlock() - - c, exist := ct.clients[id] - if !exist { - return nil, errors.Errorf("Cannot get client for id %d, client "+ - "does not exist", id) - } - - return c, nil -} - -// delete a Cmix if it exists in the cmixTracker -func (ct *cmixTracker) delete(id int) { - ct.mux.Lock() - defer ct.mux.Unlock() - - delete(ct.clients, id) -} diff --git a/bindings/connect.go b/bindings/connect.go index 94d13cba8ec571c07da43b0fd286a06731eb7ee3..85c25b4ee96f37d100c61d8449658d836da53729 100644 --- a/bindings/connect.go +++ b/bindings/connect.go @@ -1,10 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + "sync" + "github.com/pkg/errors" + jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/catalog" "gitlab.com/elixxir/client/connect" + "gitlab.com/elixxir/client/xxdk" "gitlab.com/elixxir/crypto/contact" ) @@ -19,6 +30,7 @@ var connectionTrackerSingleton = &connectionTracker{ type Connection struct { connection connect.Connection id int + params xxdk.E2EParams } // GetId returns the Connection.id @@ -32,9 +44,12 @@ func (c *Connection) GetId() int { // partner.Manager is confirmed. // recipientContact - marshalled contact.Contact object // myIdentity - marshalled ReceptionIdentity object -func (c *Cmix) Connect(e2eId int, recipientContact []byte) ( +func (c *Cmix) Connect(e2eId int, recipientContact, e2eParamsJSON []byte) ( *Connection, error) { - paramsJSON := GetDefaultE2EParams() + if len(e2eParamsJSON) == 0 { + jww.WARN.Printf("e2e params not specified, using defaults...") + e2eParamsJSON = GetDefaultE2EParams() + } cont, err := contact.Unmarshal(recipientContact) if err != nil { return nil, err @@ -45,7 +60,7 @@ func (c *Cmix) Connect(e2eId int, recipientContact []byte) ( return nil, err } - p, err := parseE2EParams(paramsJSON) + p, err := parseE2EParams(e2eParamsJSON) if err != nil { return nil, err } @@ -55,21 +70,14 @@ func (c *Cmix) Connect(e2eId int, recipientContact []byte) ( return nil, err } - return connectionTrackerSingleton.make(connection), nil + return connectionTrackerSingleton.make(connection, p), nil } // SendE2E is a wrapper for sending specifically to the Connection's partner.Manager // Returns marshalled E2ESendReport func (c *Connection) SendE2E(mt int, payload []byte) ([]byte, error) { - paramsJSON := GetDefaultE2EParams() - - params, err := parseE2EParams(paramsJSON) - if err != nil { - return nil, err - } - rounds, mid, ts, err := c.connection.SendE2E(catalog.MessageType(mt), payload, - params.Base) + c.params.Base) if err != nil { return nil, err @@ -102,3 +110,52 @@ func (c *Connection) RegisterListener(messageType int, newListener Listener) err _, err := c.connection.RegisterListener(catalog.MessageType(messageType), listener{l: newListener}) return err } + +// connectionTracker is a singleton used to keep track of extant clients, allowing +// for race condition free passing over the bindings + +type connectionTracker struct { + connections map[int]*Connection + count int + mux sync.RWMutex +} + +// make makes a client from an API client, assigning it a unique ID +func (ct *connectionTracker) make(c connect.Connection, + params xxdk.E2EParams) *Connection { + ct.mux.Lock() + defer ct.mux.Unlock() + + id := ct.count + ct.count++ + + ct.connections[id] = &Connection{ + connection: c, + id: id, + params: params, + } + + return ct.connections[id] +} + +//get returns a client given its ID +func (ct *connectionTracker) get(id int) (*Connection, error) { + ct.mux.RLock() + defer ct.mux.RUnlock() + + c, exist := ct.connections[id] + if !exist { + return nil, errors.Errorf("Cannot get client for id %d, client "+ + "does not exist", id) + } + + return c, nil +} + +//deletes a client if it exists +func (ct *connectionTracker) delete(id int) { + ct.mux.Lock() + defer ct.mux.Unlock() + + delete(ct.connections, id) +} diff --git a/bindings/connect_test.go b/bindings/connect_test.go index 9093dd3adff088bf82e7df4f9f28661a35b9a75d..f6152c768365d15cd5e29476af00dd2b587c02f3 100644 --- a/bindings/connect_test.go +++ b/bindings/connect_test.go @@ -1,13 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" - "gitlab.com/elixxir/crypto/e2e" - "gitlab.com/xx_network/crypto/csprng" - "gitlab.com/xx_network/primitives/id" "reflect" "testing" "time" + + "gitlab.com/elixxir/crypto/e2e" + "gitlab.com/xx_network/crypto/csprng" + "gitlab.com/xx_network/primitives/id" ) func TestE2ESendReport_JSON(t *testing.T) { diff --git a/bindings/connectionTracker.go b/bindings/connectionTracker.go deleted file mode 100644 index 0352c3285acee4b64b0bc951898ba3f4991e6d04..0000000000000000000000000000000000000000 --- a/bindings/connectionTracker.go +++ /dev/null @@ -1,54 +0,0 @@ -package bindings - -import ( - "github.com/pkg/errors" - "gitlab.com/elixxir/client/connect" - "sync" -) - -// connectionTracker is a singleton used to keep track of extant clients, allowing -// for race condition free passing over the bindings - -type connectionTracker struct { - connections map[int]*Connection - count int - mux sync.RWMutex -} - -// make makes a client from an API client, assigning it a unique ID -func (ct *connectionTracker) make(c connect.Connection) *Connection { - ct.mux.Lock() - defer ct.mux.Unlock() - - id := ct.count - ct.count++ - - ct.connections[id] = &Connection{ - connection: c, - id: id, - } - - return ct.connections[id] -} - -//get returns a client given its ID -func (ct *connectionTracker) get(id int) (*Connection, error) { - ct.mux.RLock() - defer ct.mux.RUnlock() - - c, exist := ct.connections[id] - if !exist { - return nil, errors.Errorf("Cannot get client for id %d, client "+ - "does not exist", id) - } - - return c, nil -} - -//deletes a client if it exists -func (ct *connectionTracker) delete(id int) { - ct.mux.Lock() - defer ct.mux.Unlock() - - delete(ct.connections, id) -} diff --git a/bindings/delivery.go b/bindings/delivery.go index 9146e838f4381661385e4769b20a95ff4f74320b..0efa3e636f61a6520c6e34e8d15efd68d15c36ca 100644 --- a/bindings/delivery.go +++ b/bindings/delivery.go @@ -1,13 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" "fmt" + "time" + "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/cmix" "gitlab.com/xx_network/primitives/id" - "time" ) // Example marshalled roundList object: diff --git a/bindings/e2e.go b/bindings/e2e.go index b2e9984d5f3759cf90eb4f6d111d37ee91b97a05..e4405f15a5907e106ccf4be3a5e0c63c94f916de 100644 --- a/bindings/e2e.go +++ b/bindings/e2e.go @@ -1,12 +1,16 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2022 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package bindings import ( + "sync" + + "github.com/pkg/errors" "gitlab.com/elixxir/client/cmix/identity/receptionID" "gitlab.com/elixxir/client/cmix/rounds" "gitlab.com/elixxir/client/xxdk" @@ -180,3 +184,51 @@ func (a *authCallback) Reset(partner contact.Contact, receptionID receptionID.EphemeralIdentity, round rounds.Round, _ *xxdk.E2e) { a.bindingsCbs.Reset(convertAuthCallbacks(partner, receptionID, round)) } + +// e2eTracker is a singleton used to keep track of extant E2e objects, +// preventing race conditions created by passing it over the bindings +type e2eTracker struct { + // TODO: Key on Identity.ID to prevent duplication + clients map[int]*E2e + count int + mux sync.RWMutex +} + +// make a E2e from an xxdk.E2e, assigns it a unique ID, +// and adds it to the e2eTracker +func (ct *e2eTracker) make(c *xxdk.E2e) *E2e { + ct.mux.Lock() + defer ct.mux.Unlock() + + id := ct.count + ct.count++ + + ct.clients[id] = &E2e{ + api: c, + id: id, + } + + return ct.clients[id] +} + +// get an E2e from the e2eTracker given its ID +func (ct *e2eTracker) get(id int) (*E2e, error) { + ct.mux.RLock() + defer ct.mux.RUnlock() + + c, exist := ct.clients[id] + if !exist { + return nil, errors.Errorf("Cannot get client for id %d, client "+ + "does not exist", id) + } + + return c, nil +} + +// delete an E2e if it exists in the e2eTracker +func (ct *e2eTracker) delete(id int) { + ct.mux.Lock() + defer ct.mux.Unlock() + + delete(ct.clients, id) +} diff --git a/bindings/e2eHandler.go b/bindings/e2eHandler.go index 3fe81a225c31f4fef7aade2361943a95f44817ae..5114f46ee96bade011fc1c5c90e335f6c529de1d 100644 --- a/bindings/e2eHandler.go +++ b/bindings/e2eHandler.go @@ -1,8 +1,9 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2022 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package bindings diff --git a/bindings/e2eTracker.go b/bindings/e2eTracker.go deleted file mode 100644 index 8f3ff5374ddb048642eeeda0a74a04a7f6bc3c44..0000000000000000000000000000000000000000 --- a/bindings/e2eTracker.go +++ /dev/null @@ -1,61 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2022 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// - -package bindings - -import ( - "github.com/pkg/errors" - "gitlab.com/elixxir/client/xxdk" - "sync" -) - -// e2eTracker is a singleton used to keep track of extant E2e objects, -// preventing race conditions created by passing it over the bindings -type e2eTracker struct { - // TODO: Key on Identity.ID to prevent duplication - clients map[int]*E2e - count int - mux sync.RWMutex -} - -// make a E2e from an xxdk.E2e, assigns it a unique ID, -// and adds it to the e2eTracker -func (ct *e2eTracker) make(c *xxdk.E2e) *E2e { - ct.mux.Lock() - defer ct.mux.Unlock() - - id := ct.count - ct.count++ - - ct.clients[id] = &E2e{ - api: c, - id: id, - } - - return ct.clients[id] -} - -// get an E2e from the e2eTracker given its ID -func (ct *e2eTracker) get(id int) (*E2e, error) { - ct.mux.RLock() - defer ct.mux.RUnlock() - - c, exist := ct.clients[id] - if !exist { - return nil, errors.Errorf("Cannot get client for id %d, client "+ - "does not exist", id) - } - - return c, nil -} - -// delete an E2e if it exists in the e2eTracker -func (ct *e2eTracker) delete(id int) { - ct.mux.Lock() - defer ct.mux.Unlock() - - delete(ct.clients, id) -} diff --git a/bindings/fileTransfer.go b/bindings/fileTransfer.go index 9b8b1da61c12064bf2e5cbe4ff26bb7a0a99d792..b9d3e802be559af4c83ad131b967228be00c759c 100644 --- a/bindings/fileTransfer.go +++ b/bindings/fileTransfer.go @@ -1,13 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + "time" + jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/catalog" "gitlab.com/elixxir/client/fileTransfer" ftCrypto "gitlab.com/elixxir/crypto/fileTransfer" "gitlab.com/xx_network/primitives/id" - "time" ) /* File Transfer Structs and Interfaces */ diff --git a/bindings/fileTransfer_test.go b/bindings/fileTransfer_test.go index a89967891505ea911384361924a746d9094260ff..10d49d9b81cbea043d281de9f4377508a6e2063f 100644 --- a/bindings/fileTransfer_test.go +++ b/bindings/fileTransfer_test.go @@ -1,11 +1,19 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + "testing" + "gitlab.com/elixxir/crypto/fileTransfer" "gitlab.com/xx_network/crypto/csprng" "gitlab.com/xx_network/primitives/id" - "testing" ) func TestFileTransfer_inputs(t *testing.T) { diff --git a/bindings/follow.go b/bindings/follow.go index 34bb4c58eabffb120a2fc1dbad6cfc57b51324d5..98eb784670b5209cfffc2d25a94f9479fb025caf 100644 --- a/bindings/follow.go +++ b/bindings/follow.go @@ -1,10 +1,18 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "fmt" + "time" + "github.com/pkg/errors" "gitlab.com/xx_network/primitives/netTime" - "time" ) // StartNetworkFollower kicks off the tracking of the network. It starts diff --git a/bindings/identity.go b/bindings/identity.go index 2718672f50b22b8017d84e9c1799eac4667905d6..b17e45d5eccbc5299e0b24374d87686312e53c5b 100644 --- a/bindings/identity.go +++ b/bindings/identity.go @@ -1,7 +1,15 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + "gitlab.com/elixxir/client/xxdk" "gitlab.com/elixxir/crypto/contact" "gitlab.com/elixxir/primitives/fact" diff --git a/bindings/identity_test.go b/bindings/identity_test.go index 1d1e0be0f331185480fbf48d87ca7607f2eb7f5b..662f1f5c000021def40a17a50d9c9646b8a78779 100644 --- a/bindings/identity_test.go +++ b/bindings/identity_test.go @@ -1,7 +1,16 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + "testing" + "gitlab.com/elixxir/crypto/cmix" "gitlab.com/elixxir/crypto/cyclic" dh "gitlab.com/elixxir/crypto/diffieHellman" @@ -9,7 +18,6 @@ import ( "gitlab.com/xx_network/crypto/large" "gitlab.com/xx_network/crypto/signature/rsa" "gitlab.com/xx_network/primitives/id" - "testing" ) func TestIdentity_JSON(t *testing.T) { diff --git a/bindings/listener.go b/bindings/listener.go index b284687beadd802985b6023528989a5401b7dbd0..5d4e5608d212e8b596468cd8887bfb86560bf4ff 100644 --- a/bindings/listener.go +++ b/bindings/listener.go @@ -1,7 +1,15 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/e2e/receive" ) diff --git a/bindings/listener_test.go b/bindings/listener_test.go index c8fd03ec88cfea35ab5cb7a5431f05fb7157907d..8336dd207f0a9232ec3daa650f8bcdd571358189 100644 --- a/bindings/listener_test.go +++ b/bindings/listener_test.go @@ -1,12 +1,20 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + "testing" + "time" + "gitlab.com/elixxir/crypto/e2e" "gitlab.com/xx_network/crypto/csprng" "gitlab.com/xx_network/primitives/id" - "testing" - "time" ) func TestMessage_Json(t *testing.T) { diff --git a/bindings/utilities.go b/bindings/logging.go similarity index 76% rename from bindings/utilities.go rename to bindings/logging.go index 7eb109730a21b1c4cc519ee7b1e8d154362f62a0..5fa5fe0e196807f9baa52dfa9969f6331a85ec5a 100644 --- a/bindings/utilities.go +++ b/bindings/logging.go @@ -1,11 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + +// logging.go contains bindings log control functions + package bindings import ( "fmt" + "log" + "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "google.golang.org/grpc/grpclog" - "log" ) // sets level of logging. All logs the set level and above will be displayed diff --git a/bindings/ndf.go b/bindings/ndf.go index ed72aa1d6a98c33861d814d18f032c7396e1a099..4787544b6075a9ac835f92624c807130d1aa964a 100644 --- a/bindings/ndf.go +++ b/bindings/ndf.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import "gitlab.com/elixxir/client/xxdk" diff --git a/bindings/ndf_test.go b/bindings/ndf_test.go index beb0eac9604902938b5efcac0660bf4ea230c7d4..c453582b5d7eccee053de6f4d60cae5a345af3ed 100644 --- a/bindings/ndf_test.go +++ b/bindings/ndf_test.go @@ -1,12 +1,20 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "fmt" + "strings" + "testing" + "gitlab.com/elixxir/comms/testkeys" "gitlab.com/xx_network/primitives/ndf" "gitlab.com/xx_network/primitives/utils" - "strings" - "testing" ) var testCert = `-----BEGIN CERTIFICATE----- diff --git a/bindings/restlike.go b/bindings/restlike.go index 4884098085771853832a9104bf0715975f06db72..51201184b9020b7ce012e7e2e1575adc6767e4b2 100644 --- a/bindings/restlike.go +++ b/bindings/restlike.go @@ -1,13 +1,15 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2022 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// package bindings import ( "encoding/json" + "gitlab.com/elixxir/client/e2e" "gitlab.com/elixxir/client/restlike" "gitlab.com/elixxir/client/restlike/connect" diff --git a/bindings/restlikeSingle.go b/bindings/restlikeSingle.go index eb7d34beeb115d531015b4c06e026fe96b0e5d02..f6ddee5fcf2acafdfcd8f72aa80fc7916cafa5f9 100644 --- a/bindings/restlikeSingle.go +++ b/bindings/restlikeSingle.go @@ -1,7 +1,15 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + "gitlab.com/elixxir/client/restlike" "gitlab.com/elixxir/client/restlike/single" "gitlab.com/elixxir/crypto/contact" diff --git a/bindings/secrets.go b/bindings/secrets.go index f5f23eadd16beb8651a5d4a083801ac802b566ef..5bdeeed03c35cf6e0af99b8a64aaf54f213e8a23 100644 --- a/bindings/secrets.go +++ b/bindings/secrets.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( diff --git a/bindings/secrets_test.go b/bindings/secrets_test.go index c2422a319986881ff9567d37d8090d3e0230188c..60b03a2d42b8b564e4dbf134aab92c4cf189e401 100644 --- a/bindings/secrets_test.go +++ b/bindings/secrets_test.go @@ -1,3 +1,10 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( diff --git a/bindings/single.go b/bindings/single.go index 048edda8aa7b56fa9122740c1791986a05e2bb9f..c54bfeecabcb762be47aed7c8f023da1b2a7a23f 100644 --- a/bindings/single.go +++ b/bindings/single.go @@ -1,7 +1,15 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + "gitlab.com/elixxir/client/cmix/identity/receptionID" "gitlab.com/elixxir/client/cmix/rounds" "gitlab.com/elixxir/client/single" diff --git a/bindings/single_test.go b/bindings/single_test.go index 807abe161b998bb259a5c9b757368746850e97bf..be543bb7e0a972085c871a781a0a6e0bb9d43af7 100644 --- a/bindings/single_test.go +++ b/bindings/single_test.go @@ -1,13 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + package bindings import ( "encoding/json" + "testing" + "time" + "gitlab.com/elixxir/client/cmix/identity/receptionID" "gitlab.com/xx_network/crypto/csprng" "gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id/ephemeral" - "testing" - "time" ) func TestSingleUseJsonMarshals(t *testing.T) { diff --git a/bindings/version.go b/bindings/version.go index 4d6a4b2dc2dd86b1881aa3c918062cd50052fd98..ad7ddc66e800713d84f2d3858f854d6b5cedb6aa 100644 --- a/bindings/version.go +++ b/bindings/version.go @@ -1,8 +1,11 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright © 2022 Privategrity Corporation / -// / -// All rights reserved. / -//////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + +// version.go contains functions to report the client version. package bindings