signhelper

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 License: MIT Imports: 13 Imported by: 39

Documentation

Overview

Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

Index

Constants

This section is empty.

Variables

View Source
var (
	ModeLog                  = "签名助手"
	ErrNilAccountManager     = errors.New("account manager is nil")
	ErrNilKeyStore           = errors.New("key store is nil")
	ErrKeyStoreCount         = errors.New("key stores is empty")
	ErrKeyStoreReflect       = errors.New("reflect key stores failed")
	ErrIllegalSignAccount    = errors.New("sign account is illegal")
	ErrReader                = errors.New("auth reader is nil")
	ErrGetAccountAndPassword = errors.New("get account and password  error")
)

Functions

This section is empty.

Types

type AuthReader added in v1.1.1

type AuthReader interface {
	GetSignAccountPassword(signAccounts []common.Address) (common.Address, string, error)
	GetA2AccountsFromA0Account(a0Account common.Address, blockHash common.Hash) ([]common.Address, error)
	GetA0AccountFromAnyAccount(account common.Address, blockHash common.Hash) (common.Address, common.Address, error)
	GetA2AccountsFromA0AccountAtSignHeight(a0Account common.Address, blockHash common.Hash, signHeight uint64) ([]common.Address, error)
	GetA0AccountFromAnyAccountAtSignHeight(account common.Address, blockHash common.Hash, signHeight uint64) (common.Address, common.Address, error)
}

type MatrixEth added in v1.1.1

type MatrixEth interface {
	BlockChain() *core.BlockChain
}

type SignHelper

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

func NewSignHelper

func NewSignHelper() *SignHelper

func (*SignHelper) SetAccountManager

func (sh *SignHelper) SetAccountManager(am *accounts.Manager) error

func (*SignHelper) SetAuthReader added in v1.1.1

func (sh *SignHelper) SetAuthReader(reader AuthReader) error

func (*SignHelper) SetBadMsg added in v1.1.2

func (sh *SignHelper) SetBadMsg(types string, arg1, arg2, arg3 uint32)

func (*SignHelper) SignHashWithValidate

func (sh *SignHelper) SignHashWithValidate(hash []byte, validate bool, blkHash common.Hash) (common.Signature, error)

func (*SignHelper) SignHashWithValidateByAccount added in v1.1.1

func (sh *SignHelper) SignHashWithValidateByAccount(hash []byte, validate bool, account common.Address) (common.Signature, error)

func (*SignHelper) SignHashWithValidateByReader added in v1.1.1

func (sh *SignHelper) SignHashWithValidateByReader(reader AuthReader, hash []byte, validate bool, blkHash common.Hash) (common.Signature, error)

func (*SignHelper) SignTx

func (sh *SignHelper) SignTx(tx types.SelfTransaction, chainID *big.Int, blkHash common.Hash, signHeight uint64, usingEntrust bool) (types.SelfTransaction, error)

func (*SignHelper) SignVrf added in v1.1.1

func (sh *SignHelper) SignVrf(msg []byte, blkHash common.Hash) ([]byte, []byte, []byte, error)

func (*SignHelper) SignVrfByAccount added in v1.1.1

func (sh *SignHelper) SignVrfByAccount(msg []byte, account common.Address) ([]byte, []byte, []byte, error)

func (*SignHelper) VerifySignWithValidateByReader added in v1.1.1

func (sh *SignHelper) VerifySignWithValidateByReader(reader AuthReader, signHash []byte, sig []byte, blkHash common.Hash) (common.Address, common.Address, bool, error)

func (*SignHelper) VerifySignWithValidateDependHash added in v1.1.1

func (sh *SignHelper) VerifySignWithValidateDependHash(signHash []byte, sig []byte, blkHash common.Hash) (common.Address, common.Address, bool, error)

Jump to

Keyboard shortcuts

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