tx

package
v0.0.0-...-3f76438 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package tx provides functions handling transactions

- Generate generates a new signed transaction from an input

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(b []byte) ([]byte, error)

Generate generates a transaction with signatures from given input.

Types

type In

type In struct {
	TxID         string `json:"txid"`
	Vout         uint32 `json:"vout"`
	ScriptPubKey string `json:"scriptpubkey"`
}

In contains necessary info to establish transaction message's TxIn items.

type Input

type Input struct {
	Ins  []In     `json:"ins"`
	Outs []Out    `json:"outs"`
	WIFs []string `json:"wifs"`
}

Input expresses an input to generate command that build transaction message with signatures.

type Out

type Out struct {
	Addr  string `json:"addr"`
	Value int64  `json:"value"`
}

Out contains necessary info to establish transaction message's TxOut items.

Jump to

Keyboard shortcuts

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