txsigner

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: GPL-3.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = &TransactionSigner{}

Functions

func RefBlockNum

func RefBlockNum(blockNumber uint32) uint16

func RefBlockPrefix

func RefBlockPrefix(blockID string) (uint32, error)

func SignCanonical

func SignCanonical(privateKey, hash []byte) ([]byte, error)

Types

type SignedTransaction

type SignedTransaction struct {
	*types.Transaction
}

func NewSignedTransaction

func NewSignedTransaction(tx *types.Transaction) *SignedTransaction

func (*SignedTransaction) Digest

func (tx *SignedTransaction) Digest(chain string) ([]byte, error)

func (*SignedTransaction) ID

func (tx *SignedTransaction) ID() (string, error)

func (*SignedTransaction) Serialize

func (tx *SignedTransaction) Serialize() ([]byte, error)

type TransactionSigner

type TransactionSigner struct {
}

func (*TransactionSigner) SignTransactionHash

func (singer *TransactionSigner) SignTransactionHash(msg []byte, privateKey []byte, eccType uint32) ([]byte, error)

SignTransactionHash 交易哈希签名算法 required

func (*TransactionSigner) VerifyAndCombineSignature

func (singer *TransactionSigner) VerifyAndCombineSignature(msg, publicKey, signature []byte) (bool, []byte, error)

required

Jump to

Keyboard shortcuts

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