signer

package
v2.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL