protoutil

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2021 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNameAvailability

func CheckNameAvailability(ctx context.Context, client pb.LookupServiceClient, name string) (bool, error)

func CreateSignedWithPOW

func CreateSignedWithPOW(privateKey *easyecc.PrivateKey, content []byte, powStrength int) (*pb.SignedWithPow, error)

CreateSignedWithPOW creates a request signed with the given private key and generates POW of the given strength.

func RegisterAddress

func RegisterAddress(ctx context.Context, client pb.IdentityServiceClient, key *easyecc.PrivateKey,
	targetKey *easyecc.PublicKey, name string, address string, powStrength int) error

func RegisterChildKey

func RegisterChildKey(ctx context.Context, client pb.IdentityServiceClient, key *easyecc.PrivateKey,
	childKey *easyecc.PublicKey, powStrength int) error

func RegisterKey

func RegisterKey(ctx context.Context, client pb.IdentityServiceClient, key *easyecc.PrivateKey, powStrength int) error

func RegisterName

func RegisterName(ctx context.Context, client pb.IdentityServiceClient, key *easyecc.PrivateKey,
	targetKey *easyecc.PublicKey, name string, powStrength int) error

func SendMessage

func SendMessage(ctx context.Context, privateKey *easyecc.PrivateKey, body []byte,
	sender, receiver string, lookupService pb.LookupServiceClient) error

func VerifySignature

func VerifySignature(sig *pb.Signature, serializedKey []byte, content []byte) bool

VerifySignature returns true if the provided signature is valid for the given key and content.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL