mateverseTransaction

package
v1.2.27 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultTxVersion         = uint32(0x04)
	SigHashAll               = uint32(0x01)
	OpCheckAttenuationVerify = "b2"
	OpDup                    = "76"
	OpHash160                = "a9"
	OpEqualVerify            = "88"
	OpCheckSig               = "ac"
)

Variables

View Source
var (
	CurveOrder     = []byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBA, 0xAE, 0xDC, 0xE6, 0xAF, 0x48, 0xA0, 0x3B, 0xBF, 0xD2, 0x5E, 0x8C, 0xD0, 0x36, 0x41, 0x41}
	HalfCurveOrder = []byte{0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5D, 0x57, 0x6E, 0x73, 0x57, 0xA4, 0x50, 0x1D, 0xDF, 0xE9, 0x2F, 0x46, 0x68, 0x1B, 0x20, 0xA0}
)

Functions

func GetSigHash

func GetSigHash(emptyTrans string, inputs *[]*TxInput) error

func SignTransaction

func SignTransaction(hash string, prikey []byte) (string, error)

func VerifyAndCombineTransaction

func VerifyAndCombineTransaction(emptyTrans string, inputs []*TxInput) (bool, string)

Types

type SignaturePubkey

type SignaturePubkey struct {
	Signature []byte
	Pubkey    []byte
}

type TxInput

type TxInput struct {
	// contains filtered or unexported fields
}

func GetInputsFromEmptyRawTransaction

func GetInputsFromEmptyRawTransaction(emptyTrans string) ([]*TxInput, error)

func (*TxInput) GetHash

func (tx *TxInput) GetHash() string

func (*TxInput) GetTxID

func (tx *TxInput) GetTxID() string

func (*TxInput) GetVout

func (tx *TxInput) GetVout() uint32

func (*TxInput) SetLockScript

func (tx *TxInput) SetLockScript(script string)

func (*TxInput) SetPubKey

func (tx *TxInput) SetPubKey(pubkey string)

func (*TxInput) SetSignature

func (tx *TxInput) SetSignature(signature string)

Jump to

Keyboard shortcuts

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