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.ChainId
Hexadecimal string representing the chain ID.
config
Returns the protocol configuration for the current chain.ChainConfig
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.str
Address prefix string used in public keys (e.g., “STM” for mainnet).
Asset factories
hive
Provides methods to create HIVE assets in NAI format.AssetFactory
Factory object with
coins() and satoshis() methods for creating HIVE assets.hbd
Provides methods to create HBD (Hive Backed Dollar) assets in NAI format.AssetFactory
Factory object with
coins() and satoshis() methods for creating HBD assets.vests
Provides methods to create VESTS (Hive Power) assets in NAI format.AssetFactory
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.str
required
Block ID (usually the head block) that the transaction references for TAPOS.
TTimestamp | None
default:"timedelta(minutes=1)"
Time until transaction expires. Can be a
datetime (absolute UTC time) or timedelta (relative duration). Defaults to 1 minute from now.ITransaction
Transaction object ready for operations to be pushed.
create_transaction_from_proto
Creates a transaction object from a proto transaction.ProtoTransaction
required
Proto transaction object to convert.
ITransaction
Transaction object.
create_transaction_from_json
Creates a transaction object from a JSON transaction.JsonTransaction
required
JSON string or dict representing the transaction.
ITransaction
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.AccountName
required
Account name to validate.
bool
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
required
Operation in HF26 format or proto operation.
list[AccountName]
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.IBrainKeyData
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.AccountName
required
Account name.
str
required
Key role:
"active", "owner", "posting", or "memo".str
required
Master password to derive the key from.
IPrivateKeyData
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.Hex
required
Signature digest in hexadecimal format.
Signature
required
Signature in hexadecimal format.
PublicKey
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.str
required
Text content to scan for private keys.
AccountName
required
Account name to check keys against.
WaxAuthorities
required
Account’s authority structure.
PublicKey
required
Account’s memo key.
list[PublicKey] | None
default:"None"
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).VestsNaiAssetConvertible
required
VESTS amount to convert.
HiveNaiAssetConvertible
required
Total vesting fund in HIVE (from dynamic global properties).
Total vesting shares in VESTS (from dynamic global properties).
NaiAsset
Converted amount in HIVE (HP).
hbd_to_hive
Converts HBD to HIVE using current price feed.HbdNaiAssetConvertible
required
HBD amount to convert.
HbdNaiAssetConvertible
required
Price feed base (HBD).
HiveNaiAssetConvertible
required
Price feed quote (HIVE).
NaiAsset
Converted amount in HIVE.
hive_to_hbd
Converts HIVE to HBD using current price feed.HiveNaiAssetConvertible
required
HIVE amount to convert.
HbdNaiAssetConvertible
required
Price feed base (HBD).
HiveNaiAssetConvertible
required
Price feed quote (HIVE).
NaiAsset
Converted amount in HBD.
Calculation methods
calculate_current_manabar_value
Calculates the current manabar value and percentage.datetime
required
Current head block time from dynamic global properties.
int
required
Maximum mana value for the account.
int
required
Current mana value from account data.
int
required
Last manabar update time from account data.
IManabarData
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.datetime
required
Current head block time.
int
required
Maximum mana value.
int
required
Current mana value.
int
required
Last update time.
datetime
Datetime when the manabar will be fully regenerated.
calculate_account_hp
Calculates account Hive Power from VESTS.VestsNaiAssetConvertible
required
Account VESTS.
HiveNaiAssetConvertible
required
Total vesting fund in HIVE.
Total vesting shares.
NaiAsset
Calculated HP (HIVE).
calculate_witness_votes_hp
Calculates witness votes in HP terms.int
required
Witness vote count.
HiveNaiAssetConvertible
required
Total vesting fund in HIVE.
Total vesting shares.
NaiAsset
Witness votes in HP (HIVE).
calculate_hp_apr
Calculates the Hive Power annual percentage rate.int
required
Current head block number.
int
required
Vesting reward percent (basis points).
HiveNaiAssetConvertible
required
Virtual HIVE supply.
HiveNaiAssetConvertible
required
Total vesting fund in HIVE.
Decimal
HP APR percentage with 2 decimal places.
estimate_hive_collateral
Estimates HIVE collateral needed for HBD conversion.HbdNaiAssetConvertible
required
Current median price base (HBD) from feed history.
HiveNaiAssetConvertible
required
Current median price quote (HIVE) from feed history.
HbdNaiAssetConvertible
required
Current minimum price base (HBD) from feed history.
HiveNaiAssetConvertible
required
Current minimum price quote (HIVE) from feed history.
HbdNaiAssetConvertible
required
Target HBD amount.
NaiAsset
Estimated HIVE collateral required.
estimate_hbd_interest
Estimates HBD interest for savings.int
required
Accumulated HBD seconds from account data.
HbdNaiAssetConvertible
required
Current HBD savings balance.
datetime
required
Last interest capitalization date.
datetime
required
Current date/time.
int
required
Interest rate in basis points (0-10000).
NaiAsset
Estimated HBD interest.