signature

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const (
	RawSignatureTypeED25519 byte = iota
	RawSignatureTypeSECP256K1
)
View Source
const (
	SignatureTypeED25519   = SignatureType("ed25519")
	SignatureTypeSECP256K1 = SignatureType("secp256k1")
)

Variables

View Source
var (
	ErrInvalidSignature     = errors.New("invalid signature")
	ErrInvalidSignatureType = errors.New("invalid signature type")
)

Functions

This section is empty.

Types

type Base58Signature

type Base58Signature struct {
	Type  SignatureType
	Value string
}

func NewBase58Signature

func NewBase58Signature(raw string) (pk Base58Signature, err error)

func (Base58Signature) MarshalJSON

func (sig Base58Signature) MarshalJSON() ([]byte, error)

func (Base58Signature) String

func (sig Base58Signature) String() string

func (*Base58Signature) UnmarshalJSON

func (sig *Base58Signature) UnmarshalJSON(b []byte) (err error)

type Signature

type Signature [1 + ed25519.SignatureSize]byte

TODO: SECP256K1 support

func NewSignatureED25519

func NewSignatureED25519(data []byte) Signature

func (Signature) Type

func (s Signature) Type() byte

func (Signature) Value

func (s Signature) Value() []byte

type SignatureType

type SignatureType string

Jump to

Keyboard shortcuts

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