fil

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeyFromSeed

func GenerateKeyFromSeed(seed io.Reader) ([]byte, error)

func PublicKey

func PublicKey(sk []byte) []byte

Types

type FileCoinExporter

type FileCoinExporter struct{}

func (*FileCoinExporter) Desc

func (exp *FileCoinExporter) Desc() string

func (*FileCoinExporter) Export

func (exp *FileCoinExporter) Export(key []byte) ([]byte, error)

func (*FileCoinExporter) KeySize

func (exp *FileCoinExporter) KeySize() int

func (*FileCoinExporter) Name

func (exp *FileCoinExporter) Name() string

type Key

type Key struct {
	KeyInfo
	PublicKey []byte
	Address   address.Address
}

func NewKey

func NewKey(keyinfo KeyInfo) (*Key, error)

type KeyInfo

type KeyInfo struct {
	Type       KeyType
	PrivateKey []byte
}

KeyInfo is used for storing keys in KeyStore

type KeyType

type KeyType string

KeyType defines a type of a key

const (
	KTSecp256k1     KeyType = "secp256k1"
	PrivateKeyBytes         = 32
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳