Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Me ¶
type Me struct { User // The Me user will also have a priv key, used by libp2p to sign messages IdentPrivKey libp2pcrypto.PrivKey }
func (Me) MarshalJSON ¶
func (*Me) UnmarshalJSON ¶
TODO Please let there be a nicer way to do this
type User ¶
type User struct { Nick string Address string // All users will have a pub key used for identification in libp2p IdentPubKey libp2pcrypto.PubKey }
func (User) IsVerified ¶
TODO how to do this? verify that a particular nick verified somehow, use libp2p pub/priv key?
func (User) MarshalJSON ¶
func (User) PartyID ¶
The MSP protocol lib requires each user to have a unique Party ID represented as an exactly 32 byte string Since each user has a pub key, which is used as a peer id in libp2p, lets use that. Marshal the key to bytes, convert to Pretty() format, then take last 32 characters.
func (*User) UnmarshalJSON ¶
TODO Please let there be a nicer way to do this
Click to show internal directories.
Click to hide internal directories.