Documentation ¶
Index ¶
- Constants
- type Address
- type AddressType
- type BlindInputData
- type BlindOutputData
- type BlindTxOption
- type Block
- type BlockHeader
- type ByteData
- type ConfidentialAddress
- type ConfidentialTx
- type ConfidentialTxIn
- type ConfidentialTxOut
- type ConfidentialTxOutIndexMap
- type ConfidentialTxOutSet
- func (c ConfidentialTxOutSet) Filter(filterFunc func(*ConfidentialTxOut) bool) ConfidentialTxOutIndexMap
- func (c ConfidentialTxOutSet) FindByAddress(address string) map[uint32]*ConfidentialTxOut
- func (c ConfidentialTxOutSet) FindByAddressFirst(address string) (*ConfidentialTxOut, uint32)
- func (c ConfidentialTxOutSet) FindByLockingScript(lockingScript string) map[uint32]*ConfidentialTxOut
- func (c ConfidentialTxOutSet) FindByLockingScriptFirst(lockingScript string) (*ConfidentialTxOut, uint32)
- func (c ConfidentialTxOutSet) GetFeeAmount() int64
- type Descriptor
- type DescriptorData
- type DescriptorKey
- type DescriptorKeyData
- type DescriptorKeyType
- type DescriptorKeys
- type DescriptorMultisig
- type DescriptorParseFilter
- type DescriptorRootData
- func (d DescriptorRootData) ExistPublicKey(pubkey *Pubkey) bool
- func (d DescriptorRootData) GetAddress() string
- func (d DescriptorRootData) GetPublicKey() string
- func (d DescriptorRootData) GetPublicKeys() []string
- func (d DescriptorRootData) GetRedeemScript() string
- func (d DescriptorRootData) HasMultisig() bool
- type DescriptorType
- type DescriptorTypes
- type ElementsUtxoData
- type ExtPrivkey
- type ExtPubkey
- type ExtkeyData
- type ExtkeyFormatType
- type ExtkeyType
- type FundRawTxOption
- type HashType
- func (n HashType) GetWitnessVersion() int
- func (n HashType) IsP2shSegwit() bool
- func (n HashType) IsPubkeyHash() bool
- func (n HashType) IsScriptHash() bool
- func (n HashType) IsWitness() bool
- func (n HashType) IsWitnessV1OrLater() bool
- func (n HashType) String() string
- func (n HashType) ToCfdValue() int
- type HashTypes
- type HdWallet
- type InputConfidentialTxIn
- type InputConfidentialTxOut
- type InputPeginData
- type InputPegoutData
- type InputTxIn
- type InputTxOut
- type IssuanceBlindingKey
- type IssuanceData
- type NetworkType
- func (n NetworkType) IsBitcoin() bool
- func (n NetworkType) IsElements() bool
- func (n NetworkType) IsMainnet() bool
- func (n NetworkType) String() string
- func (n NetworkType) ToBitcoinType() NetworkType
- func (n NetworkType) ToBitcoinTypePointer() *NetworkType
- func (n NetworkType) ToCfdValue() int
- func (n NetworkType) Valid() bool
- type OutPoint
- type PakEntry
- type PeginTxOption
- type PeginUtxoData
- type PegoutTxOption
- type Privkey
- type Pubkey
- type Script
- type ScriptWitness
- type SigHashType
- type SignParameter
- type Transaction
- type TransactionData
- type TxIn
- type TxOut
- type UnblindData
- type UtxoData
Constants ¶
const ( CommitmentDataSize = 33 CommitmentHexDataSize = 66 EmptyBlinder = "0000000000000000000000000000000000000000000000000000000000000000" )
const ( DescriptorKeyNull DescriptorKeyType = iota DescriptorKeyPublic DescriptorKeyBip32 DescriptorKeyBip32Priv DescriptorKeySchnorr DescriptorTypeNull DescriptorType = iota DescriptorTypeSh DescriptorTypeWsh DescriptorTypePk DescriptorTypePkh DescriptorTypeWpkh DescriptorTypeCombo DescriptorTypeMulti DescriptorTypeSortedMulti DescriptorTypeAddr DescriptorTypeRaw DescriptorTypeMiniscript DescriptorTypeTaproot )
const ( PrivkeyLength = 32 // privkey length PrivkeyHexLength = 64 // privkey hex length )
const ( CompressedPubkeyLength = 33 // compressed pubkey length CompressedPubkeyHexLength = 66 // compressed pubkey hex length UncompressedPubkeyLength = 65 // uncompressed pubkey length UncompressedPubkeyHexLength = 130 // uncompressed pubkey hex length )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Address string Network NetworkType Type AddressType LockingScript Script }
Address ...
type AddressType ¶
type AddressType int
const ( // AddressType UnknownAddress AddressType = iota P2pkhAddress P2shAddress P2wpkhAddress P2wshAddress P2shP2wpkhAddress P2shP2wshAddress TaprootAddress )
func NewAddressTypeByHashType ¶
func NewAddressTypeByHashType(hashType int) AddressType
NewAddressTypeByHashType ...
func NewAddressTypeByString ¶
func NewAddressTypeByString(addressType string) AddressType
NewAddressTypeByString ...
type BlindInputData ¶
type BlindInputData struct { OutPoint OutPoint // OutPoint Asset string // Asset AssetBlindFactor string // Asset BlindFactor Amount int64 // satoshi value ValueBlindFactor string // Value BlindFactor IssuanceKey *IssuanceBlindingKey }
BlindInputData ...
type BlindOutputData ¶
type BlindOutputData struct { Index int // txout index (-1: auto) ConfidentialAddress string // confidential or not address ConfidentialKey string // (optional) confidential key }
BlindOutputData ...
type BlindTxOption ¶
type BlindTxOption struct { MinimumRangeValue int64 // blind minimum range value Exponent int64 // blind exponent MinimumBits int64 // blind minimum bits AppendDummyOutput bool // add dummy output if txout is low }
BlindTxOption BlindRawTransaction option data struct.
type BlockHeader ¶
type BlockHeader struct { Version uint32 // Version PrevBlockHash string // previous block hash MerkleRoot string // merkleroot Time uint32 // block time Bits uint32 // bit flag Nonce uint32 // nonce }
BlockHeader block header information.
type ByteData ¶
type ByteData struct {
// contains filtered or unexported fields
}
ByteData This struct holds a byte array.
func NewByteData ¶
NewByteData This function create a bytedata from a byte array.
func NewByteDataFromHex ¶
NewByteDataFromHex This function create a bytedata from a hex string.
func NewByteDataFromHexIgnoreError ¶
NewByteDataFromHex This function create a bytedata from a hex string. On error, it returns nil.
type ConfidentialAddress ¶
type ConfidentialAddress struct { ConfidentialAddress string Address string Network NetworkType Type AddressType ConfidentialKey *Pubkey }
ConfidentialAddress ...
type ConfidentialTxIn ¶
type ConfidentialTxIn struct { OutPoint OutPoint Sequence uint32 ScriptSig string Issuance IssuanceData WitnessStack ScriptWitness PeginWitness ScriptWitness IssuanceAmountRangeproof string InflationKeysRangeproof string }
ConfidentialTxIn confidential transaction input.
func NewConfidentialTxIn ¶ added in v0.3.9
func NewConfidentialTxIn(cfdTxin *cfd.ConfidentialTxIn) *ConfidentialTxIn
type ConfidentialTxOut ¶
type ConfidentialTxOut struct { Amount int64 // satoshi amount (unblind value) Asset string // asset (or commitment asset) LockingScript string // locking script Address string // address or confidential address. (if locking script is usual hashtype.) CommitmentValue string // commitment value CommitmentNonce string // commitment nonce Surjectionproof string // surjectionprooof of asset Rangeproof string // rangeproof of value }
ConfidentialTxOut confidential transaction output.
func NewConfidentialTxOut ¶ added in v0.3.9
func NewConfidentialTxOut(cfdTxout *cfd.ConfidentialTxOut) *ConfidentialTxOut
func (ConfidentialTxOut) HasBlinding ¶ added in v0.3.15
func (c ConfidentialTxOut) HasBlinding() bool
type ConfidentialTxOutIndexMap ¶ added in v0.3.16
type ConfidentialTxOutIndexMap map[uint32]*ConfidentialTxOut
func (ConfidentialTxOutIndexMap) GetTotalAmount ¶ added in v0.3.16
func (c ConfidentialTxOutIndexMap) GetTotalAmount() int64
type ConfidentialTxOutSet ¶ added in v0.3.13
type ConfidentialTxOutSet []*ConfidentialTxOut
func (ConfidentialTxOutSet) Filter ¶ added in v0.3.16
func (c ConfidentialTxOutSet) Filter(filterFunc func(*ConfidentialTxOut) bool) ConfidentialTxOutIndexMap
func (ConfidentialTxOutSet) FindByAddress ¶ added in v0.3.13
func (c ConfidentialTxOutSet) FindByAddress(address string) map[uint32]*ConfidentialTxOut
func (ConfidentialTxOutSet) FindByAddressFirst ¶ added in v0.3.13
func (c ConfidentialTxOutSet) FindByAddressFirst(address string) (*ConfidentialTxOut, uint32)
func (ConfidentialTxOutSet) FindByLockingScript ¶ added in v0.3.13
func (c ConfidentialTxOutSet) FindByLockingScript(lockingScript string) map[uint32]*ConfidentialTxOut
func (ConfidentialTxOutSet) FindByLockingScriptFirst ¶ added in v0.3.13
func (c ConfidentialTxOutSet) FindByLockingScriptFirst(lockingScript string) (*ConfidentialTxOut, uint32)
func (ConfidentialTxOutSet) GetFeeAmount ¶ added in v0.3.13
func (c ConfidentialTxOutSet) GetFeeAmount() int64
type Descriptor ¶
type Descriptor struct { // Output Descriptor OutputDescriptor string }
Descriptor This struct use for the output descriptor.
type DescriptorData ¶
type DescriptorData struct { // depth (0 - ) Depth uint32 // script type. (CfdDescriptorScriptType) ScriptType int // locking script. LockingScript string // address string. (for ScriptType not KCfdDescriptorScriptRaw) Address string // hash type. (CfdHashType) HashType int // redeem script. (for ScriptType KCfdDescriptorScriptSh or KCfdDescriptorScriptWsh) RedeemScript string // key type. (see CfdDescriptorKeyData.KeyType) KeyType int // pubkey Pubkey string // extend pubkey ExtPubkey string // extend privkey ExtPrivkey string // schnorr pubkey SchnorrPubkey string // has multisig IsMultisig bool // number of multisig require signatures ReqSigNum uint32 // Taproot ScriptTree string TreeString string }
*
- Descriptor data struct.
func NewDescriptorData ¶ added in v0.3.9
func NewDescriptorData(cfdData *cfd.CfdDescriptorData) *DescriptorData
type DescriptorKey ¶ added in v0.3.11
type DescriptorKey struct { // key type. (CfdDescriptorKeyType) // - KCfdDescriptorKeyNull // - KCfdDescriptorKeyPublic // - KCfdDescriptorKeyBip32 // - KCfdDescriptorKeyBip32Priv // - KCfdDescriptorKeySchnorr KeyType DescriptorKeyType // pubkey Pubkey *Pubkey // extend pubkey ExtPubkey *ExtPubkey // extend privkey ExtPrivkey *ExtPrivkey // schnorr pubkey SchnorrPubkey string // TODO(k-matsuzawa): please wait }
DescriptorKey stores a key data for descriptor.
func NewDescriptorKey ¶ added in v0.3.11
func NewDescriptorKey(keyType int, pubkey, extPubkey, extPrivkey, schnorrPubkey string) DescriptorKey
func (DescriptorKey) GetPublicKey ¶ added in v0.3.11
func (d DescriptorKey) GetPublicKey() string
type DescriptorKeyData ¶
type DescriptorKeyData struct { // key type. (CfdDescriptorKeyType) // - KCfdDescriptorKeyNull // - KCfdDescriptorKeyPublic // - KCfdDescriptorKeyBip32 // - KCfdDescriptorKeyBip32Priv // - KCfdDescriptorKeySchnorr KeyType int // pubkey Pubkey string // extend pubkey ExtPubkey string // extend privkey ExtPrivkey string // schnorr pubkey SchnorrPubkey string }
*
- Descriptor key data struct.
type DescriptorKeyType ¶ added in v0.3.11
type DescriptorKeyType int
func NewDescriptorKeyType ¶ added in v0.3.11
func NewDescriptorKeyType(keyType int) DescriptorKeyType
func (DescriptorKeyType) ToCfdValue ¶ added in v0.3.11
func (k DescriptorKeyType) ToCfdValue() int
ToCfdValue ...
type DescriptorKeys ¶ added in v0.3.14
type DescriptorKeys []DescriptorKey
func (DescriptorKeys) ExistPublicKey ¶ added in v0.3.14
func (d DescriptorKeys) ExistPublicKey(pubkey *Pubkey) bool
func (DescriptorKeys) Find ¶ added in v0.3.14
func (d DescriptorKeys) Find(key DescriptorKey) bool
func (DescriptorKeys) GetPublicKeys ¶ added in v0.3.14
func (d DescriptorKeys) GetPublicKeys() []string
type DescriptorMultisig ¶ added in v0.3.11
type DescriptorMultisig struct { ReqSigNum uint32 // number of multisig require signatures Keys DescriptorKeys // Multisig keys }
DescriptorMultisig stores the multisig data for descriptor.
func NewDescriptorMultisig ¶ added in v0.3.11
func NewDescriptorMultisig(reqSigNum uint32, keys []DescriptorKeyData) *DescriptorMultisig
type DescriptorParseFilter ¶ added in v0.3.13
type DescriptorParseFilter struct { EnableHashTypes []HashType DisableHashTypes []HashType IsMultisigOnlyOnScriptHash bool EnableRootDescriptorTypes []DescriptorType DisableRootDescriptorTypes []DescriptorType }
DescriptorParseFilter defines filter conditions for parsing output descriptors.
func (*DescriptorParseFilter) Check ¶ added in v0.3.13
func (f *DescriptorParseFilter) Check(data *DescriptorRootData) error
type DescriptorRootData ¶ added in v0.3.11
type DescriptorRootData struct { // depth (0 - ) Depth uint32 // script type. (CfdDescriptorScriptType) Type DescriptorType // address string. (for Type not KCfdDescriptorScriptRaw) Address Address // hash type. HashType HashType // redeem script. (for HashType P2sh,P2wsh,P2shP2wsh) RedeemScript *Script // key Key DescriptorKey // multisig Multisig *DescriptorMultisig // Taproot ScriptTree string TreeString string // TODO(k-matsuzawa): please wait }
DescriptorRootData stores descriptor root data
func (DescriptorRootData) ExistPublicKey ¶ added in v0.3.14
func (d DescriptorRootData) ExistPublicKey(pubkey *Pubkey) bool
func (DescriptorRootData) GetAddress ¶ added in v0.3.14
func (d DescriptorRootData) GetAddress() string
func (DescriptorRootData) GetPublicKey ¶ added in v0.3.11
func (d DescriptorRootData) GetPublicKey() string
func (DescriptorRootData) GetPublicKeys ¶ added in v0.3.14
func (d DescriptorRootData) GetPublicKeys() []string
func (DescriptorRootData) GetRedeemScript ¶ added in v0.3.11
func (d DescriptorRootData) GetRedeemScript() string
func (DescriptorRootData) HasMultisig ¶ added in v0.3.11
func (d DescriptorRootData) HasMultisig() bool
type DescriptorType ¶ added in v0.3.11
type DescriptorType int
func NewDescriptorType ¶ added in v0.3.11
func NewDescriptorType(descType int) DescriptorType
func (DescriptorType) ToCfdValue ¶ added in v0.3.11
func (t DescriptorType) ToCfdValue() int
ToCfdValue ...
type DescriptorTypes ¶ added in v0.3.13
type DescriptorTypes []DescriptorType
func (DescriptorTypes) Find ¶ added in v0.3.13
func (d DescriptorTypes) Find(descType DescriptorType) bool
func (DescriptorTypes) IsValid ¶ added in v0.3.13
func (d DescriptorTypes) IsValid() bool
type ElementsUtxoData ¶
type ElementsUtxoData struct { OutPoint OutPoint // OutPoint Asset string // Asset AssetBlindFactor string // Asset BlindFactor AssetCommitment string // Asset commitment Amount int64 // satoshi value ValueBlindFactor string // Value BlindFactor AmountCommitment string // Amount commitment Descriptor string // output descriptor ScriptSigTemplate string // scriptsig template hex (require script hash estimate fee) IssuanceKey *IssuanceBlindingKey // issuance key IsIssuance bool // is issuance output IsBlindIssuance bool // is blind issuance output PeginData *PeginUtxoData // pegin data GenesisBlockHash *string // genesis block hash }
func (ElementsUtxoData) ConvertToCfdUtxo ¶
func (u ElementsUtxoData) ConvertToCfdUtxo() cfd.CfdUtxo
func (ElementsUtxoData) HasBlindUtxo ¶
func (u ElementsUtxoData) HasBlindUtxo() bool
type ExtkeyData ¶
type ExtkeyData struct { // version Version string // parent fingerprint Fingerprint string // chain code ChainCode string // depth Depth uint32 // child number ChildNumber uint32 // key type KeyType ExtkeyType // network Network NetworkType }
type ExtkeyFormatType ¶ added in v0.4.0
type ExtkeyFormatType int
const ( ExtkeyFormatTypeUnknown ExtkeyFormatType = -1 ExtkeyFormatTypeBip32 ExtkeyFormatType = 0 ExtkeyFormatTypeBip49 ExtkeyFormatType = 1 ExtkeyFormatTypeBip84 ExtkeyFormatType = 2 )
func NewExtkeyFormatTypeByString ¶ added in v0.4.0
func NewExtkeyFormatTypeByString(formatTypeStr string) ExtkeyFormatType
func (ExtkeyFormatType) ToCfdValue ¶ added in v0.4.0
func (t ExtkeyFormatType) ToCfdValue() int
type ExtkeyType ¶ added in v0.3.7
type ExtkeyType int
ExtkeyType ...
const ( // ExtkeyType UnknownExtkeyType ExtkeyType = iota ExtPrivkeyType ExtPubkeyType )
func NewExtkeyType ¶ added in v0.3.7
func NewExtkeyType(cfdExtkeyType int) ExtkeyType
NewExtkeyType ...
func NewExtkeyTypeByString ¶ added in v0.3.7
func NewExtkeyTypeByString(extkeyType string) ExtkeyType
NewExtkeyTypeByString ...
type FundRawTxOption ¶
type FundRawTxOption struct { // fee asset FeeAsset string // use blind tx IsBlindTx bool // effective feerate EffectiveFeeRate float64 // longterm feerate LongTermFeeRate float64 // dust feerate DustFeeRate float64 // knapsack min change value. knapsack logic's threshold. Recommended value is 1. KnapsackMinChange int64 // blind exponent. default is 0. Exponent int64 // blind minimum bits. default is -1 (cfd-go auto). MinimumBits int64 }
*
- FundRawTransaction option data struct.
func NewCfdFundRawTxOption ¶
func NewCfdFundRawTxOption(networkType NetworkType) FundRawTxOption
type HashType ¶
type HashType int
func NewHashTypeByString ¶
NewHashTypeByString ...
func (HashType) GetWitnessVersion ¶ added in v0.4.0
func (HashType) IsP2shSegwit ¶ added in v0.3.11
IsP2shSegwit ...
func (HashType) IsPubkeyHash ¶ added in v0.3.11
IsPubkeyHash ...
func (HashType) IsScriptHash ¶ added in v0.3.11
IsScriptHash ...
func (HashType) IsWitnessV1OrLater ¶ added in v0.3.13
IsWitnessV1OrLater ...
type InputConfidentialTxIn ¶
type InputConfidentialTxIn struct { OutPoint OutPoint Sequence uint32 PeginInput *InputPeginData }
InputConfidentialTxIn ...
type InputConfidentialTxOut ¶
type InputConfidentialTxOut struct { Amount int64 // satoshi amount (unblind value) Asset string // asset (or commitment asset) LockingScript string // locking script Address string // address or confidential address. (if locking script is usual hashtype.) Nonce string // direct nonce PegoutInput *InputPegoutData IsDestroy bool IsFee bool }
InputConfidentialTxOut ...
type InputPeginData ¶
type InputPeginData struct { BitcoinTransaction string BitcoinGenesisBlockHash string BitcoinAssetId string ClaimScript string TxOutProof string }
InputPeginData ...
type InputPegoutData ¶
type InputPegoutData struct { BitcoinGenesisBlockHash string OnlineKey string BitcoinOutputDescriptor string Bip32Counter uint32 Whitelist string }
InputPegoutData ...
type InputTxOut ¶
type IssuanceBlindingKey ¶
type IssuanceBlindingKey struct { AssetBlindingKey string // (option) Asset blinding key TokenBlindingKey string // (option) Token blinding key }
IssuanceBlindingKey ...
type IssuanceData ¶
type IssuanceData struct { Entropy string Nonce string AssetAmount int64 AssetValue string TokenAmount int64 TokenValue string }
IssuanceData confidential transaction issuance input.
type NetworkType ¶
type NetworkType int
const ( // NetworkType Unknown NetworkType = iota Mainnet Testnet Regtest LiquidV1 ElementsRegtest )
func NewNetworkTypeByString ¶
func NewNetworkTypeByString(networkType string) NetworkType
NewNetworkTypeByString ...
func (NetworkType) ToBitcoinType ¶
func (n NetworkType) ToBitcoinType() NetworkType
ToBitcoinType ...
func (NetworkType) ToBitcoinTypePointer ¶
func (n NetworkType) ToBitcoinTypePointer() *NetworkType
ToBitcoinTypePointer ...
type OutPoint ¶
OutPoint : utxo outpoint struct.
type PeginTxOption ¶
type PeginTxOption struct { // fee asset FeeAsset string // use blind tx IsBlindTx bool // effective feerate EffectiveFeeRate float64 // longterm feerate LongTermFeeRate float64 // dust feerate DustFeeRate float64 // knapsack min change value. knapsack logic's threshold. Recommended value is 1. KnapsackMinChange int64 // blind minimum range value MinimumRangeValue int64 // blind exponent. default is 0. Exponent int64 // blind minimum bits. default is -1 (cfd-go auto). MinimumBits int64 }
PeginTxOption ...
type PeginUtxoData ¶
type PegoutTxOption ¶
type PegoutTxOption struct { // fee asset FeeAsset string // use blind tx IsBlindTx bool // effective feerate EffectiveFeeRate float64 // longterm feerate LongTermFeeRate float64 // dust feerate DustFeeRate float64 // knapsack min change value. knapsack logic's threshold. Recommended value is 1. KnapsackMinChange int64 // blind minimum range value MinimumRangeValue int64 // blind exponent. default is 0. Exponent int64 // blind minimum bits. default is -1 (cfd-go auto). MinimumBits int64 // subtract fee by pegout amount. SubtractFee bool }
PegoutTxOption ...
type Privkey ¶
type Privkey struct { Hex string Wif string Network NetworkType IsCompressedPubkey bool }
Privkey ...
type Script ¶
type Script struct {
// contains filtered or unexported fields
}
Script This struct holds a script.
func NewScriptFromAsm ¶
NewScriptFromAsm This function create a script from an asm string.
func NewScriptFromAsmList ¶
NewScriptFromAsmList This function create a script from the asm string list.
func NewScriptFromHex ¶
NewScriptFromHex This function create a script from a hex string.
func NewScriptFromHexIgnoreError ¶
NewScriptFromHex This function create a script from a hex string. On error, it returns nil.
type ScriptWitness ¶
type ScriptWitness struct { // witness stack by hex. Stack []string }
ScriptWitness : witness stack.
type SigHashType ¶
SigHashType This struct use for the sighashtype utility function.
var ( // SigHashType: default (for taproot) SigHashTypeDefault SigHashType = *NewSigHashType(0) // SigHashType: all SigHashTypeAll SigHashType = *NewSigHashType(1) // SigHashType: none SigHashTypeNone SigHashType = *NewSigHashType(2) // SigHashType: single SigHashTypeSingle SigHashType = *NewSigHashType(3) )
func NewSigHashType ¶
func NewSigHashType(sighashType int) *SigHashType
NewSigHashType This function return a SigHashType.
func NewSigHashTypeFromString ¶ added in v0.4.0
func NewSigHashTypeFromString(sighashType string) *SigHashType
NewSigHashTypeFromString return a SigHashType.
func (*SigHashType) GetValue ¶
func (obj *SigHashType) GetValue() int
ToHex This function return a sighashtype byte value.
func (*SigHashType) ToCfdValue ¶ added in v0.4.0
func (obj *SigHashType) ToCfdValue() *cfdgo.SigHashType
type SignParameter ¶ added in v0.3.11
type SignParameter struct { Data Script IsDerEncode bool SigHashType SigHashType RelatedPubkey *Pubkey }
func NewSignParameterFromString ¶ added in v0.3.13
func NewSignParameterFromString(derSignature, relatedPubkey string) *SignParameter
type TransactionData ¶
type TransactionData struct { // txid Txid string // witness txid Wtxid string // witness hash WitHash string // size Size uint32 // virtual size Vsize uint32 // weight Weight uint32 // version Version uint32 // locktime LockTime uint32 }
*
- TransactionData data struct.
type TxIn ¶
type TxIn struct { // utxo outpoint. OutPoint OutPoint // sequence number. Sequence uint32 // script sig. ScriptSig string // witness stack. WitnessStack ScriptWitness }
TxIn : transaction input.
type TxOut ¶
type TxOut struct { // satoshi amount. Amount int64 // locking script. LockingScript string // address (if locking script is usual hashtype.) Address string }
TxOut : transaction output.
type UnblindData ¶ added in v0.3.16
type UtxoData ¶
type UtxoData struct { OutPoint OutPoint // OutPoint Amount int64 // satoshi value Descriptor string // output descriptor ScriptSigTemplate string // scriptsig template hex (require script hash estimate fee) Asset string // Asset AmountCommitment string // Amount commitment }