Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bls12381G2Identity ¶
type Bls12381G2Identity struct {
// contains filtered or unexported fields
}
func (*Bls12381G2Identity) PrivateKey ¶
func (b *Bls12381G2Identity) PrivateKey() crypto.PrivateKey
func (*Bls12381G2Identity) PublicIdentity ¶
func (b *Bls12381G2Identity) PublicIdentity() (*PublicIdentity, error)
type Ed25519Identity ¶
type Ed25519Identity struct {
// contains filtered or unexported fields
}
func NewEd25519Identity ¶
func NewEd25519Identity(sk []byte) *Ed25519Identity
NewEd25519Identity creates a new Ed25519 type identity
func (*Ed25519Identity) PrivateKey ¶
func (e *Ed25519Identity) PrivateKey() crypto.PrivateKey
func (*Ed25519Identity) PublicIdentity ¶
func (e *Ed25519Identity) PublicIdentity() (*PublicIdentity, error)
PublicIdentity converts public identity of the Ed25519 to be used in chain information
type IdentityStore ¶
type IdentityStore interface { Find(id string) (PrivateIdentity, error) List() ([]PrivateIdentity, error) }
IdentityStore to provide a means of looking up private identities and use them in consensus and DID/VC creation
type PrivateIdentity ¶
type PrivateIdentity interface { PrivateKey() crypto.PrivateKey PublicIdentity() (*PublicIdentity, error) }
PrivateIdentity contains the secret identity whilst providing a means of producting the public identity of a key
func GenerateBls12381G2Identity ¶
func GenerateBls12381G2Identity() (PrivateIdentity, error)
func GenerateEd25519Identity ¶
func GenerateEd25519Identity(rand io.Reader) (PrivateIdentity, error)
GenerateEd25519Identity generates a new Ed25519 private identity from a given random source
type PublicIdentity ¶
type PublicIdentity struct { ID string `msgpack:"i" json:"."` PublicKeys []PublicKey `msgpack:"p"` }
PublicIdentity holds the publicly available form of any secret key
func (*PublicIdentity) Matches ¶
func (pi *PublicIdentity) Matches(p *PublicIdentity) bool
Matches checks if a public identity matches another public identity by comparing if any public key is the same