stamp

package module
v0.0.0-...-289c54c Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: GPL-2.0 Imports: 10 Imported by: 1

README

go-stamp-walllet

electronic stamp on block chain for BMail , BMail is an peer-2-peer encrypted email service

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoverJson

func RecoverJson(sig []byte, v interface{}) common.Address

func VerifyJsonSig

func VerifyJsonSig(mainAddr common.Address, sig []byte, v interface{}) bool

func VerifySig

func VerifySig(mainAddr common.Address, sig []byte, hash []byte) bool

Types

type SWallet

type SWallet struct {
	Version    int                 `json:"version"`
	Addr       common.Address      `json:"address"`
	Crypto     keystore.CryptoJSON `json:"crypto"`
	PrivateKey *ecdsa.PrivateKey   `json:"-"`
}

func (*SWallet) Address

func (sw *SWallet) Address() common.Address

func (*SWallet) ExportEth

func (sw *SWallet) ExportEth(auth, eAuth, path string) error

func (*SWallet) Open

func (sw *SWallet) Open(auth string) bool

func (*SWallet) PriKey

func (sw *SWallet) PriKey() *ecdsa.PrivateKey

func (*SWallet) SaveToPath

func (sw *SWallet) SaveToPath(path string) error

func (*SWallet) Sign

func (sw *SWallet) Sign(v []byte) ([]byte, error)

func (*SWallet) SignJson

func (sw *SWallet) SignJson(v interface{}) ([]byte, error)

func (*SWallet) String

func (sw *SWallet) String() string

type Wallet

type Wallet interface {
	String() string
	Address() common.Address
	Open(auth string) bool
	SaveToPath(path string) error
	SignJson(v interface{}) ([]byte, error)
	Sign(v []byte) ([]byte, error)
	ExportEth(auth, eAuth, path string) error
	PriKey() *ecdsa.PrivateKey
}

func NewWallet

func NewWallet(auth string) (Wallet, error)

func WalletOfJson

func WalletOfJson(jsonStr string) (Wallet, error)

func WalletOfPath

func WalletOfPath(path string) (Wallet, error)

Jump to

Keyboard shortcuts

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