package
6.17.1+incompatible
Repository: https://github.com/factomproject/factomd.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
No description provided by the author
AreBinaryMarshallablesEqual returns true if the input interfaces are both nil, or both exist and can be marshalled into byte identical arrays.
AreBytesEqual returns true iff the lengths and byte values of the input []byte arrays are equal.
No description provided by the author
No description provided by the author
The root of the Merkle Tree is returned in merkles[len(merkles)-1].
Byte32ToByteSlice32 returns a new ByteSlice32 containing the input data.
No description provided by the author
No description provided by the author
Give a list of hashes, return the root of the Merkle Tree.
Convert Factoid and Entry Credit addresses to their more user friendly and human readable formats.
Converts factoshis to floating point factoids.
Take fixed point data and produce a nice decimal point sort of output that users can handle.
Converts factoshis to floating point string.
Convert Entry Credits.
Convert Entry Credit Private key.
Convert Factoid Addresses.
Convert Factoid Private Key.
Convert Decimal point input to FixedPoint (no decimal point) output suitable for Factom to chew on.
Convert a User facing Factoid or Entry Credit address or their Private Key representations to the regular form.
No description provided by the author
CreateHash returns a hash created from all input entities.
DecodeBinary returns a byte array of the decoded input hexadecimal (0-F) string.
DecodeJSON unmarshals input []byte into input interface.
DecodeJSONString unmarshals input string into input interface.
DecodeVarInt decodes a variable integer from the given data buffer.
DecodeVarIntGo decodes a variable integer from the given data buffer.
DoubleSha returns a new hash created by double hashing the input: shad Double Sha256 Hash; sha256(sha256(data)).
No description provided by the author
EncodeBinary returns the hexadecimal (0-F) encoding of input byte array.
EncodeJSON marshals data into Json format.
EncodeJSONString marshals data into Json format.
EncodeJSONToBuffer marshals input data into Json format and writes it to the input buffer.
EncodeVarInt encodes an integer as a variable int into the given data buffer.
EncodeVarIntGo encodes an integer as a variable int into the given data buffer.
No description provided by the author
No description provided by the author
No description provided by the author
HashMerkleBranches takes two hashes, treated as the left and right tree nodes, and returns the hash of their concatenation.
HexToHash converts the input hexidecimal (0-F) string into the internal []byte array.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Log prints the formated string with args (using fmt.Printf) with a prepended file and line number of the calling function: "<file>:<linenumber> - <fmt.Printf_output>\n".
Loghash logs the input interface.
Loghashfixed logs the input hash***************************************************************
DEBUG logging to keep full hash.
LogJSONs converts input args to Json format and then prints the formated string with new Json args (using fmt.Printf) with a prepended file and line number of the calling function: "<file>:<linenumber> - <fmt.Printf_output>\n".
No description provided by the author
No description provided by the author
No description provided by the author
NewBuffer copies the input []byte array int a new Buffer object and returns the Buffer.
NewHash creates a new object for the input hash.
NewJSON2Request creates a new JSON2Request with the input parameters.
NewJSON2RequestBlank creates a new blank JSON2Request object with only the JSONRPC field filled (because it has 1 acceptable value).
NewJSON2Response returns a new JSON2Response initialized with defaults.
NewJSONError returns a new JSONError struct filled with the inputs.
NewPrivateKeyFromHex creates a new private key from a hex string.
NewPrivateKeyFromHexBytes creates a new private key from hex []byte.
NewShaHash returns a new ShaHash from a byte slice.
NewShaHashFromStr creates a ShaHash from a hash string.
NewShaHashFromStruct marshals the input struct into a json byte array, then double hashes the json array.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewZeroHash creates a new zero hash object.
NextPowerOfTwo returns the next highest power of two from a given number if it is not already a power of two.
ParseJSON2Request unmarshals a string into a JSON2Request object.
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
PubKeyFromString decodes an input string into a public key.
RandomByteSlice returns a random non empty ByteSlice of length 1 <= len <= 63.
RandomHash returns a new random hash.
RandomPrivateKey returns a new random private key.
No description provided by the author
RandomVarInt returns a random variable integer.
Sha creates a Sha256 Hash from a byte array.
Sha512Half creates a Sha512[:256] Hash from a byte array.
Shad returns a new hash created by double hashing the input: Double Sha256 Hash; sha256(sha256(data)).
No description provided by the author
No description provided by the author
StringToByteSlice converts the input string to a ByteSlice.
StringToByteSlice32 converts the input hexidecimal string (0-F) to a new ByteSlice32.
UnmarshalBinaryDataOfLength unmarshals an arbitrary input []byte array up to specified length, returning residual.
Validate Entry Credit Private Key.
Validate Entry Credits.
Validate Factoid Private Key.
Validate Factoids.
VarIntLength returns the length of the variable integer when encoded as a var int.
Verify returns true iff sig is a valid signature of message by publicKey.
No description provided by the author
VerifySlice returns true iff sig is a valid signature of message by publicKey.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
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
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
# Variables
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
ZeroHash is a zero hash.
# Structs
Buffer contains a bytes.Buffer.
ByteSlice contains a []byte.
No description provided by the author
JSON2Request is an JSON RPC request object used in factomd according to the specification for JSON RPC 2.0 See specification: https://www.jsonrpc.org/specification Remote Proceedure Call (RPC) is a protocol for executing subroutines on a remote.
JSON2Response is an JSON RPC response object used in factomd according to the specification for JSON RPC 2.0 See specification: https://www.jsonrpc.org/specification Remote Proceedure Call (RPC) is a protocol for executing subroutines on a remote.
JSONError is an JSON RPC error object used in factomd according to the specification for JSON RPC 2.0 See specification: https://www.jsonrpc.org/specification Remote Proceedure Call (RPC) is a protocol for executing subroutines on a remote.
No description provided by the author
PrivateKey contains Public/Private key pair.
type DetachedSignature [ed25519.SignatureSize]byte
type DetachedPublicKey [ed25519.PublicKeySize]byte
*/Signature has signed data and its corresponding PublicKey.
# Type aliases
ByteSlice20 is a fixed [20]byte.
ByteSlice32 is a fixed [32]byte array.
ByteSlice6 is a fixed [6]byte array.
ByteSlice64 is a fixed [64]byte array.
ByteSliceSig is a fixed byte array of the ed25519 signature length.
Hash is a convenient fixed []byte type created at the hash length.
PublicKey contains only Public part of Public/Private key pair.
A structure for handling timestamps for messages.