Documentation ¶
Index ¶
- func IsAnyCanPayMatched(key *secp256k1.Secp256k1Key, scriptArgs []byte) (bool, error)
- func IsMultiSigMatched(key *secp256k1.Secp256k1Key, multisigScript *MultisigScript, scriptArgs []byte) (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 *transaction.ScriptGroup, ...) (bool, error)
- func PWLockSignTransaction(tx *types.Transaction, group *transaction.ScriptGroup, ...) (bool, error)
- func SingleSignTransaction(tx *types.Transaction, group *transaction.ScriptGroup, ...) (bool, error)
- type AnyCanPaySigner
- type MultisigScript
- func (r *MultisigScript) AddKeyHash(keyHash [20]byte)
- func (r *MultisigScript) AddKeyHashBySlice(keyHash []byte) error
- func (r *MultisigScript) ComputeHash() ([]byte, error)
- func (r *MultisigScript) Encode() []byte
- func (r *MultisigScript) WitnessPlaceholder(originalWitness []byte) ([]byte, error)
- func (r *MultisigScript) WitnessPlaceholderInLock() []byte
- type PWLockSigner
- type ScriptSigner
- type Secp256k1Blake160MultisigAllSigner
- type Secp256k1Blake160SighashAllSigner
- type TransactionSigner
- func (r *TransactionSigner) RegisterLockSigner(codeHash types.Hash, signer ScriptSigner) error
- func (r *TransactionSigner) RegisterSigner(codeHash types.Hash, scriptType transaction.ScriptType, signer ScriptSigner) error
- func (r *TransactionSigner) RegisterTypeSigner(codeHash types.Hash, signer ScriptSigner) error
- func (r *TransactionSigner) SignTransaction(tx *transaction.TransactionWithScriptGroups, contexts transaction.Contexts) ([]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, multisigScript *MultisigScript, 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 *transaction.ScriptGroup, key *secp256k1.Secp256k1Key, m *MultisigScript) (bool, error)
func PWLockSignTransaction ¶
func PWLockSignTransaction(tx *types.Transaction, group *transaction.ScriptGroup, key *secp256k1.Secp256k1Key) (bool, error)
func SingleSignTransaction ¶
func SingleSignTransaction(tx *types.Transaction, group *transaction.ScriptGroup, key *secp256k1.Secp256k1Key) (bool, error)
Types ¶
type AnyCanPaySigner ¶
type AnyCanPaySigner struct { }
func (*AnyCanPaySigner) SignTransaction ¶
func (s *AnyCanPaySigner) SignTransaction(transaction *types.Transaction, group *transaction.ScriptGroup, ctx *transaction.Context) (bool, error)
type MultisigScript ¶
func DecodeToMultisigScript ¶
func DecodeToMultisigScript(in []byte) (*MultisigScript, error)
func NewMultisigScript ¶
func NewMultisigScript(firstN byte, threshold byte) *MultisigScript
func (*MultisigScript) AddKeyHash ¶
func (r *MultisigScript) AddKeyHash(keyHash [20]byte)
func (*MultisigScript) AddKeyHashBySlice ¶
func (r *MultisigScript) AddKeyHashBySlice(keyHash []byte) error
func (*MultisigScript) ComputeHash ¶
func (r *MultisigScript) ComputeHash() ([]byte, error)
func (*MultisigScript) Encode ¶
func (r *MultisigScript) Encode() []byte
func (*MultisigScript) WitnessPlaceholder ¶
func (r *MultisigScript) WitnessPlaceholder(originalWitness []byte) ([]byte, error)
func (*MultisigScript) WitnessPlaceholderInLock ¶
func (r *MultisigScript) WitnessPlaceholderInLock() []byte
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(transaction *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) error
func (*TransactionSigner) RegisterSigner ¶
func (r *TransactionSigner) RegisterSigner(codeHash types.Hash, scriptType transaction.ScriptType, signer ScriptSigner) error
func (*TransactionSigner) RegisterTypeSigner ¶
func (r *TransactionSigner) RegisterTypeSigner(codeHash types.Hash, signer ScriptSigner) error
func (*TransactionSigner) SignTransaction ¶
func (r *TransactionSigner) SignTransaction(tx *transaction.TransactionWithScriptGroups, contexts transaction.Contexts) ([]int, error)
func (*TransactionSigner) SignTransactionByPrivateKeys ¶
func (r *TransactionSigner) SignTransactionByPrivateKeys(tx *transaction.TransactionWithScriptGroups, privKeys ...string) ([]int, error)
Click to show internal directories.
Click to hide internal directories.