Documentation ¶
Index ¶
- Constants
- func BitcoinDefaultDerivationPath() []byte
- func CheckDerivation(public string, chainCode []byte, maxRange uint32) error
- func CheckFinalization(num uint64, coinbase bool) bool
- func CheckTransactionPartiallySignedBy(raw, public string) bool
- func DeriveBIP32(public string, chainCode []byte, children ...uint32) (string, string, error)
- func DeriveBIP32WithPath(public, chaincode string, path8 []byte) (string, error)
- func EstimateTransactionFee(mainInputs []*Input, feeInputs []*Input, outputs []*Output, fvb int64, ...) (int64, error)
- func HashMessageForSignature(msg string, chain byte) ([]byte, error)
- func IsInsufficientInputError(err error) bool
- func MarshalWiredTransaction(msgTx *wire.MsgTx, encoding wire.MessageEncoding, chain byte) ([]byte, error)
- func ParseAddress(addr string, chain byte) ([]byte, error)
- func ParseSatoshi(amount string) (int64, error)
- func ParseSequence(lock time.Duration, chain byte) (int64, error)
- func RPCEstimateSmartFee(chain byte, rpc string) (int64, error)
- func RPCGetBlockHash(rpc string, num int64) (string, error)
- func RPCGetBlockHeight(rpc string) (int64, error)
- func RPCGetTransactionOutput(chain byte, rpc, hash string, index int64) (*RPCTransaction, *Output, error)
- func RPCGetTransactionSender(chain byte, rpc string, tx *RPCTransaction) (string, error)
- func RPCSendRawTransaction(rpc, raw string) (string, error)
- func SignTx(rawStr, privateStr string, chain byte) (string, error)
- func ValueDust(chain byte) (int64, error)
- func VerifyAddress(address string, coin uint32) error
- func VerifySignatureDER(public string, msg, sig []byte) error
- func WriteBytes(enc *common.Encoder, b []byte)
- type Input
- type Output
- type PartiallySignedTransaction
- type RPCBlock
- type RPCBlockWithTransactions
- type RPCTransaction
Constants ¶
View Source
const ( ChainBitcoin = 1 ChainLitecoin = 5 ValuePrecision = 8 ValueSatoshi = 100000000 TimeLockMinimum = time.Hour * 1 TimeLockMaximum = time.Hour * 24 * 365 ScriptPubKeyTypeWitnessKeyHash = "witness_v0_keyhash" ScriptPubKeyTypeWitnessScriptHash = "witness_v0_scripthash" SigHashType = txscript.SigHashAll | txscript.SigHashAnyOneCanPay InputTypeP2WPKHAccoutant = 1 InputTypeP2WSHMultisigHolderSigner = 2 InputTypeP2WSHMultisigObserverSigner = 3 MaxTransactionSequence = 0xffffffff MaxStandardTxWeight = 300000 TransactionConfirmations = 1 )
View Source
const ( CoinBitcoin = 0 CoinLitecoin = 2 )
Variables ¶
This section is empty.
Functions ¶
func BitcoinDefaultDerivationPath ¶
func BitcoinDefaultDerivationPath() []byte
func CheckFinalization ¶
func DeriveBIP32 ¶
func DeriveBIP32WithPath ¶
func EstimateTransactionFee ¶
func MarshalWiredTransaction ¶
func ParseSatoshi ¶
func RPCGetBlockHeight ¶
func RPCGetTransactionOutput ¶
func RPCGetTransactionSender ¶
func RPCGetTransactionSender(chain byte, rpc string, tx *RPCTransaction) (string, error)
func RPCSendRawTransaction ¶
func VerifyAddress ¶
func VerifySignatureDER ¶
func WriteBytes ¶
Types ¶
type PartiallySignedTransaction ¶
func UnmarshalPartiallySignedTransaction ¶
func UnmarshalPartiallySignedTransaction(b []byte) (*PartiallySignedTransaction, error)
func (*PartiallySignedTransaction) Hash ¶
func (raw *PartiallySignedTransaction) Hash() string
func (*PartiallySignedTransaction) Marshal ¶
func (raw *PartiallySignedTransaction) Marshal() ([]byte, error)
type RPCBlock ¶
type RPCBlock struct { Hash string `json:"hash"` Height uint64 `json:"height"` Tx []string `json:"tx"` Time int64 `json:"time"` }
func RPCGetBlock ¶
type RPCBlockWithTransactions ¶
type RPCBlockWithTransactions struct { Hash string `json:"hash"` Height uint64 `json:"height"` Tx []*RPCTransaction `json:"tx"` }
func RPCGetBlockWithTransactions ¶
func RPCGetBlockWithTransactions(chain byte, rpc, hash string) (*RPCBlockWithTransactions, error)
type RPCTransaction ¶
type RPCTransaction struct { TxId string `json:"txid"` Vin []*rpcIn `json:"vin"` Vout []*rpcOut `json:"vout"` BlockHash string `json:"blockhash"` Hex string `json:"hex"` }
func RPCGetRawMempool ¶
func RPCGetRawMempool(chain byte, rpc string) ([]*RPCTransaction, error)
func RPCGetTransaction ¶
func RPCGetTransaction(chain byte, rpc, hash string) (*RPCTransaction, error)
Click to show internal directories.
Click to hide internal directories.