bigbangTransaction

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 (
	DefaultVersion   = uint16(1)
	TxType_Token     = uint16(0)
	DefaultLockUntil = uint32(0)
)

Variables

This section is empty.

Functions

func CreateEmptyTransactionAndHash

func CreateEmptyTransactionAndHash(lockUntil uint32, anchor string, inputs []Vin, to string, amount, fee uint64, data string) (string, string, error)

func SignTransactionHash

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

func VerifyAndCombineTransaction

func VerifyAndCombineTransaction(emptyTrans, signature string, pubkey []byte) (bool, string)

Types

type TxIn

type TxIn struct {
	TxID []byte
	Vout byte
}

func NewTxIn

func NewTxIn(txid string, vout byte) (*TxIn, error)

func (TxIn) ToBytes

func (id TxIn) ToBytes() []byte

type TxStruct

type TxStruct struct {
	Version   []byte
	Type      []byte
	Time      []byte
	LockUntil []byte
	Anchor    []byte
	Vins      []*TxIn
	To        []byte
	Amount    []byte
	Fee       []byte
	Data      []byte
}

func NewTxStruct

func NewTxStruct(version, txtype uint16, timestamp, lockUntil uint32, anchor string, inputs []Vin, to string, amount, fee uint64, data string) (*TxStruct, error)

func (TxStruct) GetHash

func (tx TxStruct) GetHash() []byte

func (TxStruct) ToBytes

func (tx TxStruct) ToBytes() []byte

type Vin

type Vin struct {
	TxID string
	Vout byte
}

Jump to

Keyboard shortcuts

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