Documentation
¶
Index ¶
- Variables
- func BuildSignScript(signs *[][]byte) (*script.Script, error)
- func FakeSign(m uint32) (*script.Script, error)
- func GetAddressFromPubKey(pubKey *ec.PublicKey, isMain bool) (*script.Address, error)
- func GetAddressFromPublicKey(pubKey *ec.PublicKey, isMain bool) (*script.Address, error)
- func Lock(pubKeys []*ec.PublicKey, m int) (*script.Script, error)
- type FeePoolInfo
- type MultiSig
- type UTXO
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetAddressFromPubKey ¶
GetAddressFromPubKey is kept for backward compatibility.
func GetAddressFromPublicKey ¶
Types ¶
type FeePoolInfo ¶
func GetInfoFromTxOne ¶
func GetInfoFromTxOne( tx *transaction.Transaction, ) (info *FeePoolInfo, err error)
type MultiSig ¶
type MultiSig struct {
PrivateKeys []*ec.PrivateKey
PublicKeys []*ec.PublicKey
M int // Required signatures
N int // Total number of public keys
SigHashFlag *sighash.Flag
}
MultiSig represents an M-of-N multisig template
func Unlock ¶
func Unlock(privKeys []*ec.PrivateKey, pubKeys []*ec.PublicKey, m int, sigHashFlag *sighash.Flag) (*MultiSig, error)
Unlock creates a new MultiSig unlocking instance
func (*MultiSig) EstimateLength ¶
func (ms *MultiSig) EstimateLength(_ *transaction.Transaction, _ uint32) uint32
EstimateLength estimates the length of the unlocking script
func (*MultiSig) Sign ¶
func (ms *MultiSig) Sign(tx *transaction.Transaction, inputIndex uint32) (*script.Script, error)
Sign creates an unlocking script for the multisig
func (*MultiSig) SignOne ¶
func (ms *MultiSig) SignOne(tx *transaction.Transaction, inputIndex uint32, privateKey *ec.PrivateKey) (*[]byte, error)
分别签名
Click to show internal directories.
Click to hide internal directories.