package
Version:
v0.7.0
Opens a new window with list of versions in this module.
Published: Jun 7, 2021
License: ISC, BSD-3-Clause
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
tx
Cut down version of: github.com/bitgoin/tx
See that repo for further info
This has the following changes
- P2SH functions have been removed as they are not used by this program
- P2PK now call a better base58decoder
- the bigoin/address/DecodeAddress is broken and just drops the version byte
- this call was replace by function correctly decodes Bitcoin/Litecoin address versions
- now unsupported address will cause error rather than the original
generation of nonredeemable TXO
- P2PK will work with scriptPubKey.type of "scripthash" and "pubkeyhash"
Documentation
¶
DefaultP2PKScript returns default p2pk script.
FillP2PKsign embeds sign script to result Tx.
NewP2PKunsign creates msg.Tx from send infos without signing tx..
last index of sends must be refund address, and its amount must be 0..
Send is information about addrress and amount to send.
type Tx struct {
Version uint32
TxIn []*TxIn `len:"prefix"`
TxOut []*TxOut `len:"prefix"`
Locktime uint32
}
Tx describes a bitcoin transaction,
Pack packs Tx struct to bin.
TxIn is the info of input transaction.
type TxOut struct {
Value uint64
Script []byte `len:"prefix"`
}
TxOut is the info of output transaction.
CustomTx returns OP_RETURN txout with the custome data.
UTXO represents an available transaction.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.