Documentation
¶
Index ¶
- Variables
- type HashPublicKey
- func (*HashPublicKey) Descriptor() ([]byte, []int)deprecated
- func (x *HashPublicKey) GetDataHash() []byte
- func (x *HashPublicKey) GetPublicKeyHash() []byte
- func (*HashPublicKey) ProtoMessage()
- func (x *HashPublicKey) ProtoReflect() protoreflect.Message
- func (x *HashPublicKey) Reset()
- func (x *HashPublicKey) String() string
- type OutPoint
- func (*OutPoint) Descriptor() ([]byte, []int)deprecated
- func (x *OutPoint) GetHash() []byte
- func (x *OutPoint) GetIndex() uint32
- func (x *OutPoint) GetSequence() uint32
- func (x *OutPoint) GetTree() int32
- func (*OutPoint) ProtoMessage()
- func (x *OutPoint) ProtoReflect() protoreflect.Message
- func (x *OutPoint) Reset()
- func (x *OutPoint) String() string
- type OutputAddress
- func (*OutputAddress) Descriptor() ([]byte, []int)deprecated
- func (x *OutputAddress) GetAmount() int64
- func (x *OutputAddress) GetToAddress() string
- func (*OutputAddress) ProtoMessage()
- func (x *OutputAddress) ProtoReflect() protoreflect.Message
- func (x *OutputAddress) Reset()
- func (x *OutputAddress) String() string
- type OutputIndex
- type PreSigningOutput
- func (*PreSigningOutput) Descriptor() ([]byte, []int)deprecated
- func (x *PreSigningOutput) GetError() common.SigningError
- func (x *PreSigningOutput) GetErrorMessage() string
- func (x *PreSigningOutput) GetHashPublicKeys() []*HashPublicKey
- func (x *PreSigningOutput) GetPreSigningResultV2() *bitcoinv2.PreSigningOutput
- func (*PreSigningOutput) ProtoMessage()
- func (x *PreSigningOutput) ProtoReflect() protoreflect.Message
- func (x *PreSigningOutput) Reset()
- func (x *PreSigningOutput) String() string
- 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) GetCoinType() uint32
- func (x *SigningInput) GetDisableDustFilter() bool
- func (x *SigningInput) GetDustPolicy() isSigningInput_DustPolicy
- func (x *SigningInput) GetExtraOutputs() []*OutputAddress
- func (x *SigningInput) GetFixedDustThreshold() int64
- func (x *SigningInput) GetHashType() uint32
- func (x *SigningInput) GetLockTime() uint32
- func (x *SigningInput) GetOutputOpReturn() []byte
- func (x *SigningInput) GetOutputOpReturnIndex() *OutputIndex
- func (x *SigningInput) GetPlan() *TransactionPlan
- func (x *SigningInput) GetPrivateKey() [][]byte
- func (x *SigningInput) GetScripts() map[string][]byte
- func (x *SigningInput) GetSigningV2() *bitcoinv2.SigningInput
- func (x *SigningInput) GetTime() uint32
- func (x *SigningInput) GetToAddress() string
- func (x *SigningInput) GetUseMaxAmount() bool
- func (x *SigningInput) GetUseMaxUtxo() bool
- func (x *SigningInput) GetUtxo() []*UnspentTransaction
- func (x *SigningInput) GetZip_0317() bool
- func (*SigningInput) ProtoMessage()
- func (x *SigningInput) ProtoReflect() protoreflect.Message
- func (x *SigningInput) Reset()
- func (x *SigningInput) String() string
- type SigningInput_FixedDustThreshold
- type SigningOutput
- func (*SigningOutput) Descriptor() ([]byte, []int)deprecated
- func (x *SigningOutput) GetEncoded() []byte
- func (x *SigningOutput) GetError() common.SigningError
- func (x *SigningOutput) GetErrorMessage() string
- func (x *SigningOutput) GetSigningResultV2() *bitcoinv2.SigningOutput
- func (x *SigningOutput) GetTransaction() *Transaction
- func (x *SigningOutput) GetTransactionId() string
- func (*SigningOutput) ProtoMessage()
- func (x *SigningOutput) ProtoReflect() protoreflect.Message
- func (x *SigningOutput) Reset()
- func (x *SigningOutput) String() string
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetInputs() []*TransactionInput
- func (x *Transaction) GetLockTime() uint32
- func (x *Transaction) GetOutputs() []*TransactionOutput
- func (x *Transaction) GetVersion() int32
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type TransactionInput
- func (*TransactionInput) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionInput) GetPreviousOutput() *OutPoint
- func (x *TransactionInput) GetScript() []byte
- func (x *TransactionInput) GetSequence() uint32
- func (*TransactionInput) ProtoMessage()
- func (x *TransactionInput) ProtoReflect() protoreflect.Message
- func (x *TransactionInput) Reset()
- func (x *TransactionInput) String() string
- type TransactionOutput
- func (*TransactionOutput) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionOutput) GetScript() []byte
- func (x *TransactionOutput) GetSpendingScript() []byte
- func (x *TransactionOutput) GetValue() int64
- func (*TransactionOutput) ProtoMessage()
- func (x *TransactionOutput) ProtoReflect() protoreflect.Message
- func (x *TransactionOutput) Reset()
- func (x *TransactionOutput) String() string
- type TransactionPlan
- func (*TransactionPlan) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionPlan) GetAmount() int64
- func (x *TransactionPlan) GetAvailableAmount() int64
- func (x *TransactionPlan) GetBranchId() []byte
- func (x *TransactionPlan) GetChange() int64
- func (x *TransactionPlan) GetError() common.SigningError
- func (x *TransactionPlan) GetFee() int64
- func (x *TransactionPlan) GetOutputOpReturn() []byte
- func (x *TransactionPlan) GetOutputOpReturnIndex() *OutputIndex
- func (x *TransactionPlan) GetPlanningResultV2() *bitcoinv2.TransactionPlan
- func (x *TransactionPlan) GetPreblockhash() []byte
- func (x *TransactionPlan) GetPreblockheight() int64
- func (x *TransactionPlan) GetUtxos() []*UnspentTransaction
- func (*TransactionPlan) ProtoMessage()
- func (x *TransactionPlan) ProtoReflect() protoreflect.Message
- func (x *TransactionPlan) Reset()
- func (x *TransactionPlan) String() string
- type TransactionVariant
- func (TransactionVariant) Descriptor() protoreflect.EnumDescriptor
- func (x TransactionVariant) Enum() *TransactionVariant
- func (TransactionVariant) EnumDescriptor() ([]byte, []int)deprecated
- func (x TransactionVariant) Number() protoreflect.EnumNumber
- func (x TransactionVariant) String() string
- func (TransactionVariant) Type() protoreflect.EnumType
- type UnspentTransaction
- func (*UnspentTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *UnspentTransaction) GetAmount() int64
- func (x *UnspentTransaction) GetOutPoint() *OutPoint
- func (x *UnspentTransaction) GetScript() []byte
- func (x *UnspentTransaction) GetSpendingScript() []byte
- func (x *UnspentTransaction) GetVariant() TransactionVariant
- func (*UnspentTransaction) ProtoMessage()
- func (x *UnspentTransaction) ProtoReflect() protoreflect.Message
- func (x *UnspentTransaction) Reset()
- func (x *UnspentTransaction) String() string
Constants ¶
This section is empty.
Variables ¶
var ( TransactionVariant_name = map[int32]string{ 0: "P2PKH", 1: "P2WPKH", 2: "P2TRKEYPATH", 3: "BRC20TRANSFER", 4: "NFTINSCRIPTION", } TransactionVariant_value = map[string]int32{ "P2PKH": 0, "P2WPKH": 1, "P2TRKEYPATH": 2, "BRC20TRANSFER": 3, "NFTINSCRIPTION": 4, } )
Enum value maps for TransactionVariant.
var File_Bitcoin_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type HashPublicKey ¶
type HashPublicKey struct {
// / Pre-image data hash that will be used for signing
DataHash []byte `protobuf:"bytes,1,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
// / public key hash used for signing
PublicKeyHash []byte `protobuf:"bytes,2,opt,name=public_key_hash,json=publicKeyHash,proto3" json:"public_key_hash,omitempty"`
// contains filtered or unexported fields
}
/ Pre-image hash to be used for signing
func (*HashPublicKey) Descriptor
deprecated
func (*HashPublicKey) Descriptor() ([]byte, []int)
Deprecated: Use HashPublicKey.ProtoReflect.Descriptor instead.
func (*HashPublicKey) GetDataHash ¶
func (x *HashPublicKey) GetDataHash() []byte
func (*HashPublicKey) GetPublicKeyHash ¶
func (x *HashPublicKey) GetPublicKeyHash() []byte
func (*HashPublicKey) ProtoMessage ¶
func (*HashPublicKey) ProtoMessage()
func (*HashPublicKey) ProtoReflect ¶
func (x *HashPublicKey) ProtoReflect() protoreflect.Message
func (*HashPublicKey) Reset ¶
func (x *HashPublicKey) Reset()
func (*HashPublicKey) String ¶
func (x *HashPublicKey) String() string
type OutPoint ¶
type OutPoint struct {
// The hash of the referenced transaction (network byte order, usually needs to be reversed).
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
// The index of the specific output in the transaction.
Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
// Transaction version as defined by the sender.
Sequence uint32 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"`
// The tree in utxo, only works for DCR
Tree int32 `protobuf:"varint,4,opt,name=tree,proto3" json:"tree,omitempty"`
// contains filtered or unexported fields
}
Bitcoin transaction out-point reference.
func (*OutPoint) Descriptor
deprecated
func (*OutPoint) GetSequence ¶
func (*OutPoint) ProtoMessage ¶
func (*OutPoint) ProtoMessage()
func (*OutPoint) ProtoReflect ¶
func (x *OutPoint) ProtoReflect() protoreflect.Message
type OutputAddress ¶
type OutputAddress struct {
// Destination address
ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
// Amount to be paid to this output
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
// contains filtered or unexported fields
}
Pair of destination address and amount, used for extra outputs
func (*OutputAddress) Descriptor
deprecated
func (*OutputAddress) Descriptor() ([]byte, []int)
Deprecated: Use OutputAddress.ProtoReflect.Descriptor instead.
func (*OutputAddress) GetAmount ¶
func (x *OutputAddress) GetAmount() int64
func (*OutputAddress) GetToAddress ¶
func (x *OutputAddress) GetToAddress() string
func (*OutputAddress) ProtoMessage ¶
func (*OutputAddress) ProtoMessage()
func (*OutputAddress) ProtoReflect ¶
func (x *OutputAddress) ProtoReflect() protoreflect.Message
func (*OutputAddress) Reset ¶
func (x *OutputAddress) Reset()
func (*OutputAddress) String ¶
func (x *OutputAddress) String() string
type OutputIndex ¶
type OutputIndex struct {
Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
// contains filtered or unexported fields
}
Optional index of a corresponding output in the transaction.
func (*OutputIndex) Descriptor
deprecated
func (*OutputIndex) Descriptor() ([]byte, []int)
Deprecated: Use OutputIndex.ProtoReflect.Descriptor instead.
func (*OutputIndex) GetIndex ¶
func (x *OutputIndex) GetIndex() uint32
func (*OutputIndex) ProtoMessage ¶
func (*OutputIndex) ProtoMessage()
func (*OutputIndex) ProtoReflect ¶
func (x *OutputIndex) ProtoReflect() protoreflect.Message
func (*OutputIndex) Reset ¶
func (x *OutputIndex) Reset()
func (*OutputIndex) String ¶
func (x *OutputIndex) String() string
type PreSigningOutput ¶
type PreSigningOutput struct {
// / hash, public key list
HashPublicKeys []*HashPublicKey `protobuf:"bytes,1,rep,name=hash_public_keys,json=hashPublicKeys,proto3" json:"hash_public_keys,omitempty"`
// / error code, 0 is ok, other codes will be treated as errors
Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"`
// / error description
ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// Result of a transaction pre-signing using the Bitcoin 2.0 protocol.
// Set if `Bitcoin.Proto.SigningInput.signing_v2` used.
PreSigningResultV2 *bitcoinv2.PreSigningOutput `protobuf:"bytes,7,opt,name=pre_signing_result_v2,json=preSigningResultV2,proto3" json:"pre_signing_result_v2,omitempty"`
// contains filtered or unexported fields
}
/ Transaction pre-signing output
func (*PreSigningOutput) Descriptor
deprecated
func (*PreSigningOutput) Descriptor() ([]byte, []int)
Deprecated: Use PreSigningOutput.ProtoReflect.Descriptor instead.
func (*PreSigningOutput) GetError ¶
func (x *PreSigningOutput) GetError() common.SigningError
func (*PreSigningOutput) GetErrorMessage ¶
func (x *PreSigningOutput) GetErrorMessage() string
func (*PreSigningOutput) GetHashPublicKeys ¶
func (x *PreSigningOutput) GetHashPublicKeys() []*HashPublicKey
func (*PreSigningOutput) GetPreSigningResultV2 ¶
func (x *PreSigningOutput) GetPreSigningResultV2() *bitcoinv2.PreSigningOutput
func (*PreSigningOutput) ProtoMessage ¶
func (*PreSigningOutput) ProtoMessage()
func (*PreSigningOutput) ProtoReflect ¶
func (x *PreSigningOutput) ProtoReflect() protoreflect.Message
func (*PreSigningOutput) Reset ¶
func (x *PreSigningOutput) Reset()
func (*PreSigningOutput) String ¶
func (x *PreSigningOutput) String() string
type SigningInput ¶
type SigningInput struct {
// Hash type to use when signing.
HashType uint32 `protobuf:"varint,1,opt,name=hash_type,json=hashType,proto3" json:"hash_type,omitempty"`
// Amount to send. Transaction created will have this amount in its output,
// except when use_max_amount is set, in that case this amount is not relevant, maximum possible amount will be used (max avail less fee).
// If amount is equal or more than the available amount, also max amount will be used.
Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
// Transaction fee rate, satoshis per byte, used to compute required fee (when planning)
ByteFee int64 `protobuf:"varint,3,opt,name=byte_fee,json=byteFee,proto3" json:"byte_fee,omitempty"`
// Recipient's address, as string.
ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
// Change address, as string.
ChangeAddress string `protobuf:"bytes,5,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"`
// The available secret private key or keys required for signing (32 bytes each).
PrivateKey [][]byte `protobuf:"bytes,6,rep,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
// Available redeem scripts indexed by script hash.
Scripts map[string][]byte `` /* 141-byte string literal not displayed */
// Available input unspent transaction outputs.
Utxo []*UnspentTransaction `protobuf:"bytes,8,rep,name=utxo,proto3" json:"utxo,omitempty"`
// Set if sending max amount is requested.
UseMaxAmount bool `protobuf:"varint,9,opt,name=use_max_amount,json=useMaxAmount,proto3" json:"use_max_amount,omitempty"`
// Coin type (used by forks).
CoinType uint32 `protobuf:"varint,10,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"`
// Optional transaction plan. If missing, plan will be computed.
Plan *TransactionPlan `protobuf:"bytes,11,opt,name=plan,proto3" json:"plan,omitempty"`
// Optional lockTime, default value 0 means no time locking.
// If all inputs have final (`0xffffffff`) sequence numbers then `lockTime` is irrelevant.
// Otherwise, the transaction may not be added to a block until after `lockTime`.
//
// value < 500000000 : Block number at which this transaction is unlocked
// value >= 500000000 : UNIX timestamp at which this transaction is unlocked
LockTime uint32 `protobuf:"varint,12,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
// Optional zero-amount, OP_RETURN output
OutputOpReturn []byte `protobuf:"bytes,13,opt,name=output_op_return,json=outputOpReturn,proto3" json:"output_op_return,omitempty"`
// Optional index of the OP_RETURN output in the transaction.
// If not set, OP_RETURN output will be pushed as the latest output.
OutputOpReturnIndex *OutputIndex `protobuf:"bytes,26,opt,name=output_op_return_index,json=outputOpReturnIndex,proto3" json:"output_op_return_index,omitempty"`
// Optional additional destination addresses, additional to first to_address output
ExtraOutputs []*OutputAddress `protobuf:"bytes,14,rep,name=extra_outputs,json=extraOutputs,proto3" json:"extra_outputs,omitempty"`
// If use max utxo.
UseMaxUtxo bool `protobuf:"varint,15,opt,name=use_max_utxo,json=useMaxUtxo,proto3" json:"use_max_utxo,omitempty"`
// If disable dust filter.
DisableDustFilter bool `protobuf:"varint,16,opt,name=disable_dust_filter,json=disableDustFilter,proto3" json:"disable_dust_filter,omitempty"`
// transaction creation time that will be used for verge(xvg)
Time uint32 `protobuf:"varint,17,opt,name=time,proto3" json:"time,omitempty"`
// Whether to calculate the fee according to ZIP-0317 for the given transaction
// https://zips.z.cash/zip-0317#fee-calculation
Zip_0317 bool `protobuf:"varint,18,opt,name=zip_0317,json=zip0317,proto3" json:"zip_0317,omitempty"`
// If set, uses Bitcoin 2.0 Signing protocol.
// As a result, `Bitcoin.Proto.SigningOutput.signing_result_v2` is set.
SigningV2 *bitcoinv2.SigningInput `protobuf:"bytes,21,opt,name=signing_v2,json=signingV2,proto3" json:"signing_v2,omitempty"`
// One of the "Dust" amount policies.
// Later, we plan to add support for `DynamicDust` policy with a `min_relay_fee` amount.
//
// Types that are valid to be assigned to DustPolicy:
//
// *SigningInput_FixedDustThreshold
DustPolicy isSigningInput_DustPolicy `protobuf_oneof:"dust_policy"`
// contains filtered or unexported fields
}
Input data necessary to create a signed transaction.
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) GetCoinType ¶
func (x *SigningInput) GetCoinType() uint32
func (*SigningInput) GetDisableDustFilter ¶
func (x *SigningInput) GetDisableDustFilter() bool
func (*SigningInput) GetDustPolicy ¶
func (x *SigningInput) GetDustPolicy() isSigningInput_DustPolicy
func (*SigningInput) GetExtraOutputs ¶
func (x *SigningInput) GetExtraOutputs() []*OutputAddress
func (*SigningInput) GetFixedDustThreshold ¶
func (x *SigningInput) GetFixedDustThreshold() int64
func (*SigningInput) GetHashType ¶
func (x *SigningInput) GetHashType() uint32
func (*SigningInput) GetLockTime ¶
func (x *SigningInput) GetLockTime() uint32
func (*SigningInput) GetOutputOpReturn ¶
func (x *SigningInput) GetOutputOpReturn() []byte
func (*SigningInput) GetOutputOpReturnIndex ¶
func (x *SigningInput) GetOutputOpReturnIndex() *OutputIndex
func (*SigningInput) GetPlan ¶
func (x *SigningInput) GetPlan() *TransactionPlan
func (*SigningInput) GetPrivateKey ¶
func (x *SigningInput) GetPrivateKey() [][]byte
func (*SigningInput) GetScripts ¶
func (x *SigningInput) GetScripts() map[string][]byte
func (*SigningInput) GetSigningV2 ¶
func (x *SigningInput) GetSigningV2() *bitcoinv2.SigningInput
func (*SigningInput) GetTime ¶
func (x *SigningInput) GetTime() uint32
func (*SigningInput) GetToAddress ¶
func (x *SigningInput) GetToAddress() string
func (*SigningInput) GetUseMaxAmount ¶
func (x *SigningInput) GetUseMaxAmount() bool
func (*SigningInput) GetUseMaxUtxo ¶
func (x *SigningInput) GetUseMaxUtxo() bool
func (*SigningInput) GetUtxo ¶
func (x *SigningInput) GetUtxo() []*UnspentTransaction
func (*SigningInput) GetZip_0317 ¶
func (x *SigningInput) GetZip_0317() bool
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 SigningInput_FixedDustThreshold ¶
type SigningInput_FixedDustThreshold struct {
// Use a constant "Dust" threshold.
FixedDustThreshold int64 `protobuf:"varint,24,opt,name=fixed_dust_threshold,json=fixedDustThreshold,proto3,oneof"`
}
type SigningOutput ¶
type SigningOutput struct {
// Resulting transaction.
Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
// Signed and encoded transaction bytes.
Encoded []byte `protobuf:"bytes,2,opt,name=encoded,proto3" json:"encoded,omitempty"`
// Transaction ID (hash)
TransactionId string `protobuf:"bytes,3,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
// Optional error
Error common.SigningError `protobuf:"varint,4,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"`
// error description
ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// Result of a transaction signing using the Bitcoin 2.0 protocol.
// Set if `Bitcoin.Proto.SigningInput.signing_v2` used.
SigningResultV2 *bitcoinv2.SigningOutput `protobuf:"bytes,7,opt,name=signing_result_v2,json=signingResultV2,proto3" json:"signing_result_v2,omitempty"`
// contains filtered or unexported fields
}
Result containing the signed and encoded transaction. Note that the amount may be different than the requested amount to account for fees and available funds.
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) GetError ¶
func (x *SigningOutput) GetError() common.SigningError
func (*SigningOutput) GetErrorMessage ¶
func (x *SigningOutput) GetErrorMessage() string
func (*SigningOutput) GetSigningResultV2 ¶
func (x *SigningOutput) GetSigningResultV2() *bitcoinv2.SigningOutput
func (*SigningOutput) GetTransaction ¶
func (x *SigningOutput) GetTransaction() *Transaction
func (*SigningOutput) GetTransactionId ¶
func (x *SigningOutput) GetTransactionId() string
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 Transaction ¶
type Transaction struct {
// Transaction data format version.
Version int32 `protobuf:"zigzag32,1,opt,name=version,proto3" json:"version,omitempty"`
// The block number or timestamp at which this transaction is unlocked.
LockTime uint32 `protobuf:"varint,2,opt,name=lockTime,proto3" json:"lockTime,omitempty"`
// A list of 1 or more transaction inputs or sources for coins.
Inputs []*TransactionInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"`
// A list of 1 or more transaction outputs or destinations for coins.
Outputs []*TransactionOutput `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"`
// contains filtered or unexported fields
}
A transaction, with its inputs and outputs
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetInputs ¶
func (x *Transaction) GetInputs() []*TransactionInput
func (*Transaction) GetLockTime ¶
func (x *Transaction) GetLockTime() uint32
func (*Transaction) GetOutputs ¶
func (x *Transaction) GetOutputs() []*TransactionOutput
func (*Transaction) GetVersion ¶
func (x *Transaction) GetVersion() int32
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type TransactionInput ¶
type TransactionInput struct {
// Reference to the previous transaction's output.
PreviousOutput *OutPoint `protobuf:"bytes,1,opt,name=previousOutput,proto3" json:"previousOutput,omitempty"`
// Transaction version as defined by the sender.
Sequence uint32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
// Computational script for confirming transaction authorization.
Script []byte `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"`
// contains filtered or unexported fields
}
Bitcoin transaction input.
func (*TransactionInput) Descriptor
deprecated
func (*TransactionInput) Descriptor() ([]byte, []int)
Deprecated: Use TransactionInput.ProtoReflect.Descriptor instead.
func (*TransactionInput) GetPreviousOutput ¶
func (x *TransactionInput) GetPreviousOutput() *OutPoint
func (*TransactionInput) GetScript ¶
func (x *TransactionInput) GetScript() []byte
func (*TransactionInput) GetSequence ¶
func (x *TransactionInput) GetSequence() uint32
func (*TransactionInput) ProtoMessage ¶
func (*TransactionInput) ProtoMessage()
func (*TransactionInput) ProtoReflect ¶
func (x *TransactionInput) ProtoReflect() protoreflect.Message
func (*TransactionInput) Reset ¶
func (x *TransactionInput) Reset()
func (*TransactionInput) String ¶
func (x *TransactionInput) String() string
type TransactionOutput ¶
type TransactionOutput struct {
// Transaction amount.
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// Usually contains the public key as a Bitcoin script setting up conditions to claim this output.
Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"`
// Optional spending script for P2TR script-path transactions.
SpendingScript []byte `protobuf:"bytes,5,opt,name=spendingScript,proto3" json:"spendingScript,omitempty"`
// contains filtered or unexported fields
}
Bitcoin transaction output.
func (*TransactionOutput) Descriptor
deprecated
func (*TransactionOutput) Descriptor() ([]byte, []int)
Deprecated: Use TransactionOutput.ProtoReflect.Descriptor instead.
func (*TransactionOutput) GetScript ¶
func (x *TransactionOutput) GetScript() []byte
func (*TransactionOutput) GetSpendingScript ¶
func (x *TransactionOutput) GetSpendingScript() []byte
func (*TransactionOutput) GetValue ¶
func (x *TransactionOutput) GetValue() int64
func (*TransactionOutput) ProtoMessage ¶
func (*TransactionOutput) ProtoMessage()
func (*TransactionOutput) ProtoReflect ¶
func (x *TransactionOutput) ProtoReflect() protoreflect.Message
func (*TransactionOutput) Reset ¶
func (x *TransactionOutput) Reset()
func (*TransactionOutput) String ¶
func (x *TransactionOutput) String() string
type TransactionPlan ¶
type TransactionPlan struct {
// Amount to be received at the other end.
Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
// Maximum available amount in all the input UTXOs.
AvailableAmount int64 `protobuf:"varint,2,opt,name=available_amount,json=availableAmount,proto3" json:"available_amount,omitempty"`
// Estimated transaction fee.
Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"`
// Remaining change
Change int64 `protobuf:"varint,4,opt,name=change,proto3" json:"change,omitempty"`
// Selected unspent transaction outputs (subset of all input UTXOs)
Utxos []*UnspentTransaction `protobuf:"bytes,5,rep,name=utxos,proto3" json:"utxos,omitempty"`
// Zcash branch id
BranchId []byte `protobuf:"bytes,6,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"`
// Optional error
Error common.SigningError `protobuf:"varint,7,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"`
// Optional zero-amount, OP_RETURN output
OutputOpReturn []byte `protobuf:"bytes,8,opt,name=output_op_return,json=outputOpReturn,proto3" json:"output_op_return,omitempty"`
// Optional index of the OP_RETURN output in the transaction.
// If not set, OP_RETURN output will be pushed as the latest output.
OutputOpReturnIndex *OutputIndex `protobuf:"bytes,14,opt,name=output_op_return_index,json=outputOpReturnIndex,proto3" json:"output_op_return_index,omitempty"`
// zen & bitcoin diamond preblockhash
Preblockhash []byte `protobuf:"bytes,9,opt,name=preblockhash,proto3" json:"preblockhash,omitempty"`
// zen preblockheight
Preblockheight int64 `protobuf:"varint,10,opt,name=preblockheight,proto3" json:"preblockheight,omitempty"`
// Result of a transaction planning using the Bitcoin 2.0 protocol.
// Set if `Bitcoin.Proto.SigningInput.planning_v2` used.
PlanningResultV2 *bitcoinv2.TransactionPlan `protobuf:"bytes,12,opt,name=planning_result_v2,json=planningResultV2,proto3" json:"planning_result_v2,omitempty"`
// contains filtered or unexported fields
}
Describes a preliminary transaction plan.
func (*TransactionPlan) Descriptor
deprecated
func (*TransactionPlan) Descriptor() ([]byte, []int)
Deprecated: Use TransactionPlan.ProtoReflect.Descriptor instead.
func (*TransactionPlan) GetAmount ¶
func (x *TransactionPlan) GetAmount() int64
func (*TransactionPlan) GetAvailableAmount ¶
func (x *TransactionPlan) GetAvailableAmount() int64
func (*TransactionPlan) GetBranchId ¶
func (x *TransactionPlan) GetBranchId() []byte
func (*TransactionPlan) GetChange ¶
func (x *TransactionPlan) GetChange() int64
func (*TransactionPlan) GetError ¶
func (x *TransactionPlan) GetError() common.SigningError
func (*TransactionPlan) GetFee ¶
func (x *TransactionPlan) GetFee() int64
func (*TransactionPlan) GetOutputOpReturn ¶
func (x *TransactionPlan) GetOutputOpReturn() []byte
func (*TransactionPlan) GetOutputOpReturnIndex ¶
func (x *TransactionPlan) GetOutputOpReturnIndex() *OutputIndex
func (*TransactionPlan) GetPlanningResultV2 ¶
func (x *TransactionPlan) GetPlanningResultV2() *bitcoinv2.TransactionPlan
func (*TransactionPlan) GetPreblockhash ¶
func (x *TransactionPlan) GetPreblockhash() []byte
func (*TransactionPlan) GetPreblockheight ¶
func (x *TransactionPlan) GetPreblockheight() int64
func (*TransactionPlan) GetUtxos ¶
func (x *TransactionPlan) GetUtxos() []*UnspentTransaction
func (*TransactionPlan) ProtoMessage ¶
func (*TransactionPlan) ProtoMessage()
func (*TransactionPlan) ProtoReflect ¶
func (x *TransactionPlan) ProtoReflect() protoreflect.Message
func (*TransactionPlan) Reset ¶
func (x *TransactionPlan) Reset()
func (*TransactionPlan) String ¶
func (x *TransactionPlan) String() string
type TransactionVariant ¶
type TransactionVariant int32
const ( TransactionVariant_P2PKH TransactionVariant = 0 TransactionVariant_P2WPKH TransactionVariant = 1 TransactionVariant_P2TRKEYPATH TransactionVariant = 2 TransactionVariant_BRC20TRANSFER TransactionVariant = 3 TransactionVariant_NFTINSCRIPTION TransactionVariant = 4 )
func (TransactionVariant) Descriptor ¶
func (TransactionVariant) Descriptor() protoreflect.EnumDescriptor
func (TransactionVariant) Enum ¶
func (x TransactionVariant) Enum() *TransactionVariant
func (TransactionVariant) EnumDescriptor
deprecated
func (TransactionVariant) EnumDescriptor() ([]byte, []int)
Deprecated: Use TransactionVariant.Descriptor instead.
func (TransactionVariant) Number ¶
func (x TransactionVariant) Number() protoreflect.EnumNumber
func (TransactionVariant) String ¶
func (x TransactionVariant) String() string
func (TransactionVariant) Type ¶
func (TransactionVariant) Type() protoreflect.EnumType
type UnspentTransaction ¶
type UnspentTransaction struct {
// The unspent output
OutPoint *OutPoint `protobuf:"bytes,1,opt,name=out_point,json=outPoint,proto3" json:"out_point,omitempty"`
// Script for claiming this UTXO
Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"`
// Amount of the UTXO
Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
// The transaction variant
Variant TransactionVariant `protobuf:"varint,4,opt,name=variant,proto3,enum=TW.Bitcoin.Proto.TransactionVariant" json:"variant,omitempty"`
// Optional spending script for P2TR script-path transactions.
SpendingScript []byte `protobuf:"bytes,5,opt,name=spendingScript,proto3" json:"spendingScript,omitempty"`
// contains filtered or unexported fields
}
An unspent transaction output, that can serve as input to a transaction
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) GetOutPoint ¶
func (x *UnspentTransaction) GetOutPoint() *OutPoint
func (*UnspentTransaction) GetScript ¶
func (x *UnspentTransaction) GetScript() []byte
func (*UnspentTransaction) GetSpendingScript ¶
func (x *UnspentTransaction) GetSpendingScript() []byte
func (*UnspentTransaction) GetVariant ¶
func (x *UnspentTransaction) GetVariant() TransactionVariant
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