# Functions
ApiKeyMiddleware is a middleware function that checks for a valid API key in the request header.
ConvertToFloat64 converts various types to float64.
No description provided by the author
DeriveKeyPair derives a public/private key pair from a given mnemonic passphrase.
DeserializeBlock deserializes a byte slice into a Block.
GenerateMnemonic generates a new 12-word mnemonic passphrase.
GenerateRandomPassword generates a random password that meets the following requirements: - Length between 12 and 24 characters - At least 2 uppercase letters - At least 2 lowercase letters - At least 2 digits - At least 2 special characters
If the generated password does not meet these requirements, an error is returned.
GenerateWalletAddress generates a wallet address from a given public key.
/ GetLocalStorage returns the singleton instance of the LocalStorage struct, which provides access to the / data persist manager using the Go standard library's file system.
No description provided by the author
GetType returns the type name of the provided interface{} value.
GetUserIP returns the IP address of the client making the HTTP request.
IntToBytes converts an integer to a byte slice in big-endian encoding.
LocalStorageAvailable returns a boolean indicating whether the LocalStorage instance has been initialized.
LocalWalletCount returns the number of wallets in the wallet folder.
LocalWalletList searches the wallet folder for all JSON files, loads each one, and displays the Wallet ID, Name, Address, and Tags.
Name returns the name of the SDK.
NewAddress creates a new Address with the given raw address and blockchain symbol.
NewAPI creates a new instance of the blockchain API.
NewArguments creates a new Arguments instance.
NewBankTransaction creates a new Bank transaction.
NewBigInt creates a new BigInt instance.
NewBigIntFromBytes creates a new BigInt instance from a byte slice.
NewBigIntFromString creates a new BigInt instance from a string representation.
NewBlock creates a new block with the given transactions and previous hash.
NewBlockchain creates a new instance of the Blockchain struct with the provided configuration.
NewCoinbaseTransaction creates a new coinbase transaction.
NewConfig creates a new configuration object with default values.
NewDefaultEncryptionParams creates a new EncryptionParams struct with default values.
NewEncryptionParams creates a new EncryptionParams struct with the specified salt and nonce sizes.
NewFIFOQueue creates a new FIFO queue with the specified capacity.
NewLocalStorage creates a new instance of the LocalStorage struct, which is the data persist manager using the Go standard library's file system.
NewMerkleNode creates a new Merkle node.
NewMerkleTree creates a new Merkle tree from a list of data.
NewMessageTransaction creates a new message transaction.
No description provided by the author
NewNodeOptions creates a new NodeOptions instance.
NewP2P creates a new P2P network.
NewPEM creates a new PEM struct containing the PEM-encoded private and public keys for the provided ECDSA private key.
NewPersistTransaction creates a new Persist transaction.
NewPUID creates a new PUID instance.
NewPUIDEmpty creates a new PUID instance with all fields set to zero.
NewPUIDFromString creates a new PUID instance from a string representation.
NewPUIDThis creates a new PUID for this blockchain using the ThisBlockchain* constants.
NewRandomBigInt creates a new BigInt instance with a random value.
NewTransaction creates a new transaction with the specified protocol, sender wallet, and recipient wallet.
NewTXLookupManager returns a new TXLookupManager instance.
NewVault creates a new Vault struct.
No description provided by the author
NewWallet creates a new wallet with a unique ID, name, and set of tags.
NewWalletOptions creates a new WalletOptions struct with the provided parameters.
No description provided by the author
PrettyPrint takes an arbitrary interface{} value and returns a formatted string representation of the value.
RespondError sends an error response with the given status code and message.
No description provided by the author
SendGmail sends an email using the provided Gmail account configuration.
ValidateAddress validates the provided Ethereum address string.
VerifySignature verifies the provided signature against the given message and public key.
Version returns the version of the SDK.
# Constants
Protocol IDs.
No description provided by the author
1 is reserved for this blockchain's Core.
No description provided by the author
No description provided by the author
Blockchain Identification.
No description provided by the author
No description provided by the author
1 is reserved for this blockchain "Go Basic Blockchain".
BlockRewardHalvingInterval is the number of blocks between each halving of the block reward.
Protocol IDs.
Protocol IDs.
Feature Flags.
InitialBlockReward is the initial reward for mining a block.
InitialDifficulty is the starting difficulty for mining blocks.
Maximum block size in bytes (1MB).
Protocol IDs.
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
Protocol IDs.
No description provided by the author
No description provided by the author
No description provided by the author
Protocol Versions.
TransactionVersion represents the current version of the transaction structure.
# Variables
Args is the global Arguments instance.
AvailableProtocols is a list of all available protocols.
ErrNoArgs is returned when the program is started with no arguments.
HTML is the HTML5 object.
RequiredWalletProperties is a list of required properties for a wallet.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These are required and will be created when a new blockchain is created.
# Structs
Address represents a blockchain address.
API is the blockchain API.
APIKeyConfig is a configuration struct that holds the API key header name and a map of API keys.
Arguments handles parsing arguments and displaying usage information.
Bank is a transaction that represents a bank transfer.
bigint -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (64-bit).
Block represents a block in the blockchain.
Blockchain is the main struct that represents the blockchain.
BlockchainData represents the data persisted for a blockchain.
BlockchainInfo represents information about a blockchain, including its version, name, symbol, block time, difficulty, and transaction fee.
BlockchainPersistData represents the data that is persisted for a blockchain to disk.
BlockHeader represents the header of a block in the blockchain.
BlockQueryCriteria represents the criteria for querying blocks.
BloomFilter represents a Bloom filter for quick transaction lookups.
Coinbase represents a coinbase transaction, which is a special type of transaction that is used to reward miners for mining a new block.
Config is the configuration for the blockchain.
EncryptionParams holds the encryption parameters for the private key.
ErrorResponse represents the structure of an error response.
FIFOQueue represents a FIFO queue with a maximum capacity.
Flag contains information for every argument.
HTML5 is a struct to hold the HTML5 settings & methods.
IndexEntry is a struct that contains the blockNumber, txID and txHash for a transaction.
LocalStorage represents the data persist manager using the Go standard library's file system.
LocalStorageOptions represents the options for the LocalStorage data persist manager.
MerkleNode represents a node in the Merkle tree.
MerkleTree represents a Merkle tree of transactions.
Message is a transaction that represents a message sent from one user to another.
Node is a node in the blockchain network.
NodeData represents a node in the system, with an ID and a Name.
No description provided by the author
NodeOptions is the options for a node.
NodePersistData is the data that is persisted for a node to disk.
No description provided by the author
P2P represents the P2P network.
P2PTransaction represents a transaction to be processed.
PEM is a struct that holds the PEM encoded private and public keys for a cryptographic key pair.
Persist is a transaction protocol for storing key/value pairs on the blockchain with indexing support.
No description provided by the author
State represents the current state of the blockchain.
TransactionQueryCriteria represents the criteria for querying transactions.
Tx is a generic transaction that represents a transfer of value between two wallets.
TXLookupManager is a struct that contains the index and methods for manipulating/searching the index to find blocks and transactions by either ID or Hash.
Vault is a struct that holds the data (keypairs) associated with the wallet as well as the private key and PEM encoded keys.
Wallet represents a user's wallet.
WalletOptions is a struct that contains the required options for creating a new wallet.
# Interfaces
Transaction is an interface that defines the common methods for all Dynamic Protocol based transactions.
# Type aliases
APIKeyList is a map of API keys to their corresponding values.
Index is a map of Block Number/Index (Key) and Transaction ID (Value) that is stored in memory and persisted to disk.
P2PTransactionState represents the current state of a P2P transaction.
TransactionStatus represents the possible states of a transaction.