local

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActSigType

func ActSigType(typ types.KeyType) crypto.SigType

func WalletNew

func WalletNew(typ types.KeyType) (*types.KeyInfo, *address.Address, error)

WalletNew creates a new address in the wallet with the given sigType.

func WalletPrivateToAddress

func WalletPrivateToAddress(typ crypto.SigType, pk []byte) (*address.Address, error)

WalletPrivateToAddress convert private key to public key address

func WalletSign

func WalletSign(typ types.KeyType, pk []byte, data []byte) (*crypto.Signature, error)

WalletSign signs the given bytes using the KeyType and private key.

func WalletSignMessage

func WalletSignMessage(typ types.KeyType, pk []byte, msg *types.Message) (*types.SignedMessage, error)

WalletSignMessage signs the given message using the given private key.

func WalletVerify

func WalletVerify(sig *crypto.Signature, addr address.Address, msg []byte) error

WalletVerify verify the signed message

func WalletVerifyMessage

func WalletVerifyMessage(sm *types.SignedMessage) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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