Documentation ¶
Index ¶
- Constants
- func CheckFinalization(num uint64, coinbase bool) bool
- func CheckMultisigHolderSignerScript(script []byte) bool
- func EncodeAddress(script []byte) (string, error)
- func HashMessageForSignature(msg string) []byte
- func IsInsufficientInputError(err error) bool
- func ParseAddress(addr string) (string, error)
- func ParseSatoshi(amount string) int64
- func ParseSequence(lock time.Duration) int64
- func RPCEstimateSmartFee(rpc string) (int64, error)
- func RPCGetBlockHash(rpc string, num int64) (string, error)
- func RPCGetBlockHeight(rpc string) (int64, error)
- func RPCGetTransactionOutput(rpc, hash string, index int64) (*RPCTransaction, *Output, error)
- func RPCGetTransactionSender(rpc string, tx *RPCTransaction) (string, error)
- func RPCSendRawTransaction(rpc, raw string) (string, error)
- func VerifyHolderKey(public string) error
- func VerifySignatureDER(public string, msg, sig []byte) error
- type Input
- type Output
- type PartiallySignedTransaction
- type RPCBlock
- type RPCBlockWithTransactions
- type RPCTransaction
- type WitnessKeyAccount
- type WitnessScriptAccount
Constants ¶
View Source
const ( ValuePrecision = 8 ValueSatoshi = 100000000 ValueDust = 1000 TimeLockMinimum = time.Hour * 1 TimeLockMaximum = time.Hour * 24 * 365 ScriptPubKeyTypeWitnessKeyHash = "witness_v0_keyhash" ScriptPubKeyTypeWitnessScriptHash = "witness_v0_scripthash" InputTypeP2WPKHAccoutant = 1 InputTypeP2WSHMultisigHolderSigner = 2 InputTypeP2WSHMultisigObserverSigner = 3 MaxTransactionSequence = 0xffffffff MaxStandardTxWeight = 300000 TransactionConfirmations = 1 )
Variables ¶
This section is empty.
Functions ¶
func CheckFinalization ¶
func EncodeAddress ¶
func HashMessageForSignature ¶
func ParseAddress ¶
func ParseSatoshi ¶
func ParseSequence ¶
func RPCEstimateSmartFee ¶
func RPCGetBlockHeight ¶
func RPCGetTransactionOutput ¶
func RPCGetTransactionOutput(rpc, hash string, index int64) (*RPCTransaction, *Output, error)
func RPCGetTransactionSender ¶
func RPCGetTransactionSender(rpc string, tx *RPCTransaction) (string, error)
func RPCSendRawTransaction ¶
func VerifyHolderKey ¶
func VerifySignatureDER ¶
Types ¶
type PartiallySignedTransaction ¶
func UnmarshalPartiallySignedTransaction ¶
func UnmarshalPartiallySignedTransaction(b []byte) (*PartiallySignedTransaction, error)
func (*PartiallySignedTransaction) Marshal ¶
func (raw *PartiallySignedTransaction) Marshal() []byte
func (*PartiallySignedTransaction) SigHash ¶
func (t *PartiallySignedTransaction) SigHash(idx int) []byte
type RPCBlock ¶
type RPCBlock struct { Hash string `json:"hash"` Height uint64 `json:"height"` Tx []string `json:"tx"` }
func RPCGetBlock ¶
type RPCBlockWithTransactions ¶
type RPCBlockWithTransactions struct { Hash string `json:"hash"` Height uint64 `json:"height"` Tx []*RPCTransaction `json:"tx"` }
func RPCGetBlockWithTransactions ¶
func RPCGetBlockWithTransactions(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(rpc string) ([]*RPCTransaction, error)
func RPCGetTransaction ¶
func RPCGetTransaction(rpc, hash string) (*RPCTransaction, error)
type WitnessKeyAccount ¶
func BuildWitnessKeyAccount ¶
func BuildWitnessKeyAccount(accountant string) (*WitnessKeyAccount, error)
type WitnessScriptAccount ¶
func BuildWitnessScriptAccount ¶
func BuildWitnessScriptAccount(holder, signer, observer string, lock time.Duration) (*WitnessScriptAccount, error)
func UnmarshalWitnessScriptAccountWitAccountant ¶
func UnmarshalWitnessScriptAccountWitAccountant(extra []byte) (*WitnessScriptAccount, string, error)
func (*WitnessScriptAccount) MarshalWithAccountant ¶
func (wsa *WitnessScriptAccount) MarshalWithAccountant(accountant string) []byte
Click to show internal directories.
Click to hide internal directories.