Documentation
¶
Index ¶
- Variables
- type SigningInput
- func (*SigningInput) Descriptor() ([]byte, []int)deprecated
- func (x *SigningInput) GetAmount() int64
- func (x *SigningInput) GetByteFee() int64
- func (x *SigningInput) GetChangeAddress() string
- func (x *SigningInput) GetHashType() uint32
- func (x *SigningInput) GetLockTime() uint32
- func (x *SigningInput) GetToAddress() string
- func (x *SigningInput) GetUseMaxAmount() bool
- func (x *SigningInput) GetUtxo() []*UnspentTransaction
- func (*SigningInput) ProtoMessage()
- func (x *SigningInput) ProtoReflect() protoreflect.Message
- func (x *SigningInput) Reset()
- func (x *SigningInput) String() string
- type SigningOutput
- func (*SigningOutput) Descriptor() ([]byte, []int)deprecated
- func (x *SigningOutput) GetEncoded() []byte
- func (x *SigningOutput) GetEncodedHex() string
- func (x *SigningOutput) GetError() string
- func (x *SigningOutput) GetFee() int64
- func (x *SigningOutput) GetTransactionId() []byte
- func (x *SigningOutput) GetUsedUtxo() []*UsedUTXO
- func (*SigningOutput) ProtoMessage()
- func (x *SigningOutput) ProtoReflect() protoreflect.Message
- func (x *SigningOutput) Reset()
- func (x *SigningOutput) String() string
- type UnspentTransaction
- func (*UnspentTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *UnspentTransaction) GetAmount() int64
- func (x *UnspentTransaction) GetOutPointHash() []byte
- func (x *UnspentTransaction) GetOutPointIndex() uint32
- func (x *UnspentTransaction) GetOutPointSequence() uint32
- func (x *UnspentTransaction) GetScript() []byte
- func (*UnspentTransaction) ProtoMessage()
- func (x *UnspentTransaction) ProtoReflect() protoreflect.Message
- func (x *UnspentTransaction) Reset()
- func (x *UnspentTransaction) String() string
- type UsedUTXO
- func (*UsedUTXO) Descriptor() ([]byte, []int)deprecated
- func (x *UsedUTXO) GetAmount() int64
- func (x *UsedUTXO) GetOutPointHash() []byte
- func (x *UsedUTXO) GetOutPointIndex() uint32
- func (*UsedUTXO) ProtoMessage()
- func (x *UsedUTXO) ProtoReflect() protoreflect.Message
- func (x *UsedUTXO) Reset()
- func (x *UsedUTXO) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_txproto_bitcoin_bitcoin_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type SigningInput ¶
type SigningInput struct {
// SIGHASH type (default 0x01 = SIGHASH_ALL).
HashType uint32 `protobuf:"varint,1,opt,name=hash_type,json=hashType,proto3" json:"hash_type,omitempty"`
// Total amount to send to to_address, in satoshis.
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
// Fee per byte, in satoshis (used by the simple coin-selection plan).
ByteFee int64 `protobuf:"varint,3,opt,name=byte_fee,json=byteFee,proto3" json:"byte_fee,omitempty"`
// Recipient address (bech32 P2WPKH).
ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
// Change address (bech32 P2WPKH); receives the remainder.
ChangeAddress string `protobuf:"bytes,5,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"`
// Available UTXOs.
Utxo []*UnspentTransaction `protobuf:"bytes,6,rep,name=utxo,proto3" json:"utxo,omitempty"`
// Locktime (default 0).
LockTime uint32 `protobuf:"varint,7,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
// If set, send everything (minus fee) to to_address; no change output.
UseMaxAmount bool `protobuf:"varint,8,opt,name=use_max_amount,json=useMaxAmount,proto3" json:"use_max_amount,omitempty"`
// contains filtered or unexported fields
}
SigningInput mirrors a minimal subset of TW.Bitcoin.Proto.SigningInput, restricted to P2WPKH (BIP-143) spending.
func (*SigningInput) Descriptor
deprecated
func (*SigningInput) Descriptor() ([]byte, []int)
Deprecated: Use SigningInput.ProtoReflect.Descriptor instead.
func (*SigningInput) GetAmount ¶
func (x *SigningInput) GetAmount() int64
func (*SigningInput) GetByteFee ¶
func (x *SigningInput) GetByteFee() int64
func (*SigningInput) GetChangeAddress ¶
func (x *SigningInput) GetChangeAddress() string
func (*SigningInput) GetHashType ¶
func (x *SigningInput) GetHashType() uint32
func (*SigningInput) GetLockTime ¶
func (x *SigningInput) GetLockTime() uint32
func (*SigningInput) GetToAddress ¶
func (x *SigningInput) GetToAddress() string
func (*SigningInput) GetUseMaxAmount ¶
func (x *SigningInput) GetUseMaxAmount() bool
func (*SigningInput) GetUtxo ¶
func (x *SigningInput) GetUtxo() []*UnspentTransaction
func (*SigningInput) ProtoMessage ¶
func (*SigningInput) ProtoMessage()
func (*SigningInput) ProtoReflect ¶
func (x *SigningInput) ProtoReflect() protoreflect.Message
func (*SigningInput) Reset ¶
func (x *SigningInput) Reset()
func (*SigningInput) String ¶
func (x *SigningInput) String() string
type SigningOutput ¶
type SigningOutput struct {
// Fully signed raw transaction (wire format with witnesses).
Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"`
// Transaction id (double-SHA256 of the non-witness serialization), display
// (big-endian) byte order.
TransactionId []byte `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
// Hex of `encoded`.
EncodedHex string `protobuf:"bytes,3,opt,name=encoded_hex,json=encodedHex,proto3" json:"encoded_hex,omitempty"`
// The fee paid, in satoshis.
Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"`
// The UTXOs that were selected and spent.
UsedUtxo []*UsedUTXO `protobuf:"bytes,5,rep,name=used_utxo,json=usedUtxo,proto3" json:"used_utxo,omitempty"`
// Error message, empty on success.
Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
SigningOutput mirrors a minimal subset of TW.Bitcoin.Proto.SigningOutput.
func (*SigningOutput) Descriptor
deprecated
func (*SigningOutput) Descriptor() ([]byte, []int)
Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead.
func (*SigningOutput) GetEncoded ¶
func (x *SigningOutput) GetEncoded() []byte
func (*SigningOutput) GetEncodedHex ¶
func (x *SigningOutput) GetEncodedHex() string
func (*SigningOutput) GetError ¶
func (x *SigningOutput) GetError() string
func (*SigningOutput) GetFee ¶
func (x *SigningOutput) GetFee() int64
func (*SigningOutput) GetTransactionId ¶
func (x *SigningOutput) GetTransactionId() []byte
func (*SigningOutput) GetUsedUtxo ¶
func (x *SigningOutput) GetUsedUtxo() []*UsedUTXO
func (*SigningOutput) ProtoMessage ¶
func (*SigningOutput) ProtoMessage()
func (*SigningOutput) ProtoReflect ¶
func (x *SigningOutput) ProtoReflect() protoreflect.Message
func (*SigningOutput) Reset ¶
func (x *SigningOutput) Reset()
func (*SigningOutput) String ¶
func (x *SigningOutput) String() string
type UnspentTransaction ¶
type UnspentTransaction struct {
// Previous output point.
OutPointHash []byte `protobuf:"bytes,1,opt,name=out_point_hash,json=outPointHash,proto3" json:"out_point_hash,omitempty"` // 32-byte txid, internal (little-endian) byte order
OutPointIndex uint32 `protobuf:"varint,2,opt,name=out_point_index,json=outPointIndex,proto3" json:"out_point_index,omitempty"` // vout
OutPointSequence uint32 `protobuf:"varint,3,opt,name=out_point_sequence,json=outPointSequence,proto3" json:"out_point_sequence,omitempty"` // nSequence (default 0xffffffff)
// Value in satoshis.
Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
// scriptPubKey of the UTXO (P2WPKH: OP_0 <20-byte-hash>).
Script []byte `protobuf:"bytes,5,opt,name=script,proto3" json:"script,omitempty"`
// contains filtered or unexported fields
}
A single unspent transaction output available to spend.
func (*UnspentTransaction) Descriptor
deprecated
func (*UnspentTransaction) Descriptor() ([]byte, []int)
Deprecated: Use UnspentTransaction.ProtoReflect.Descriptor instead.
func (*UnspentTransaction) GetAmount ¶
func (x *UnspentTransaction) GetAmount() int64
func (*UnspentTransaction) GetOutPointHash ¶
func (x *UnspentTransaction) GetOutPointHash() []byte
func (*UnspentTransaction) GetOutPointIndex ¶
func (x *UnspentTransaction) GetOutPointIndex() uint32
func (*UnspentTransaction) GetOutPointSequence ¶
func (x *UnspentTransaction) GetOutPointSequence() uint32
func (*UnspentTransaction) GetScript ¶
func (x *UnspentTransaction) GetScript() []byte
func (*UnspentTransaction) ProtoMessage ¶
func (*UnspentTransaction) ProtoMessage()
func (*UnspentTransaction) ProtoReflect ¶
func (x *UnspentTransaction) ProtoReflect() protoreflect.Message
func (*UnspentTransaction) Reset ¶
func (x *UnspentTransaction) Reset()
func (*UnspentTransaction) String ¶
func (x *UnspentTransaction) String() string
type UsedUTXO ¶
type UsedUTXO struct {
OutPointHash []byte `protobuf:"bytes,1,opt,name=out_point_hash,json=outPointHash,proto3" json:"out_point_hash,omitempty"`
OutPointIndex uint32 `protobuf:"varint,2,opt,name=out_point_index,json=outPointIndex,proto3" json:"out_point_index,omitempty"`
Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
// contains filtered or unexported fields
}
One selected/used output point in the final transaction.
func (*UsedUTXO) Descriptor
deprecated
func (*UsedUTXO) GetOutPointHash ¶
func (*UsedUTXO) GetOutPointIndex ¶
func (*UsedUTXO) ProtoMessage ¶
func (*UsedUTXO) ProtoMessage()
func (*UsedUTXO) ProtoReflect ¶
func (x *UsedUTXO) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.