Documentation ¶
Index ¶
- func IsAnyCanPayMatched(key *secp256k1.Secp256k1Key, scriptArgs []byte) (bool, error)
- func IsMultiSigMatched(key *secp256k1.Secp256k1Key, config *systemscript.MultisigConfig, ...) (bool, error)
- func IsPWLockMatched(key *secp256k1.Secp256k1Key, scriptArgs []byte) bool
- func IsSingleSigMatched(key *secp256k1.Secp256k1Key, scriptArgs []byte) (bool, error)
- func MultiSignTransaction(tx *types.Transaction, group []int, key *secp256k1.Secp256k1Key, ...) (bool, error)
- func PWLockSignTransaction(tx *types.Transaction, group *transaction.ScriptGroup, ...) (bool, error)
- func SignTransaction(tx *types.Transaction, group []int, witnessPlaceholder []byte, key crypto.Key) ([]byte, error)
- type AnyCanPaySigner
- type OmnilockConfiguration
- type OmnilockMode
- type OmnilockSigner
- type PWLockSigner
- type ScriptSigner
- type Secp256k1Blake160MultisigAllSigner
- type Secp256k1Blake160SighashAllSigner
- type TransactionSigner
- func (r *TransactionSigner) RegisterLockSigner(codeHash types.Hash, signer ScriptSigner)
- func (r *TransactionSigner) RegisterSigner(codeHash types.Hash, scriptType types.ScriptType, signer ScriptSigner)
- func (r *TransactionSigner) RegisterTypeSigner(codeHash types.Hash, signer ScriptSigner)
- func (r *TransactionSigner) SignTransaction(tx *transaction.TransactionWithScriptGroups, contexts ...*transaction.Context) ([]int, error)
- func (r *TransactionSigner) SignTransactionByPrivateKeys(tx *transaction.TransactionWithScriptGroups, privKeys ...string) ([]int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAnyCanPayMatched ¶
func IsAnyCanPayMatched(key *secp256k1.Secp256k1Key, scriptArgs []byte) (bool, error)
func IsMultiSigMatched ¶
func IsMultiSigMatched(key *secp256k1.Secp256k1Key, config *systemscript.MultisigConfig, scriptArgs []byte) (bool, error)
func IsPWLockMatched ¶
func IsPWLockMatched(key *secp256k1.Secp256k1Key, scriptArgs []byte) bool
func IsSingleSigMatched ¶
func IsSingleSigMatched(key *secp256k1.Secp256k1Key, scriptArgs []byte) (bool, error)
func MultiSignTransaction ¶
func MultiSignTransaction(tx *types.Transaction, group []int, key *secp256k1.Secp256k1Key, config *systemscript.MultisigConfig) (bool, error)
func PWLockSignTransaction ¶
func PWLockSignTransaction(tx *types.Transaction, group *transaction.ScriptGroup, key *secp256k1.Secp256k1Key) (bool, error)
func SignTransaction ¶
func SignTransaction(tx *types.Transaction, group []int, witnessPlaceholder []byte, key crypto.Key) ([]byte, error)
SignTransaction signs transaction with index group and witness placeholder in secp256k1_blake160_sighash_all way
Types ¶
type AnyCanPaySigner ¶
type AnyCanPaySigner struct { }
func (*AnyCanPaySigner) SignTransaction ¶
func (s *AnyCanPaySigner) SignTransaction(tx *types.Transaction, group *transaction.ScriptGroup, ctx *transaction.Context) (bool, error)
type OmnilockConfiguration ¶
type OmnilockConfiguration struct { Args *omnilock.OmnilockArgs Mode OmnilockMode MultisigConfig *systemscript.MultisigConfig AdminListCell *types.CellDep OmnilockIdentity *omnilock.OmnilockIdentity }
type OmnilockMode ¶
type OmnilockMode uint
const ( OmnolockModeAuth OmnilockMode = 0 OmnolockModeAdministrator OmnilockMode = 1 )
type OmnilockSigner ¶
type OmnilockSigner struct { }
func (*OmnilockSigner) SignTransaction ¶
func (s *OmnilockSigner) SignTransaction(transaction *types.Transaction, group *transaction.ScriptGroup, ctx *transaction.Context) (bool, error)
type PWLockSigner ¶
type PWLockSigner struct { }
func (*PWLockSigner) SignTransaction ¶
func (s *PWLockSigner) SignTransaction(transaction *types.Transaction, group *transaction.ScriptGroup, ctx *transaction.Context) (bool, error)
type ScriptSigner ¶
type ScriptSigner interface {
SignTransaction(transaction *types.Transaction, group *transaction.ScriptGroup, ctx *transaction.Context) (bool, error)
}
type Secp256k1Blake160MultisigAllSigner ¶
type Secp256k1Blake160MultisigAllSigner struct { }
func (*Secp256k1Blake160MultisigAllSigner) SignTransaction ¶
func (s *Secp256k1Blake160MultisigAllSigner) SignTransaction(transaction *types.Transaction, group *transaction.ScriptGroup, ctx *transaction.Context) (bool, error)
type Secp256k1Blake160SighashAllSigner ¶
type Secp256k1Blake160SighashAllSigner struct { }
func (*Secp256k1Blake160SighashAllSigner) SignTransaction ¶
func (s *Secp256k1Blake160SighashAllSigner) SignTransaction(tx *types.Transaction, group *transaction.ScriptGroup, ctx *transaction.Context) (bool, error)
type TransactionSigner ¶
type TransactionSigner struct {
// contains filtered or unexported fields
}
func GetTransactionSignerInstance ¶
func GetTransactionSignerInstance(network types.Network) *TransactionSigner
func NewTransactionSigner ¶
func NewTransactionSigner() *TransactionSigner
func (*TransactionSigner) RegisterLockSigner ¶
func (r *TransactionSigner) RegisterLockSigner(codeHash types.Hash, signer ScriptSigner)
func (*TransactionSigner) RegisterSigner ¶
func (r *TransactionSigner) RegisterSigner(codeHash types.Hash, scriptType types.ScriptType, signer ScriptSigner)
func (*TransactionSigner) RegisterTypeSigner ¶
func (r *TransactionSigner) RegisterTypeSigner(codeHash types.Hash, signer ScriptSigner)
func (*TransactionSigner) SignTransaction ¶
func (r *TransactionSigner) SignTransaction(tx *transaction.TransactionWithScriptGroups, contexts ...*transaction.Context) ([]int, error)
func (*TransactionSigner) SignTransactionByPrivateKeys ¶
func (r *TransactionSigner) SignTransactionByPrivateKeys(tx *transaction.TransactionWithScriptGroups, privKeys ...string) ([]int, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.