Documentation ¶
Index ¶
- Constants
- Variables
- func AddInputsForTransaction(transaction *types.Transaction, inputs []*types.CellInput) ([]int, *types.WitnessArgs, error)
- func CalculateTransactionFee(tx *types.Transaction, feeRate uint64) (uint64, error)
- func MultiSignTransaction(transaction *types.Transaction, group []int, witnessArgs *types.WitnessArgs, ...) error
- func NewSecp256k1HybirdSigTx(scripts *utils.SystemScripts) *types.Transaction
- func NewSecp256k1MultiSigTx(scripts *utils.SystemScripts) *types.Transaction
- func NewSecp256k1SingleSigTx(scripts *utils.SystemScripts) *types.Transaction
- func SingleSegmentSignMessage(transaction *types.Transaction, start int, end int, ...) ([]byte, error)
- func SingleSegmentSignTransaction(transaction *types.Transaction, start int, end int, ...) error
- func SingleSignTransaction(transaction *types.Transaction, group []int, witnessArgs *types.WitnessArgs, ...) error
Constants ¶
View Source
const ( SECP256K1_BLAKE160_SIGHASH_ALL_DATA_HASH = "0x973bdb373cbb1d752b4ac006e2bb5bdcb63431ed2b6e394b22721c8906a2ad72" SECP256K1_BLAKE160_SIGHASH_ALL_TYPE_HASH = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8" SECP256K1_BLAKE160_MULTISIG_ALL_TYPE_HASH = "0x5c5069eb0857efc65e1bca0c07df34c31663b3622fd3876c876320fc9634e2a8" )
Variables ¶
Functions ¶
func AddInputsForTransaction ¶
func AddInputsForTransaction(transaction *types.Transaction, inputs []*types.CellInput) ([]int, *types.WitnessArgs, error)
func CalculateTransactionFee ¶
func CalculateTransactionFee(tx *types.Transaction, feeRate uint64) (uint64, error)
func MultiSignTransaction ¶
func MultiSignTransaction(transaction *types.Transaction, group []int, witnessArgs *types.WitnessArgs, serialize []byte, keys ...crypto.Key) error
func NewSecp256k1HybirdSigTx ¶
func NewSecp256k1HybirdSigTx(scripts *utils.SystemScripts) *types.Transaction
func NewSecp256k1MultiSigTx ¶
func NewSecp256k1MultiSigTx(scripts *utils.SystemScripts) *types.Transaction
func NewSecp256k1SingleSigTx ¶
func NewSecp256k1SingleSigTx(scripts *utils.SystemScripts) *types.Transaction
func SingleSegmentSignMessage ¶
func SingleSegmentSignMessage(transaction *types.Transaction, start int, end int, witnessArgs *types.WitnessArgs) ([]byte, error)
func SingleSegmentSignTransaction ¶
func SingleSegmentSignTransaction(transaction *types.Transaction, start int, end int, witnessArgs *types.WitnessArgs, key crypto.Key) error
func SingleSignTransaction ¶
func SingleSignTransaction(transaction *types.Transaction, group []int, witnessArgs *types.WitnessArgs, key crypto.Key) error
group is an array, which content is the index of input after grouping
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.