kastx

package
v0.0.0-...-5ed304f Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// opcodes
	OP_EQUAL           = 0x87
	OP_BLAKE_2B        = 0xaa
	OP_CHECKSIG_ECDSA  = 0xab
	OP_CHECKSIG        = 0xac
	OP_CHECKSIG_VERIFY = 0xad

	// tx flags
	SIGHASH_ALL = 0x1
)
View Source
const (
	MaximumTxMass = 100000
)

Variables

This section is empty.

Functions

func AddressToScript

func AddressToScript(addr string, addrPrefix string) ([]byte, error)

func CalculateTxID

func CalculateTxID(txHex string) string

func CalculateTxMass

func CalculateTxMass(tx *protowire.RpcTransaction, txHex []byte) uint64

func GenerateTx

func GenerateTx(
	privKey *secp256k1.PrivateKey,
	inputs []*types.TxInput,
	outputs []*types.TxOutput,
	prefix string,
	feePerInput uint64,
) ([]byte, uint64, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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