account

package
v0.0.0-...-e1b380c Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Ed25519AccountType = "ed25519"

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account interface {
	Type() []byte
	PublicKey() []byte
	Sign(payload []byte) []byte
	Verify(payload []byte, signature []byte) bool
}

func GetAccount

func GetAccount(accountType string) (Account, error)

func GetAccountFromPublicKey

func GetAccountFromPublicKey(accountType string, publicKey []byte) (Account, error)

type Ed25519Account

type Ed25519Account struct {
	// contains filtered or unexported fields
}

func NewEd25519Account

func NewEd25519Account() *Ed25519Account

func NewEd25519AccountFromPublicKey

func NewEd25519AccountFromPublicKey(publicKey []byte) *Ed25519Account

func (*Ed25519Account) PublicKey

func (account *Ed25519Account) PublicKey() []byte

func (*Ed25519Account) Sign

func (account *Ed25519Account) Sign(payload []byte) []byte

func (*Ed25519Account) String

func (account *Ed25519Account) String() string

func (*Ed25519Account) Type

func (account *Ed25519Account) Type() []byte

func (*Ed25519Account) Verify

func (account *Ed25519Account) Verify(payload []byte, signature []byte) bool

type GenericAccount

type GenericAccount struct {
	Type      []byte
	PublicKey []byte
}

func (GenericAccount) String

func (g GenericAccount) String() string

func (GenericAccount) Verify

func (g GenericAccount) Verify(payload []byte, signature []byte) (bool, error)

Jump to

Keyboard shortcuts

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