IWaxBaseInterface provides all offline blockchain operations. It’s the base interface returned by create_wax_foundation() and is also inherited by IHiveChainInterface.
Properties
chain_id
Returns the chain identifier for the current instance.Hexadecimal string representing the chain ID.
config
Returns the protocol configuration for the current chain.Dictionary containing chain configuration parameters like
HIVE_CHAIN_ID, HIVE_ADDRESS_PREFIX, block intervals, and other protocol constants.address_prefix
Returns the public key address prefix for the current chain.Address prefix string used in public keys (e.g., “STM” for mainnet).
Asset factories
hive
Provides methods to create HIVE assets in NAI format.Factory object with
coins() and satoshis() methods for creating HIVE assets.hbd
Provides methods to create HBD (Hive Backed Dollar) assets in NAI format.Factory object with
coins() and satoshis() methods for creating HBD assets.vests
Provides methods to create VESTS (Hive Power) assets in NAI format.Factory object with
coins() and satoshis() methods for creating VESTS assets (6-decimal precision).Transaction creation
create_transaction_with_tapos
Creates a transaction object with TAPOS (Transaction as Proof of Stake) data.Block ID (usually the head block) that the transaction references for TAPOS.
Time until transaction expires. Can be a
datetime (absolute UTC time) or timedelta (relative duration). Defaults to 1 minute from now.Transaction object ready for operations to be pushed.
create_transaction_from_proto
Creates a transaction object from a proto transaction.Proto transaction object to convert.
Transaction object.
create_transaction_from_json
Creates a transaction object from a JSON transaction.JSON string or dict representing the transaction.
Transaction object.
WaxValidationFailedError if the transaction JSON is invalid.
Validation methods
is_valid_account_name
Checks if an account name is valid according to Hive rules.Account name to validate.
True if the account name is valid, False otherwise.get_operation_impacted_accounts
Retrieves the list of account names impacted by a given operation.Operation in HF26 format or proto operation.
List of account names impacted by the operation.
InvalidOperationFormatError or WaxValidationFailedError if the operation is invalid.
Cryptographic operations
suggest_brain_key
Generates a new brain key with associated private and public keys.Object containing:
brain_key: Space-separated list of 16 random wordswif_private_key: First private key derived from the brain keyassociated_public_key: Public key in WIF format
get_private_key_from_password
Derives a private key from an account name, role, and master password.Account name.
Key role:
"active", "owner", "posting", or "memo".Master password to derive the key from.
Object containing:
wif_private_key: Derived private key in WIF formatassociated_public_key: Associated public key in WIF format
get_public_key_from_signature
Retrieves the public key from a signature and signature digest.Signature digest in hexadecimal format.
Signature in hexadecimal format.
Public key in WIF format that was used to create the signature.
WaxValidationFailedError if parameters are invalid.
scan_text_for_matching_private_keys
Scans content for private keys that match account authorities.Text content to scan for private keys.
Account name to check keys against.
Account’s authority structure.
Account’s memo key.
Additional keys to check.
PrivateKeyDetectedInMemoError if a matching private key is found in the content.
Asset conversions
vests_to_hp
Converts VESTS to Hive Power (HP).VESTS amount to convert.
Total vesting fund in HIVE (from dynamic global properties).
Total vesting shares in VESTS (from dynamic global properties).
Converted amount in HIVE (HP).
hbd_to_hive
Converts HBD to HIVE using current price feed.HBD amount to convert.
Price feed base (HBD).
Price feed quote (HIVE).
Converted amount in HIVE.
hive_to_hbd
Converts HIVE to HBD using current price feed.HIVE amount to convert.
Price feed base (HBD).
Price feed quote (HIVE).
Converted amount in HBD.
Calculation methods
calculate_current_manabar_value
Calculates the current manabar value and percentage.Current head block time from dynamic global properties.
Maximum mana value for the account.
Current mana value from account data.
Last manabar update time from account data.
Object containing:
max_mana: Maximum manacurrent_mana: Current regenerated manapercent: Manabar percentage (0-100)
calculate_manabar_full_regeneration_time
Calculates when the manabar will be fully regenerated.Current head block time.
Maximum mana value.
Current mana value.
Last update time.
Datetime when the manabar will be fully regenerated.
calculate_account_hp
Calculates account Hive Power from VESTS.Account VESTS.
Total vesting fund in HIVE.
Total vesting shares.
Calculated HP (HIVE).
calculate_witness_votes_hp
Calculates witness votes in HP terms.Witness vote count.
Total vesting fund in HIVE.
Total vesting shares.
Witness votes in HP (HIVE).
calculate_hp_apr
Calculates the Hive Power annual percentage rate.Current head block number.
Vesting reward percent (basis points).
Virtual HIVE supply.
Total vesting fund in HIVE.
HP APR percentage with 2 decimal places.
estimate_hive_collateral
Estimates HIVE collateral needed for HBD conversion.Current median price base (HBD) from feed history.
Current median price quote (HIVE) from feed history.
Current minimum price base (HBD) from feed history.
Current minimum price quote (HIVE) from feed history.
Target HBD amount.
Estimated HIVE collateral required.
estimate_hbd_interest
Estimates HBD interest for savings.Accumulated HBD seconds from account data.
Current HBD savings balance.
Last interest capitalization date.
Current date/time.
Interest rate in basis points (0-10000).
Estimated HBD interest.