Documentation ¶
Index ¶
- func ChequeArgs(senderLock, receiverLock *types.Script) []byte
- func DecodeSudtAmount(in []byte) (*big.Int, error)
- func EncodeSudtAmount(amount *big.Int) []byte
- func GetCodeHash(network types.Network, script SystemScript) types.Hash
- func NewScript(script SystemScript, args []byte, network types.Network) *types.Script
- func Secp256K1Blake160SignhashAll(key *secp256k1.Secp256k1Key) *types.Script
- func Secp256K1Blake160SignhashAllByPublicKey(compressedPubKey []byte) (*types.Script, error)
- func Secp256k1Blake160Multisig(config *MultisigConfig) (*types.Script, error)
- type Info
- type MultisigConfig
- func (r *MultisigConfig) AddKeyHash(keyHash []byte)
- func (r *MultisigConfig) Encode() []byte
- func (r *MultisigConfig) Hash160() []byte
- func (r *MultisigConfig) WitnessEmptyPlaceholderInLock() []byte
- func (r *MultisigConfig) WitnessPlaceholder(originalWitness []byte) ([]byte, error)
- func (r *MultisigConfig) WitnessPlaceholderInLock() []byte
- type SystemScript
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChequeArgs ¶
ChequeArgs generates a args for cheque script
func EncodeSudtAmount ¶
func GetCodeHash ¶
func GetCodeHash(network types.Network, script SystemScript) types.Hash
func Secp256K1Blake160SignhashAll ¶
func Secp256K1Blake160SignhashAll(key *secp256k1.Secp256k1Key) *types.Script
func Secp256K1Blake160SignhashAllByPublicKey ¶
Secp256K1Blake160SignhashAllByPublicKey generates scep256k1_blake160_sighash_all script with 33-byte compressed public key
func Secp256k1Blake160Multisig ¶
func Secp256k1Blake160Multisig(config *MultisigConfig) (*types.Script, error)
Secp256k1Blake160Multisig generates scep256k1_blake160_multisig script.
Types ¶
type Info ¶
type MultisigConfig ¶
func DecodeToMultisigConfig ¶
func DecodeToMultisigConfig(in []byte) (*MultisigConfig, error)
func NewMultisigConfig ¶
func NewMultisigConfig(firstN byte, threshold byte) *MultisigConfig
func (*MultisigConfig) AddKeyHash ¶
func (r *MultisigConfig) AddKeyHash(keyHash []byte)
AddKeyHash adds key hash, and panic if keyHash is shorter than 20 bytes.
func (*MultisigConfig) Encode ¶
func (r *MultisigConfig) Encode() []byte
func (*MultisigConfig) Hash160 ¶
func (r *MultisigConfig) Hash160() []byte
func (*MultisigConfig) WitnessEmptyPlaceholderInLock ¶
func (r *MultisigConfig) WitnessEmptyPlaceholderInLock() []byte
func (*MultisigConfig) WitnessPlaceholder ¶
func (r *MultisigConfig) WitnessPlaceholder(originalWitness []byte) ([]byte, error)
func (*MultisigConfig) WitnessPlaceholderInLock ¶
func (r *MultisigConfig) WitnessPlaceholderInLock() []byte
type SystemScript ¶
type SystemScript uint
const ( Secp256k1Blake160SighashAll SystemScript = iota Secp256k1Blake160MultisigAll AnyoneCanPay Dao Sudt Cheque PwLock Omnilock )
Click to show internal directories.
Click to hide internal directories.