Documentation
¶
Index ¶
- Constants
- func CheckFinalization(num uint64, coinbase bool) bool
- func CheckMultisigHolderSignerScript(script []byte) bool
- func EncodeAddress(script []byte, chain byte) (string, error)
- func HashMessageForSignature(msg string, chain byte) []byte
- func IsInsufficientInputError(err error) bool
- func ParseAddress(addr string, chain byte) (string, error)
- func ParseSatoshi(amount string) int64
- func ParseSequence(lock time.Duration) int64
- 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 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 ( ChainBitcoin = 1 ChainLitecoin = 5 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 HashMessageForSignature ¶
func ParseSatoshi ¶
func ParseSequence ¶
func RPCGetBlockHeight ¶
func RPCGetTransactionOutput ¶
func RPCGetTransactionSender ¶
func RPCGetTransactionSender(chain byte, 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(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)
type WitnessKeyAccount ¶
func BuildWitnessKeyAccount ¶
func BuildWitnessKeyAccount(accountant string, chain byte) (*WitnessKeyAccount, error)
type WitnessScriptAccount ¶
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.