package
1.9.15-temp-stability-tests
Repository: https://github.com/kaspanet/kaspad.git
Documentation: pkg.go.dev
# Packages
Package bech32 provides a Go implementation of the bech32 format.
No description provided by the author
No description provided by the author
No description provided by the author
Package daghash provides abstracted hash functionality.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package txsort provides the transaction sorting compatible with BIP 69.
# Functions
AppDataDir returns an operating system specific directory to be used for storing application data for an application.
BigToCompact converts a whole number N to a compact representation using an unsigned 32-bit number.
CalcWork calculates a work value from difficulty bits.
CompactToBig converts a compact representation of a whole number N to an unsigned 32-bit number.
CompactToBigWithDestination is a version of CompactToBig that takes a destination parameter.
DecodeAddress decodes the string encoding of an address and returns the Address if addr is a valid encoding for a known address type.
FastLog2Floor calculates and returns floor(log2(x)) in a constant 5 steps.
Hash160 calculates the hash ripemd160(sha256(b)).
NewAddressPubKeyHash returns a new AddressPubKeyHash.
NewAddressPubKeyHashFromPublicKey returns a new AddressPubKeyHash from given public key.
NewAddressScriptHash returns a new AddressScriptHash.
NewAddressScriptHashFromHash returns a new AddressScriptHash.
NewAmount creates an Amount from a floating point value representing some value in kaspa.
NewBlock returns a new instance of a kaspa block given an underlying appmessage.MsgBlock.
NewBlockFromBlockAndBytes returns a new instance of a kaspa block given an underlying appmessage.MsgBlock and the serialized bytes for it.
NewBlockFromBytes returns a new instance of a kaspa block given the serialized bytes.
NewBlockFromReader returns a new instance of a kaspa block given a Reader to deserialize the block.
NewTLSCertPair returns a new PEM-encoded x.509 certificate pair based on a 521-bit ECDSA private key.
NewTx returns a new instance of a kaspa transaction given an underlying appmessage.MsgTx.
NewTxFromBytes returns a new instance of a kaspa transaction given the serialized bytes.
NewTxFromReader returns a new instance of a kaspa transaction given a Reader to deserialize the transaction.
ParsePrefix attempts to parse a Bech32 address prefix.
SearchSlice uses binary search to find and return the smallest index i in [0, n) at which f(i) is true, assuming that on the range [0, n), f(i) == true implies f(i+1) == true.
ToCamelCase converts a camelCase-ish string into a typical JSON camelCase string.
# Constants
These constants define various units used when describing a kaspa monetary amount.
These constants define various units used when describing a kaspa monetary amount.
These constants define various units used when describing a kaspa monetary amount.
These constants define various units used when describing a kaspa monetary amount.
These constants define various units used when describing a kaspa monetary amount.
These constants define various units used when describing a kaspa monetary amount.
Prefix for the main network.
Prefix for the dev network.
Prefix for the simulation network.
Prefix for the test network.
Unknown/Erroneous prefix.
CoinbaseTransactionIndex is the index of the coinbase transaction in every block.
MaxSompi is the maximum transaction amount allowed in sompi.
SompiPerKaspa is the number of sompi in one kaspa (1 KAS).
TxIndexUnknown is the value returned for a transaction index that is unknown.
# Variables
ErrUnknownAddressType describes an error where an address can not decoded as a specific address type due to the string encoding begining with an identifier byte unknown to any standard or registered (via dagconfig.Register) network.
# Structs
AddressPubKeyHash is an Address for a pay-to-pubkey-hash (P2PKH) transaction.
AddressScriptHash is an Address for a pay-to-script-hash (P2SH) transaction.
Block defines a kaspa block that provides easier and more efficient manipulation of raw blocks.
Tx defines a kaspa transaction that provides easier and more efficient manipulation of raw transactions.
# Interfaces
Address is an interface type for any type of destination a transaction output may spend to.
# Type aliases
Amount represents the base kaspa monetary unit (colloquially referred to as a `Sompi').
AmountUnit describes a method of converting an Amount to something other than the base unit of a kaspa.
Bech32Prefix is the human-readable prefix for a Bech32 address.
OutOfRangeError describes an error due to accessing an element that is out of range.