Documentation ¶
Overview ¶
Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or 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) 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 ¶
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 ¶
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 ¶
func (sh *SignHelper) SetAuthReader(reader AuthReader) error
func (*SignHelper) SignHashWithValidate ¶
func (*SignHelper) SignHashWithValidateByAccount ¶
func (*SignHelper) SignHashWithValidateByReader ¶
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 ¶
func (*SignHelper) VerifySignWithValidateByReader ¶
Click to show internal directories.
Click to hide internal directories.