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 ¶
- Variables
- type AuthReader
- type MatrixEth
- type SignHelper
- func (sh *SignHelper) SetAccountManager(am *accounts.Manager) error
- func (sh *SignHelper) SetAuthReader(reader AuthReader) error
- func (sh *SignHelper) SetBadMsg(types string, arg1, arg2, arg3 uint32)
- func (sh *SignHelper) SignHashWithValidate(hash []byte, validate bool, blkHash common.Hash) (common.Signature, error)
- func (sh *SignHelper) SignHashWithValidateByAccount(hash []byte, validate bool, account common.Address) (common.Signature, error)
- func (sh *SignHelper) SignHashWithValidateByReader(reader AuthReader, hash []byte, validate bool, blkHash common.Hash) (common.Signature, error)
- func (sh *SignHelper) SignTx(tx types.SelfTransaction, chainID *big.Int, blkHash common.Hash, ...) (types.SelfTransaction, error)
- func (sh *SignHelper) SignVrf(msg []byte, blkHash common.Hash) ([]byte, []byte, []byte, error)
- func (sh *SignHelper) SignVrfByAccount(msg []byte, account common.Address) ([]byte, []byte, []byte, error)
- func (sh *SignHelper) VerifySignWithValidateByReader(reader AuthReader, signHash []byte, sig []byte, blkHash common.Hash) (common.Address, common.Address, bool, error)
- func (sh *SignHelper) VerifySignWithValidateDependHash(signHash []byte, sig []byte, blkHash common.Hash) (common.Address, common.Address, bool, error)
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 (*SignHelper) SignHashWithValidateByAccount ¶ added in v1.1.1
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) SignVrfByAccount ¶ added in v1.1.1
func (*SignHelper) VerifySignWithValidateByReader ¶ added in v1.1.1
Click to show internal directories.
Click to hide internal directories.