Complete API reference
Generated by
tools/generate_documentation.py. Do not edit this page by hand.
This reference is generated from the installed Python classes and the stable RPC result registry. Parameters are positional on the wire even when Python callers use keyword arguments.
Conventions
- RPC methods perform I/O and return a validated typed result.
- AccountBlock builder methods are synchronous, perform no I/O, and return an unsigned block.
- Subscription helper methods require
WsClientand return an async iterator. - Page indices are zero-based unless a method explicitly accepts a block height.
- Decimal-string RPC results are converted to arbitrary-precision Python
intvalues.
LedgerApi
Account blocks, momentums, balances, and transaction publication.
Import: znn.api.ledger.LedgerApi
Constructor: LedgerApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async publish_raw_transaction(account_block: znn.model.nom.account_block.AccountBlock) | RPC | ledger.publishRawTransaction | null |
async get_unconfirmed_blocks_by_address(address: str, page_index=0, page_size=50) | RPC | ledger.getUnconfirmedBlocksByAddress | AccountBlockList |
async get_unreceived_blocks_by_address(address: str, page_index=0, page_size=50) | RPC | ledger.getUnreceivedBlocksByAddress | AccountBlockList |
async get_frontier_account_block(address: str) | RPC | ledger.getFrontierAccountBlock | AccountBlock or null |
async get_account_block_by_hash(hashstr: str) | RPC | ledger.getAccountBlockByHash | AccountBlock or null |
async get_account_blocks_by_height(address: str, height=1, count=1024) | RPC | ledger.getAccountBlocksByHeight | AccountBlockList |
async get_account_blocks_by_page(address: str, page_index=0, page_size=1024) | RPC | ledger.getAccountBlocksByPage | AccountBlockList |
async get_frontier_momentum() | RPC | ledger.getFrontierMomentum | Momentum |
async get_momentum_before_time(time: int) | RPC | ledger.getMomentumBeforeTime | Momentum or null |
async get_momentum_by_hash(hashstr: str) | RPC | ledger.getMomentumByHash | Momentum or null |
async get_momentums_by_page(page_index=0, page_size=1024) | RPC | ledger.getMomentumsByPage | MomentumList |
async get_momentums_by_height(height=1, count=1024) | RPC | ledger.getMomentumsByHeight | MomentumList |
async get_detailed_momentums_by_height(height=1, count=1024) | RPC | ledger.getDetailedMomentumsByHeight | DetailedMomentumList or null |
async get_account_info_by_address(address: str) | RPC | ledger.getAccountInfoByAddress | AccountInfo or null |
StatsApi
Node operating-system, process, network, and synchronization state.
Import: znn.api.stats.StatsApi
Constructor: StatsApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async os_info() | RPC | stats.osInfo | OsInfo |
async process_info() | RPC | stats.processInfo | ProcessInfo |
async network_info() | RPC | stats.networkInfo | NetworkInfo |
async sync_info() | RPC | stats.syncInfo | SyncInfo |
SubscribeApi
Canonical WebSocket subscription topics and normalized async iterators.
Import: znn.api.subscribe.SubscribeApi
Constructor: SubscribeApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async subscribe_to(topic: str, address: str | None = None) | Subscription helper | ledger.subscribe | Subscription |
async to_momentums() | Subscription helper | — | Subscription |
async to_all_account_blocks() | Subscription helper | — | Subscription |
async to_account_blocks_by_address(address: str) | Subscription helper | — | Subscription |
async to_unreceived_account_blocks_by_address(address: str) | Subscription helper | — | Subscription |
AcceleratorApi
Accelerator projects, phases, votes, donations, and updates.
Import: znn.api.embedded.accelerator.AcceleratorApi
Constructor: AcceleratorApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_all(page_index=0, page_size=1024) | RPC | embedded.accelerator.getAll | ProjectList |
async get_account_blocks_by_page(page_index=0, page_size=1024) | Compatibility alias | — | Same as canonical method |
async get_project_by_id(project_id: str) | RPC | embedded.accelerator.getProjectById | Project |
async get_phase_by_id(phase_id: str) | RPC | embedded.accelerator.getPhaseById | Phase |
async get_pillar_votes(name: str, hashes) | RPC | embedded.accelerator.getPillarVotes | array |
async get_vote_breakdown(hash_id: str) | RPC | embedded.accelerator.getVoteBreakdown | VoteBreakdown |
create_project(name: str, description: str, url: str, znn_funds_needed: int, qsr_funds_needed: int) | AccountBlock builder | — | AccountBlock |
add_phase(hash_id: znn.model.primitives.hash.Hash, name: str, description: str, url: str, znn_funds_needed: int, qsr_funds_needed: int) | AccountBlock builder | — | AccountBlock |
update_phase(hash_id: znn.model.primitives.hash.Hash, name: str, description: str, url: str, znn_funds_needed: int, qsr_funds_needed: int) | AccountBlock builder | — | AccountBlock |
donate(amount: int, zts: znn.model.primitives.token_standard.TokenStandard) | AccountBlock builder | — | AccountBlock |
vote_by_name(hash_id: znn.model.primitives.hash.Hash, pillar_name: str, vote: int) | AccountBlock builder | — | AccountBlock |
vote_by_prod_address(hash_id: znn.model.primitives.hash.Hash, vote: int) | AccountBlock builder | — | AccountBlock |
BridgeApi
Bridge networks, wrap/unwrap requests, security, and administration.
Import: znn.api.embedded.bridge.BridgeApi
Constructor: BridgeApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_all_networks(page_index=0, page_size=1024) | RPC | embedded.bridge.getAllNetworks | BridgeNetworkInfoList |
async get_all_unsigned_wrap_token_requests(page_index=0, page_size=1024) | RPC | embedded.bridge.getAllUnsignedWrapTokenRequests | WrapTokenRequestList |
async get_all_unwrap_token_requests(page_index=0, page_size=1024) | RPC | embedded.bridge.getAllUnwrapTokenRequests | UnwrapTokenRequestList |
async get_all_unwrap_token_requests_by_to_address(to_address: str, page_index=0, page_size=1024) | RPC | embedded.bridge.getAllUnwrapTokenRequestsByToAddress | UnwrapTokenRequestList |
async get_all_wrap_token_requests(page_index=0, page_size=1024) | RPC | embedded.bridge.getAllWrapTokenRequests | WrapTokenRequestList |
async get_all_wrap_token_requests_by_to_address(to_address: str, page_index=0, page_size=1024) | RPC | embedded.bridge.getAllWrapTokenRequestsByToAddress | WrapTokenRequestList |
async get_all_wrap_token_requests_by_to_address_network_class_and_chain_id(to_address: str, network_class: int, chain_id: int, page_index=0, page_size=1024) | RPC | embedded.bridge.getAllWrapTokenRequestsByToAddressNetworkClassAndChainId | WrapTokenRequestList |
async get_bridge_info() | RPC | embedded.bridge.getBridgeInfo | BridgeInfo |
async get_fee_token_pair(zts: znn.model.primitives.token_standard.TokenStandard) | RPC | embedded.bridge.getFeeTokenPair | ZtsFeesInfo |
async get_network_info(network_class: int, chain_id: int) | RPC | embedded.bridge.getNetworkInfo | BridgeNetworkInfo |
async get_orchestrator_info() | RPC | embedded.bridge.getOrchestratorInfo | OrchestratorInfo |
async get_security_info() | RPC | embedded.bridge.getSecurityInfo | SecurityInfo |
async get_time_challenges_info() | RPC | embedded.bridge.getTimeChallengesInfo | TimeChallengesList |
async get_unwrap_token_request_by_hash_and_log(tx_hash: znn.model.primitives.hash.Hash, log_index: int) | RPC | embedded.bridge.getUnwrapTokenRequestByHashAndLog | UnwrapTokenRequest |
async get_wrap_token_request_by_id(id: znn.model.primitives.hash.Hash) | RPC | embedded.bridge.getWrapTokenRequestById | WrapTokenRequest |
change_administrator(administrator: znn.model.primitives.address.Address) | AccountBlock builder | — | AccountBlock |
change_tss_e_c_d_s_a_pub_key(pub_key: str, old_pub_key_signature: str, new_pub_key_signature: str) | AccountBlock builder | — | AccountBlock |
emergency() | AccountBlock builder | — | AccountBlock |
halt(signature: str) | AccountBlock builder | — | AccountBlock |
nominate_guardians(guardians: list) | AccountBlock builder | — | AccountBlock |
propose_administrator(address: znn.model.primitives.address.Address) | AccountBlock builder | — | AccountBlock |
redeem(transaction_hash: znn.model.primitives.hash.Hash, log_index: int) | AccountBlock builder | — | AccountBlock |
remove_network(network_class: int, chain_id: int) | AccountBlock builder | — | AccountBlock |
remove_token_pair(network_class: int, chain_id: int, token_standard: znn.model.primitives.token_standard.TokenStandard, token_address: str) | AccountBlock builder | — | AccountBlock |
revoke_unwrap_request(transaction_hash: znn.model.primitives.hash.Hash, log_index: int) | AccountBlock builder | — | AccountBlock |
set_allow_key_gen(allow_key_gen: bool) | AccountBlock builder | — | AccountBlock |
set_bridge_metadata(metadata: str) | AccountBlock builder | — | AccountBlock |
set_network(network_class: int, chain_id: int, name: str, contract_address: str, metadata: str) | AccountBlock builder | — | AccountBlock |
set_network_metadata(network_class: int, chain_id: int, metadata: str) | AccountBlock builder | — | AccountBlock |
set_orchestrator_info(window_size: int, key_gen_threshold: int, confirmations_to_finality: int, estimated_momentum_time: int) | AccountBlock builder | — | AccountBlock |
set_token_pair(network_class: int, chain_id: int, token_standard: znn.model.primitives.token_standard.TokenStandard, token_address: str, bridgeable: bool, redeemable: bool, owned: bool, min_amount: int, fee_percentage: int, redeem_delay: int, metadata: str) | AccountBlock builder | — | AccountBlock |
unhalt() | AccountBlock builder | — | AccountBlock |
unwrap_token(network_class: int, chain_id: int, transaction_hash: znn.model.primitives.hash.Hash, log_index: int, to_address: znn.model.primitives.address.Address, token_address: str, amount: int, signature: str) | AccountBlock builder | — | AccountBlock |
update_wrap_request(id: znn.model.primitives.hash.Hash, signature: str) | AccountBlock builder | — | AccountBlock |
wrap_token(network_class: int, chain_id: int, to_address: str, amount: int, token_standard: znn.model.primitives.token_standard.TokenStandard) | AccountBlock builder | — | AccountBlock |
HtlcApi
HTLC lookup, proxy-unlock policy, creation, reclaim, and unlock.
Import: znn.api.embedded.htlc.HtlcApi
Constructor: HtlcApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_by_id(id: znn.model.primitives.hash.Hash) | RPC | embedded.htlc.getById | HtlcInfo |
async get_proxy_unlock_status(address: znn.model.primitives.address.Address) | RPC | embedded.htlc.getProxyUnlockStatus | boolean |
allow_proxy_unlock() | AccountBlock builder | — | AccountBlock |
create(token: znn.model.primitives.token_standard.TokenStandard, amount: int, hash_locked: znn.model.primitives.address.Address, expiration_time: int, hash_type: int, key_max_size: int, hash_lock: bytes | None) | AccountBlock builder | — | AccountBlock |
deny_proxy_unlock() | AccountBlock builder | — | AccountBlock |
reclaim(id: znn.model.primitives.hash.Hash) | AccountBlock builder | — | AccountBlock |
unlock(id: znn.model.primitives.hash.Hash, preimage: bytes | None) | AccountBlock builder | — | AccountBlock |
LiquidityApi
Liquidity state, rewards, stakes, security, and administration.
Import: znn.api.embedded.liquidity.LiquidityApi
Constructor: LiquidityApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_frontier_reward_by_page(address: znn.model.primitives.address.Address, page_index=0, page_size=1024) | RPC | embedded.liquidity.getFrontierRewardByPage | RewardHistoryList |
async get_liquidity_info() | RPC | embedded.liquidity.getLiquidityInfo | LiquidityInfo |
async get_liquidity_stake_entries_by_address(address: znn.model.primitives.address.Address, page_index=0, page_size=50) | RPC | embedded.liquidity.getLiquidityStakeEntriesByAddress | LiquidityStakeList |
async get_security_info() | RPC | embedded.liquidity.getSecurityInfo | SecurityInfo |
async get_time_challenges_info() | RPC | embedded.liquidity.getTimeChallengesInfo | TimeChallengesList |
async get_uncollected_reward(address: znn.model.primitives.address.Address) | RPC | embedded.liquidity.getUncollectedReward | RewardDeposit |
cancel_liquidity_stake(id: znn.model.primitives.hash.Hash) | AccountBlock builder | — | AccountBlock |
change_administrator(administrator: znn.model.primitives.address.Address) | AccountBlock builder | — | AccountBlock |
collect_reward() | AccountBlock builder | — | AccountBlock |
emergency() | AccountBlock builder | — | AccountBlock |
liquidity_stake(duration_in_sec: int, amount: int, zts: znn.model.primitives.token_standard.TokenStandard) | AccountBlock builder | — | AccountBlock |
nominate_guardians(guardians: list) | AccountBlock builder | — | AccountBlock |
propose_administrator(address: znn.model.primitives.address.Address) | AccountBlock builder | — | AccountBlock |
set_additional_reward(znn_reward: int, qsr_reward: int) | AccountBlock builder | — | AccountBlock |
set_is_halted(is_halted: bool) | AccountBlock builder | — | AccountBlock |
set_token_tuple(token_standards: list, znn_percentages: list, qsr_percentages: list, min_amounts: list) | AccountBlock builder | — | AccountBlock |
unlock_liquidity_stake_entries(zts: znn.model.primitives.token_standard.TokenStandard) | AccountBlock builder | — | AccountBlock |
PillarApi
Pillar discovery, registration, delegation, rewards, and QSR management.
Import: znn.api.embedded.pillar.PillarApi
Constructor: PillarApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_deposited_qsr(pillar_address: znn.model.primitives.address.Address) | RPC | embedded.pillar.getDepositedQsr | decimal-string |
async get_uncollected_reward(pillar_address: znn.model.primitives.address.Address) | RPC | embedded.pillar.getUncollectedReward | UncollectedReward |
async get_frontier_reward_by_page(pillar_address: znn.model.primitives.address.Address, page_index=0, page_size=1024) | RPC | embedded.pillar.getFrontierRewardByPage | RewardHistoryList |
async get_qsr_registration_cost() | RPC | embedded.pillar.getQsrRegistrationCost | decimal-string |
async get_all(page_index=0, page_size=1024) | RPC | embedded.pillar.getAll | PillarInfoList |
async get_by_owner(pillar_address: znn.model.primitives.address.Address) | RPC | embedded.pillar.getByOwner | array |
async get_by_name(pillar_name: str) | RPC | embedded.pillar.getByName | PillarInfo or null |
async check_name_availability(name: str) | RPC | embedded.pillar.checkNameAvailability | boolean |
async get_delegated_pillar(pillar_address: znn.model.primitives.address.Address) | RPC | embedded.pillar.getDelegatedPillar | DelegationInfo or null |
async get_pillar_epoch_history(name: str, page_index=0, page_size=1024) | RPC | embedded.pillar.getPillarEpochHistory | PillarEpochHistoryList |
async get_pillars_history_by_epoch(epoch: int, page_index=0, page_size=1024) | RPC | embedded.pillar.getPillarsHistoryByEpoch | PillarEpochHistoryList |
register(name: str, producer_address: znn.model.primitives.address.Address, reward_address: znn.model.primitives.address.Address, give_block_reward_percentage: int = 0, give_delegate_reward_percentage: int = 100) | AccountBlock builder | — | AccountBlock |
register_legacy(name: str, producer_address: znn.model.primitives.address.Address, reward_address: znn.model.primitives.address.Address, public_key: str, signature: str, give_block_reward_percentage: int = 0, give_delegate_reward_percentage: int = 100) | AccountBlock builder | — | AccountBlock |
update_pillar(name: str, producer_address: znn.model.primitives.address.Address, reward_address: znn.model.primitives.address.Address, give_block_reward_percentage: int = 0, give_delegate_reward_percentage: int = 100) | AccountBlock builder | — | AccountBlock |
revoke(name: str) | AccountBlock builder | — | AccountBlock |
delegate(name: str) | AccountBlock builder | — | AccountBlock |
undelegate() | AccountBlock builder | — | AccountBlock |
collect_reward() | AccountBlock builder | — | AccountBlock |
deposit_qsr(amount: int) | AccountBlock builder | — | AccountBlock |
withdraw_qsr() | AccountBlock builder | — | AccountBlock |
PlasmaApi
Plasma state, fusion entries, PoW requirements, fuse, and cancel.
Import: znn.api.embedded.plasma.PlasmaApi
Constructor: PlasmaApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
get_plasma_by_qsr(qsr_amount) | Local calculation | — | int |
async get(address: znn.model.primitives.address.Address) | RPC | embedded.plasma.get | PlasmaInfo |
async get_entries_by_address(address: znn.model.primitives.address.Address, page_index=0, page_size=1024) | RPC | embedded.plasma.getEntriesByAddress | FusionEntryList |
async get_required_fusion_amount(required_plasma: int) | Removed compatibility stub | — | Raises NotImplementedError |
async get_internal_required_pow_for_account_block(account_block: znn.model.nom.account_block.AccountBlock) | RPC | embedded.plasma.getRequiredPoWForAccountBlock | GetRequiredPowResponse |
async get_required_pow_for_account_block(pow_param) | RPC | embedded.plasma.getRequiredPoWForAccountBlock | GetRequiredPowResponse |
fuse(beneficiary: znn.model.primitives.address.Address, amount: int) | AccountBlock builder | — | AccountBlock |
cancel(hash_id: znn.model.primitives.hash.Hash) | AccountBlock builder | — | AccountBlock |
SentinelApi
Sentinel discovery, registration, rewards, and QSR management.
Import: znn.api.embedded.sentinel.SentinelApi
Constructor: SentinelApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_all_active(page_index=0, page_size=1024) | RPC | embedded.sentinel.getAllActive | SentinelInfoList |
async get_by_owner(address: znn.model.primitives.address.Address) | RPC | embedded.sentinel.getByOwner | SentinelInfo or null |
async get_deposited_qsr(address: znn.model.primitives.address.Address) | RPC | embedded.sentinel.getDepositedQsr | decimal-string |
async get_uncollected_reward(pillar_address: znn.model.primitives.address.Address) | RPC | embedded.sentinel.getUncollectedReward | UncollectedReward |
async get_frontier_reward_by_page(address: znn.model.primitives.address.Address, page_index=0, page_size=1024) | RPC | embedded.sentinel.getFrontierRewardByPage | RewardHistoryList |
register() | AccountBlock builder | — | AccountBlock |
revoke() | AccountBlock builder | — | AccountBlock |
collect_reward() | AccountBlock builder | — | AccountBlock |
deposit_qsr(amount: int) | AccountBlock builder | — | AccountBlock |
withdraw_qsr() | AccountBlock builder | — | AccountBlock |
SporkApi
Spork discovery, creation, and activation.
Import: znn.api.embedded.spork.SporkApi
Constructor: SporkApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_all(page_index=0, page_size=1024) | RPC | embedded.spork.getAll | SporkList |
activate_spork(id: znn.model.primitives.hash.Hash) | AccountBlock builder | — | AccountBlock |
create_spork(name: str, description: str) | AccountBlock builder | — | AccountBlock |
StakeApi
Stake entries, rewards, staking, cancellation, and collection.
Import: znn.api.embedded.stake.StakeApi
Constructor: StakeApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_entries_by_address(address: znn.model.primitives.address.Address, page_index=0, page_size=1024) | RPC | embedded.stake.getEntriesByAddress | StakeList |
async get_uncollected_reward(address: znn.model.primitives.address.Address) | RPC | embedded.stake.getUncollectedReward | UncollectedReward |
async get_frontier_reward_by_page(address: znn.model.primitives.address.Address, page_index=0, page_size=1024) | RPC | embedded.stake.getFrontierRewardByPage | RewardHistoryList |
stake(duration_in_sec: int, amount: int) | AccountBlock builder | — | AccountBlock |
cancel(hash_id: znn.model.primitives.hash.Hash) | AccountBlock builder | — | AccountBlock |
collect_reward() | AccountBlock builder | — | AccountBlock |
SwapApi
Swap assets, legacy pillars, and asset retrieval.
Import: znn.api.embedded.swap.SwapApi
Constructor: SwapApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_assets() | RPC | embedded.swap.getAssets | SwapAssetList |
async get_assets_by_key_id_hash(key_id_hash: str) | RPC | embedded.swap.getAssetsByKeyIdHash | SwapAssetEntry or null |
async get_legacy_pillars() | RPC | embedded.swap.getLegacyPillars | SwapLegacyPillarList |
retrieve_assets(public_key: str, signature: str) | AccountBlock builder | — | AccountBlock |
TokenApi
Token discovery, issuance, minting, burning, and updates.
Import: znn.api.embedded.token.TokenApi
Constructor: TokenApi(ws_client=None)
| Python signature | Kind | Wire method | Declared result |
|---|---|---|---|
async get_all(page_index=0, page_size=1024) | RPC | embedded.token.getAll | TokenList |
async get_by_owner(address: znn.model.primitives.address.Address, page_index=0, page_size=1024) | RPC | embedded.token.getByOwner | TokenList |
async get_by_owner_address(address: znn.model.primitives.address.Address, page_index=0, page_size=1024) | Compatibility alias | — | Same as canonical method |
async get_by_zts(token_standard: znn.model.primitives.token_standard.TokenStandard) | RPC | embedded.token.getByZts | Token or null |
issue_token(token_name: str, token_symbol: str, token_domain: str, total_supply: int, max_supply: int, decimals: int, mintable: bool, burnable: bool, utility: bool) | AccountBlock builder | — | AccountBlock |
mint_token(token_standard: znn.model.primitives.token_standard.TokenStandard, amount: int, receive_address: znn.model.primitives.address.Address) | AccountBlock builder | — | AccountBlock |
burn_token(token_standard: znn.model.primitives.token_standard.TokenStandard, amount: int) | AccountBlock builder | — | AccountBlock |
update_token(token_standard: znn.model.primitives.token_standard.TokenStandard, owner_address: znn.model.primitives.address.Address, is_mintable: bool, is_burnable: bool) | AccountBlock builder | — | AccountBlock |