btc

package
v0.0.0-...-c04c664 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiffchangeInterval  uint32 = 2016
	TargetBlockSpacing  uint32 = 600
	DiffchangeTimespan  uint32 = DiffchangeInterval * TargetBlockSpacing
	CheckpointFeeAmount int64  = 1000
)

Variables

This section is empty.

Functions

func CalcMerkleRootFromNodes

func CalcMerkleRootFromNodes(nodes [][32]byte) []byte

func CalcTarget

func CalcTarget(timespan time.Duration, prevTarget *big.Int, maxTarget *big.Int) *big.Int

func CreateTx

func CreateTx(ins []types.Utxo, outs []types.Withdrawal, sigs map[types.SignatoryPubkey][][64]byte, set *types.SignatorySet) (*wire.MsgTx, error)

func DoubleHash

func DoubleHash(b []byte) [32]byte

func RedeemScript

func RedeemScript(set types.SignatorySet, data []byte) ([]byte, error)

func Reverse

func Reverse(b []byte) []byte

func Swap

func Swap(b []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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