initial addition of essential crypto, encoders, workflows and LLM instructions
This commit is contained in:
43
pkg/crypto/ec/wire/msgtx.go
Normal file
43
pkg/crypto/ec/wire/msgtx.go
Normal file
@@ -0,0 +1,43 @@
|
||||
package wire
|
||||
|
||||
import (
|
||||
"next.orly.dev/pkg/crypto/ec/chainhash"
|
||||
)
|
||||
|
||||
// OutPoint defines a bitcoin data type that is used to track previous
|
||||
// transaction outputs.
|
||||
type OutPoint struct {
|
||||
Hash chainhash.Hash
|
||||
Index uint32
|
||||
}
|
||||
|
||||
// TxWitness defines the witness for a TxIn. A witness is to be interpreted as
|
||||
// a slice of byte slices, or a stack with one or many elements.
|
||||
type TxWitness [][]byte
|
||||
|
||||
// TxIn defines a bitcoin transaction input.
|
||||
type TxIn struct {
|
||||
PreviousOutPoint OutPoint
|
||||
SignatureScript []byte
|
||||
Witness TxWitness
|
||||
Sequence uint32
|
||||
}
|
||||
|
||||
// TxOut defines a bitcoin transaction output.
|
||||
type TxOut struct {
|
||||
Value int64
|
||||
PkScript []byte
|
||||
}
|
||||
|
||||
// MsgTx implements the Message interface and represents a bitcoin tx message.
|
||||
// It is used to deliver transaction information in response to a getdata
|
||||
// message (MsgGetData) for a given transaction.
|
||||
//
|
||||
// Use the AddTxIn and AddTxOut functions to build up the list of transaction
|
||||
// inputs and outputs.
|
||||
type MsgTx struct {
|
||||
Version int32
|
||||
TxIn []*TxIn
|
||||
TxOut []*TxOut
|
||||
LockTime uint32
|
||||
}
|
||||
Reference in New Issue
Block a user